From 04404b446ed3239775be4b46fba4e748b72da4e3 Mon Sep 17 00:00:00 2001
From: hanxuntao <641739520@qq.com>
Date: Fri, 4 Nov 2022 10:01:42 +0800
Subject: [PATCH] 1
---
.../Viewsjs/MsChFee/FeeAmendDrCrGrid.js | 5 ++
.../Viewsjs/MsChFee/FeeDrCrGridLR.js | 45 ++++++---------
.../Viewsjs/MsChFee/FeeDrCrGridView.js | 55 ++-----------------
3 files changed, 29 insertions(+), 76 deletions(-)
diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeAmendDrCrGrid.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeAmendDrCrGrid.js
index 0202978a..2fac520d 100644
--- a/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeAmendDrCrGrid.js
+++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeAmendDrCrGrid.js
@@ -521,6 +521,11 @@ Ext.extend(Shipping.FeeAmendEditGrid, Ext.Panel, {
return "";
}
}
+ }, {
+ sortable: true,
+ dataIndex: 'SLNO',
+ header: Zi.LAN.FEE.SLNO, //'费用状态',
+ width: 130
}, {
sortable: true,
dataIndex: 'AMENDNO',
diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeDrCrGridLR.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeDrCrGridLR.js
index e8098579..67b9e90a 100644
--- a/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeDrCrGridLR.js
+++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeDrCrGridLR.js
@@ -139,15 +139,11 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, {
this.storeFeeNameRef = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.FeeTypeRefModel',
- proxy: { url: '/MvcShipping/MsChFee/GetFeeTypeRefListNew' }
+ proxy: { url: '/MvcShipping/MsChFee/GetFeeTypeRefList' }
});
- this.comboxFeeNameRef = Ext.create('DsExt.ux.DCombox', {
+ this.comboxFeeNameRef = Ext.create('DsExt.ux.RefTableCombox', {
store: this.storeFeeNameRef,
- minChars: 1,
- matchFieldWidth: false,
- //queryParam: 'Name',
forceSelection: true,
- lazyRender: false,
name: 'FeeName',
valueField: 'Name',
displayField: 'CodeAndName'
@@ -161,7 +157,7 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, {
});
this.storeFeeNameRefCr = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.FeeTypeRefModel',
- proxy: { url: '/MvcShipping/MsChFee/GetFeeTypeRefListNew' }
+ proxy: { url: '/MvcShipping/MsChFee/GetFeeTypeRefList' }
});
this.storeFeeNameRef.on('load', function (store, records) {
if (store.getCount() > 0) {
@@ -169,13 +165,9 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, {
}
}, this);
- this.comboxFeeNameRefCr = Ext.create('DsExt.ux.DCombox', {
+ this.comboxFeeNameRefCr = Ext.create('DsExt.ux.RefTableCombox', {
store: this.storeFeeNameRefCr,
forceSelection: true,
- queryMode: 'local',
- minChars: 1,
- //queryParam: 'Name',
- lazyRender: false,
name: 'FeeName',
valueField: 'Name',
displayField: 'CodeAndName'
@@ -5911,13 +5903,6 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, {
Ext.Msg.show({ title: Zi.LAN.FEE.TiShi, msg: Zi.LAN.FEE.BenWeiBiHuiLvBiXuShiYi, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
- var FeeName = memberyf.data.FeeName;
- if (FeeName == '') {
- Ext.Msg.show({ title: Zi.LAN.FEE.TiShi, msg: Zi.LAN.FEE.FeiYongMingChengBuNengWeiKong, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
- return;
- };
-
-
bodyDrChFeeDatas.push(memberyf);
var ExChangerate = memberyf.data.ExChangerate;
};
@@ -5930,11 +5915,6 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, {
Ext.Msg.show({ title: Zi.LAN.FEE.TiShi, msg: Zi.LAN.FEE.BenWeiBiHuiLvBiXuShiYi, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
- var FeeName = memberyf.data.FeeName;
- if (FeeName == '') {
- Ext.Msg.show({ title: Zi.LAN.FEE.TiShi, msg: Zi.LAN.FEE.FeiYongMingChengBuNengWeiKong, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
- return;
- };
bodyDrChFeeDatas.push(memberyf);
var amount = memberyf.data.Amount;
var ExChangerate = memberyf.data.ExChangerate;
@@ -9877,6 +9857,9 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, {
Ext.MessageBox.hide();
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
+ var printsql = jsonresult.Data;
+ var printdrsql = jsonresult.Message;
+ var printcrsql = jsonresult.Message2;
if (_this.stroplb == 'op_Seae') {
var printType = 'SEAEGAIN';
var sql1 = "SET LANGUAGE 'us_english' "
@@ -9910,11 +9893,19 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, {
var sql1 = "SET LANGUAGE 'us_english' "
+ " select * from op_airi WHERE BSNO = '" +_thisfee.strPBSNO+ "'";
};
+ // sql3 = sql3 + " Select c.*,(select showname from [user] where gid=c.enteroperator) as 录入人 from ch_fee c where c.Gid in (" + feeGidSql + ") order by sort,LineNum ";
+ var inputby = '';
+ if (strLANGUAGES == 'en-us') {
+ inputby = 'INPUTBYREF'
+ } else {
+ inputby = '录入人'
+ }
+
// sql3 = sql3 + " Select c.*,(select showname from [user] where gid=c.enteroperator) as 录入人 from ch_fee c where c.Gid in (" + feeGidSql + ") order by sort,LineNum ";
- var sql2 = "SET LANGUAGE 'us_english' Select c.*,(select showname from [user] where gid=c.enteroperator) as 录入人,(select DESCRIPTION from info_client where SHORTNAME=c.CUSTOMERNAME) CUSTFULLNAME from ch_fee c where c.BSNO='" + _thisfee.strBSNO + "' and c.FEETYPE=1 order by sort,LineNum ";
+ var sql2 = "SET LANGUAGE 'us_english' Select c.*,(select showname from [user] where gid=c.enteroperator) as " + inputby + ",(select DESCRIPTION from info_client where SHORTNAME=c.CUSTOMERNAME) CUSTFULLNAME from ch_fee c where c.BSNO='" + _this.strBSNO + "' and " + printdrsql + " and c.FEETYPE=1 order by sort,LineNum ";
- var sql3 = "SET LANGUAGE 'us_english' Select c.*,(select showname from [user] where gid=c.enteroperator) as 录入人,(select DESCRIPTION from info_client where SHORTNAME=c.CUSTOMERNAME) CUSTFULLNAME from ch_fee c where c.BSNO='" + _thisfee.strBSNO + "' and c.FEETYPE=2 order by sort,LineNum ";
+ var sql3 = "SET LANGUAGE 'us_english' Select c.*,(select showname from [user] where gid=c.enteroperator) as " + inputby + ",(select DESCRIPTION from info_client where SHORTNAME=c.CUSTOMERNAME) CUSTFULLNAME from ch_fee c where c.BSNO='" + _this.strBSNO + "' and " + printcrsql + " and c.FEETYPE=2 order by sort,LineNum ";
//全部费用利润 或 海运费利润 或 仓储利润
var sql4 = "SELECT BSNO"
+ ",SUM(RMBDR) as RMBDR,SUM(RMBCR) as RMBCR,SUM(USDDR) as USDDR,SUM(USDCR) as USDCR"
@@ -9937,7 +9928,7 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, {
+ " FROM ch_fee WHERE 1=1 and BSNO='" + _thisfee.strBSNO + "'"
+ " GROUP BY BSNO,CURRENCY,EXCHANGERATE,FEETYPE "
+ " ) AS C GROUP BY BSNO ";
- var sql5 = "exec GetPrintData '" + _thisfee.strBSNO + "'";
+ var sql5 = "exec GetPrintDataNew '" + _this.strBSNO + "','" + printsql.replace(new RegExp("'", "gm"), "''") + "'";
var sql6 = "";
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6, MBLNO);
diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeDrCrGridView.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeDrCrGridView.js
index d5216ce7..52cf68e6 100644
--- a/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeDrCrGridView.js
+++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeDrCrGridView.js
@@ -196,29 +196,6 @@ Ext.extend(Shipping.FeeViewGrid, Ext.Panel, {
}
return value;
}
- }, {
- sortable: true,
- dataIndex: 'TaxUnitPrice',
- header: '含税单价',
- align: 'right',
- width: 70,
- renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
- try {
- var lsValue = usMoney(value, 2, '', false);
- if (lsValue != "NaN") {
- value = lsValue; if (parseFloat(lsValue) < 0) {
- return '' + lsValue + '';
- }
- }
- else {
- return value;
- }
- }
- catch (e) {
- return value;
- }
- return value;
- }
}, {
sortable: true,
dataIndex: 'Quantity',
@@ -643,29 +620,6 @@ Ext.extend(Shipping.FeeViewGrid, Ext.Panel, {
}
return value;
}
- }, {
- sortable: true,
- dataIndex: 'TaxUnitPrice',
- header: '含税单价',
- align: 'right',
- width: 70,
- renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
- try {
- var lsValue = usMoney(value, 2, '', false);
- if (lsValue != "NaN") {
- value = lsValue; if (parseFloat(lsValue) < 0) {
- return '' + lsValue + '';
- }
- }
- else {
- return value;
- }
- }
- catch (e) {
- return value;
- }
- return value;
- }
}, {
sortable: true,
dataIndex: 'Quantity',
@@ -1952,6 +1906,9 @@ Ext.extend(Shipping.FeeViewGrid, Ext.Panel, {
Ext.MessageBox.hide();
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
+ var printsql = jsonresult.Data;
+ var printdrsql = jsonresult.Message;
+ var printcrsql = jsonresult.Message2;
if (_thisfeeview.stroplb == 'op_Seae') {
var printType = 'SEAEGAIN';
var sql1 = "SET LANGUAGE 'us_english' "
@@ -1987,9 +1944,9 @@ Ext.extend(Shipping.FeeViewGrid, Ext.Panel, {
};
// sql3 = sql3 + " Select c.*,(select showname from [user] where gid=c.enteroperator) as 录入人 from ch_fee c where c.Gid in (" + feeGidSql + ") order by sort,LineNum ";
- var sql2 = "SET LANGUAGE 'us_english' Select c.*,(select showname from [user] where gid=c.enteroperator) as 录入人 from ch_fee c where c.BSNO='" + _thisfeeview.strBSNO + "' and c.FEETYPE=1 order by sort,LineNum ";
+ var sql2 = "SET LANGUAGE 'us_english' Select c.*,(select showname from [user] where gid=c.enteroperator) as 录入人 from ch_fee c where c.BSNO='" + _thisfeeview.strBSNO + "' and " + printdrsql +" and c.FEETYPE=1 order by sort,LineNum ";
- var sql3 = "SET LANGUAGE 'us_english' Select c.*,(select showname from [user] where gid=c.enteroperator) as 录入人 from ch_fee c where c.BSNO='" + _thisfeeview.strBSNO + "' and c.FEETYPE=2 order by sort,LineNum ";
+ var sql3 = "SET LANGUAGE 'us_english' Select c.*,(select showname from [user] where gid=c.enteroperator) as 录入人 from ch_fee c where c.BSNO='" + _thisfeeview.strBSNO + "' and " + printcrsql +" and c.FEETYPE=2 order by sort,LineNum ";
//全部费用利润 或 海运费利润 或 仓储利润
var sql4 = "SELECT BSNO"
+ ",SUM(RMBDR) as RMBDR,SUM(RMBCR) as RMBCR,SUM(USDDR) as USDDR,SUM(USDCR) as USDCR"
@@ -2012,7 +1969,7 @@ Ext.extend(Shipping.FeeViewGrid, Ext.Panel, {
+ " FROM ch_fee WHERE 1=1 and BSNO='" + _thisfeeview.strBSNO + "'"
+ " GROUP BY BSNO,CURRENCY,EXCHANGERATE,FEETYPE "
+ " ) AS C GROUP BY BSNO ";
- var sql5 = "exec GetPrintData '" + _thisfeeview.strBSNO + "'";
+ var sql5 = "exec GetPrintDataNew '" + _thisfeeview.strBSNO + "','" + printsql.replace(new RegExp("'", "gm"), "''") + "'";
var sql6 = "";
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);