DS7_JinGang
hanxuntao 2 years ago
parent 4b634b7c7f
commit a8b78968df

@ -402,6 +402,29 @@ Ext.extend(Shipping.MsChfeelock, Ext.Panel, {
else else
return ''; return '';
} }
},
{
sortable: true,
id: '',
align: 'center',
dataIndex: 'TTLINVDR',
header: '应收开票',
width: 60,
renderer: function (value, cellmeta, record) {
var ttldr = record.data.TTLDR;
if (value == 0)
return '未开票';
else if (value == ttldr) {
cellmeta.tdCls = 'feestatus_pass';
return '已开票';
}
else if (value != ttldr) {
cellmeta.tdCls = 'feestatus_refer';
return '部分开票';
}
else
return '';
}
}, { }, {
sortable: true, sortable: true,
dataIndex: 'OPLBNAME', dataIndex: 'OPLBNAME',

@ -99,11 +99,11 @@ namespace DSWeb.MvcShipping.Controllers
{ {
strSql.Append(" and ISNULL(F.INVOICE,0)<>F.AMOUNT and ISNULL(F.ISINVOICE,0)=0 "); strSql.Append(" and ISNULL(F.INVOICE,0)<>F.AMOUNT and ISNULL(F.ISINVOICE,0)=0 ");
} }
else if (feerang == "3") else if (feerang == "3"|| feerang == "9")
{ {
strSql.Append(" and ISNULL(F.INVOICE,0)<>0 AND ((F.AMOUNT>0 and ISNULL(F.INVOICE,0)>ISNULL(F.SETTLEMENT,0)) or (F.AMOUNT<0 and ISNULL(F.INVOICE,0)<ISNULL(F.SETTLEMENT,0))) "); strSql.Append(" and ISNULL(F.INVOICE,0)<>0 AND ((F.AMOUNT>0 and ISNULL(F.INVOICE,0)>ISNULL(F.SETTLEMENT,0)) or (F.AMOUNT<0 and ISNULL(F.INVOICE,0)<ISNULL(F.SETTLEMENT,0))) ");
} }
else if (feerang == "4") else if (feerang == "4" || feerang == "8")
{ {
strSql.Append(" and ISNULL(F.SETTLEMENT,0)<>0 and ISNULL(F.ISINVOICE,0)=0 AND ((F.AMOUNT>0 and ISNULL(F.SETTLEMENT,0)>ISNULL(F.INVOICE,0)) or (F.AMOUNT<0 and ISNULL(F.SETTLEMENT,0)<ISNULL(F.INVOICE,0))) "); strSql.Append(" and ISNULL(F.SETTLEMENT,0)<>0 and ISNULL(F.ISINVOICE,0)=0 AND ((F.AMOUNT>0 and ISNULL(F.SETTLEMENT,0)>ISNULL(F.INVOICE,0)) or (F.AMOUNT<0 and ISNULL(F.SETTLEMENT,0)<ISNULL(F.INVOICE,0))) ");
} }
@ -119,6 +119,7 @@ namespace DSWeb.MvcShipping.Controllers
{ {
strSql.Append(" and ISNULL(F.SETTLEMENT,0)=0 AND ISNULL(F.INVOICE,0)=0 and ISNULL(F.ISINVOICE,0)=0 and F.FEETYPE=1 "); strSql.Append(" and ISNULL(F.SETTLEMENT,0)=0 AND ISNULL(F.INVOICE,0)=0 and ISNULL(F.ISINVOICE,0)=0 and F.FEETYPE=1 ");
} }
} }
strSql.Append(" GROUP BY B.BSNO,B.OPLBNAME, B.BSTYPE,B.CUSTOMERNAME, B.CUSTNO, B.MBLNO, B.HBLNO,B.VESSEL, B.VOYNO, B.INPUTBY, B.CREATETIME, B.BSSTATUS, B.SALE, B.OP, B.DOC,"); strSql.Append(" GROUP BY B.BSNO,B.OPLBNAME, B.BSTYPE,B.CUSTOMERNAME, B.CUSTNO, B.MBLNO, B.HBLNO,B.VESSEL, B.VOYNO, B.INPUTBY, B.CREATETIME, B.BSSTATUS, B.SALE, B.OP, B.DOC,");
@ -254,11 +255,11 @@ namespace DSWeb.MvcShipping.Controllers
{ {
strSql.Append(" and ISNULL(F.INVOICE,0)<>F.AMOUNT and ISNULL(F.ISINVOICE,0)=0 "); strSql.Append(" and ISNULL(F.INVOICE,0)<>F.AMOUNT and ISNULL(F.ISINVOICE,0)=0 ");
} }
else if (feerang == "3") else if (feerang == "3" || feerang == "9")
{ {
strSql.Append(" and ISNULL(F.INVOICE,0)<>0 AND ((F.AMOUNT>0 and ISNULL(F.INVOICE,0)>ISNULL(F.SETTLEMENT,0)) or (F.AMOUNT<0 and ISNULL(F.INVOICE,0)<ISNULL(F.SETTLEMENT,0))) "); strSql.Append(" and ISNULL(F.INVOICE,0)<>0 AND ((F.AMOUNT>0 and ISNULL(F.INVOICE,0)>ISNULL(F.SETTLEMENT,0)) or (F.AMOUNT<0 and ISNULL(F.INVOICE,0)<ISNULL(F.SETTLEMENT,0))) ");
} }
else if (feerang == "4") else if (feerang == "4" || feerang == "8")
{ {
strSql.Append(" and ISNULL(F.SETTLEMENT,0)<>0 and ISNULL(F.ISINVOICE,0)=0 AND ((F.AMOUNT>0 and ISNULL(F.SETTLEMENT,0)>ISNULL(F.INVOICE,0)) or (F.AMOUNT<0 and ISNULL(F.SETTLEMENT,0)<ISNULL(F.INVOICE,0))) "); strSql.Append(" and ISNULL(F.SETTLEMENT,0)<>0 and ISNULL(F.ISINVOICE,0)=0 AND ((F.AMOUNT>0 and ISNULL(F.SETTLEMENT,0)>ISNULL(F.INVOICE,0)) or (F.AMOUNT<0 and ISNULL(F.SETTLEMENT,0)<ISNULL(F.INVOICE,0))) ");
} }
@ -377,11 +378,11 @@ namespace DSWeb.MvcShipping.Controllers
{ {
strSql.Append(" and ISNULL(F.INVOICE,0)<>F.AMOUNT and ISNULL(F.ISINVOICE,0)=0 "); strSql.Append(" and ISNULL(F.INVOICE,0)<>F.AMOUNT and ISNULL(F.ISINVOICE,0)=0 ");
} }
else if (feerang == "3") else if (feerang == "3" || feerang == "9")
{ {
strSql.Append(" and ISNULL(F.INVOICE,0)<>0 AND ((F.AMOUNT>0 and ISNULL(F.INVOICE,0)>ISNULL(F.SETTLEMENT,0)) or (F.AMOUNT<0 and ISNULL(F.INVOICE,0)<ISNULL(F.SETTLEMENT,0))) "); strSql.Append(" and ISNULL(F.INVOICE,0)<>0 AND ((F.AMOUNT>0 and ISNULL(F.INVOICE,0)>ISNULL(F.SETTLEMENT,0)) or (F.AMOUNT<0 and ISNULL(F.INVOICE,0)<ISNULL(F.SETTLEMENT,0))) ");
} }
else if (feerang == "4") else if (feerang == "4" || feerang == "8")
{ {
strSql.Append(" and ISNULL(F.SETTLEMENT,0)<>0 and ISNULL(F.ISINVOICE,0)=0 AND ((F.AMOUNT>0 and ISNULL(F.SETTLEMENT,0)>ISNULL(F.INVOICE,0)) or (F.AMOUNT<0 and ISNULL(F.SETTLEMENT,0)<ISNULL(F.INVOICE,0))) "); strSql.Append(" and ISNULL(F.SETTLEMENT,0)<>0 and ISNULL(F.ISINVOICE,0)=0 AND ((F.AMOUNT>0 and ISNULL(F.SETTLEMENT,0)>ISNULL(F.INVOICE,0)) or (F.AMOUNT<0 and ISNULL(F.SETTLEMENT,0)<ISNULL(F.INVOICE,0))) ");
} }
@ -502,11 +503,11 @@ namespace DSWeb.MvcShipping.Controllers
{ {
strSql.Append(" and ISNULL(F.INVOICE,0)<>F.AMOUNT and ISNULL(F.ISINVOICE,0)=0 "); strSql.Append(" and ISNULL(F.INVOICE,0)<>F.AMOUNT and ISNULL(F.ISINVOICE,0)=0 ");
} }
else if (feerang == "3") else if (feerang == "3" || feerang == "9")
{ {
strSql.Append(" and ISNULL(F.INVOICE,0)<>0 AND ((F.AMOUNT>0 and ISNULL(F.INVOICE,0)>ISNULL(F.SETTLEMENT,0)) or (F.AMOUNT<0 and ISNULL(F.INVOICE,0)<ISNULL(F.SETTLEMENT,0))) "); strSql.Append(" and ISNULL(F.INVOICE,0)<>0 AND ((F.AMOUNT>0 and ISNULL(F.INVOICE,0)>ISNULL(F.SETTLEMENT,0)) or (F.AMOUNT<0 and ISNULL(F.INVOICE,0)<ISNULL(F.SETTLEMENT,0))) ");
} }
else if (feerang == "4") else if (feerang == "4" || feerang == "8")
{ {
strSql.Append(" and ISNULL(F.SETTLEMENT,0)<>0 and ISNULL(F.ISINVOICE,0)=0 AND ((F.AMOUNT>0 and ISNULL(F.SETTLEMENT,0)>ISNULL(F.INVOICE,0)) or (F.AMOUNT<0 and ISNULL(F.SETTLEMENT,0)<ISNULL(F.INVOICE,0))) "); strSql.Append(" and ISNULL(F.SETTLEMENT,0)<>0 and ISNULL(F.ISINVOICE,0)=0 AND ((F.AMOUNT>0 and ISNULL(F.SETTLEMENT,0)>ISNULL(F.INVOICE,0)) or (F.AMOUNT<0 and ISNULL(F.SETTLEMENT,0)<ISNULL(F.INVOICE,0))) ");
} }

@ -2518,6 +2518,7 @@ namespace DSWeb.MvcShipping.DAL.MsRptSaleBalProfitShareDAL
strSql.Append(",DATEDIFF([day],ISNULL(T.SETTLETIME,GETDATE()),(select min(bgndate) from Info_Client_ACCDATE where LINKGID=(select gid from Info_Client where SHORTNAME=b.CUSTOMERNAME))) NODAY"); strSql.Append(",DATEDIFF([day],ISNULL(T.SETTLETIME,GETDATE()),(select min(bgndate) from Info_Client_ACCDATE where LINKGID=(select gid from Info_Client where SHORTNAME=b.CUSTOMERNAME))) NODAY");
strSql.Append(",B.ACCDATE ETDMONTH,(CASE f.ISFEE WHEN 1 THEN '已发放' else '未发放' end) as ISFEEREF,CASE WHEN (B.TTLDR-B.STLTTLDR)<0 THEN 0 ELSE (dbo.GetZHZYTTL(B.STLDATE,B.BSNO)+TTLNODR*ZYRATE*DATEDIFF([day],B.STLDATE,GETDATE())) END ZYTTL "); strSql.Append(",B.ACCDATE ETDMONTH,(CASE f.ISFEE WHEN 1 THEN '已发放' else '未发放' end) as ISFEEREF,CASE WHEN (B.TTLDR-B.STLTTLDR)<0 THEN 0 ELSE (dbo.GetZHZYTTL(B.STLDATE,B.BSNO)+TTLNODR*ZYRATE*DATEDIFF([day],B.STLDATE,GETDATE())) END ZYTTL ");
strSql.Append(",ISNULL((SELECT SUM(RATEDIFF) FROM v_fee_rate WHERE BSNO=B.BSNO),0) RATEDIFF ");
strSql.Append(" FROM v_op_bill_gain_zh B "); strSql.Append(" FROM v_op_bill_gain_zh B ");
strSql.Append("LEFT JOIN V_MAX_SETTLEMENTTIME_BSDR T ON (T.BSNO=B.BSNO) "); strSql.Append("LEFT JOIN V_MAX_SETTLEMENTTIME_BSDR T ON (T.BSNO=B.BSNO) ");
@ -2549,8 +2550,9 @@ namespace DSWeb.MvcShipping.DAL.MsRptSaleBalProfitShareDAL
strSql.Append(",DATEDIFF([day],ISNULL(T.SETTLETIME,GETDATE()),(select min(bgndate) from Info_Client_ACCDATE where LINKGID=(select gid from Info_Client where SHORTNAME=b.CUSTOMERNAME))) NODAY"); strSql.Append(",DATEDIFF([day],ISNULL(T.SETTLETIME,GETDATE()),(select min(bgndate) from Info_Client_ACCDATE where LINKGID=(select gid from Info_Client where SHORTNAME=b.CUSTOMERNAME))) NODAY");
strSql.Append(",B.ACCDATE ETDMONTH,(CASE f.ISFEE WHEN 1 THEN '已发放' else '未发放' end) as ISFEEREF,0 ZYTTL "); strSql.Append(",B.ACCDATE ETDMONTH,(CASE f.ISFEE WHEN 1 THEN '已发放' else '未发放' end) as ISFEEREF,0 ZYTTL ");
strSql.Append(",ISNULL((SELECT SUM(RATEDIFF) FROM v_fee_rate WHERE BSNO=B.BSNO),0) RATEDIFF ");
strSql.Append(" FROM v_op_bill_gain_zh B "); strSql.Append(" FROM v_op_bill_gain_zh B ");
strSql.Append("LEFT JOIN V_MAX_SETTLEMENTTIME_CR T ON (T.BSNO=B.BSNO) "); strSql.Append("LEFT JOIN V_MAX_SETTLEMENTTIME_CR T ON (T.BSNO=B.BSNO) ");
strSql.Append("LEFT JOIN op_sale_proftfee f ON (f.BSNO=B.BSNO) where B.TTLDR=0 "); strSql.Append("LEFT JOIN op_sale_proftfee f ON (f.BSNO=B.BSNO) where B.TTLDR=0 ");

@ -693,7 +693,13 @@ Ext.extend(Shipping.OrderFeeGrid, Ext.Panel, {
}, },
scope: this scope: this
}, '-', { },
{
text: "引入费用模板", //"引入费用模板",
handler: function (menu, event) {
_thisorderfee.onTemplateAddDetailClick(menu, event, 1);
}
}, '-', {
text: "保存列表样式", //"保存列表样式", text: "保存列表样式", //"保存列表样式",
menu: [ menu: [
{ text: "保存", //"保存", { text: "保存", //"保存",
@ -1184,7 +1190,13 @@ Ext.extend(Shipping.OrderFeeGrid, Ext.Panel, {
}, },
scope: this scope: this
}, '-', { },
{
text: "引入费用模板", //"引入费用模板",
handler: function (menu, event) {
_thisorderfee.onTemplateAddDetailClick(menu, event, 2);
}
}, '-', {
text: "保存列表样式", //"保存列表样式", text: "保存列表样式", //"保存列表样式",
menu: [ menu: [
{ text: "保存", //"保存", { text: "保存", //"保存",

@ -16,6 +16,7 @@ Ext.extend(Shipping.HistryTruckIndex, Ext.Panel, {
StoreFeeUnit: null, StoreFeeUnit: null,
StoreFeeCust: null, StoreFeeCust: null,
EditRecord: null, EditRecord: null,
PEditRecord: null,
initUIComponents: function () { initUIComponents: function () {
//定义数据集 //定义数据集
@ -533,7 +534,7 @@ Ext.extend(Shipping.HistryTruckIndex, Ext.Panel, {
parentWin = window.parent.opener._this; parentWin = window.parent.opener._this;
if (parentWin) { if (parentWin) {
this.storeBodyList = parentWin.storeBodyList; this.storeBodyList = parentWin.storeBodyList;
this.EditRecord = parentWin.EditRecord; this.PEditRecord = parentWin.MainEditRecord;
} }
//#region 事件绑定 //#region 事件绑定
this.storeList.on('beforeload', function (store) { this.storeList.on('beforeload', function (store) {
@ -627,7 +628,7 @@ Ext.extend(Shipping.HistryTruckIndex, Ext.Panel, {
Import: function (button, event) { Import: function (button, event) {
parentWin.formEdit.getForm().reset(); parentWin.formEdit.getForm().reset();
parentWin.formEdit.getForm().setValues(this.EditRecord); parentWin.formEdit.getForm().setValues(this.EditRecord);
parentWin.formEdit.getForm().findField('CTNS').setValue(this.PEditRecord.get('CNTRTOTAL'));
//parentWin.opStatus = "add"; //parentWin.opStatus = "add";
//parentWin.Save("0"); //parentWin.Save("0");

@ -1625,6 +1625,8 @@ Ext.extend(Shipping.MsRptInvTotalIndex, Ext.Panel, {
this.storeFeeRange.add({ "DC": "5", "NAME": "仅未开票未申请未收款" }); this.storeFeeRange.add({ "DC": "5", "NAME": "仅未开票未申请未收款" });
this.storeFeeRange.add({ "DC": "6", "NAME": "仅已收款已开发票" }); this.storeFeeRange.add({ "DC": "6", "NAME": "仅已收款已开发票" });
this.storeFeeRange.add({ "DC": "7", "NAME": "仅未开票未收款" }); this.storeFeeRange.add({ "DC": "7", "NAME": "仅未开票未收款" });
this.storeFeeRange.add({ "DC": "8", "NAME": "仅已付款未收发票" });
this.storeFeeRange.add({ "DC": "9", "NAME": "仅已收发票未付款" });
this.comboxFeeRange = Ext.create('DsExt.ux.RefTableCombox', { this.comboxFeeRange = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '统计范围', fieldLabel: '统计范围',

@ -552,6 +552,7 @@ Ext.extend(Shipping.MsRptNoTotalMonthIndex, Ext.Panel, {
}); });
this.storeAddDCType = Ext.create('Ext.data.Store', { this.storeAddDCType = Ext.create('Ext.data.Store', {
fields: ['DC', 'NAME'] fields: ['DC', 'NAME']
}); });

@ -95,6 +95,7 @@ Ext.extend(Shipping.MsRptSaleBalProfitShareIndex, Ext.Panel, {
{ name: 'TTLDR', type: 'number' }, { name: 'TTLDR', type: 'number' },
{ name: 'TTLCR', type: 'number' }, { name: 'TTLCR', type: 'number' },
{ name: 'INTEREST', type: 'number' }, { name: 'INTEREST', type: 'number' },
{ name: 'RATEDIFF', type: 'number' },
{ name: 'RMBPROFIT', type: 'number' }, { name: 'RMBPROFIT', type: 'number' },
{ name: 'USDPROFIT', type: 'number' }, { name: 'USDPROFIT', type: 'number' },
{ name: 'OTPROFIT', type: 'number' }, { name: 'OTPROFIT', type: 'number' },
@ -370,6 +371,27 @@ Ext.extend(Shipping.MsRptSaleBalProfitShareIndex, Ext.Panel, {
}, },
width: 80 width: 80
},
{
sortable: true,
dataIndex: 'RATEDIFF',
header: '结算汇率差',
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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } }
else { return value; }
} catch (e) { return value; }
//value = usMoney(value, 2, '', true);
return value;
},
align: 'right',
summaryType: 'sum',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
},
width: 80
}, { }, {
sortable: true, sortable: true,
dataIndex: 'RMBDR', dataIndex: 'RMBDR',

@ -2855,7 +2855,9 @@ Ext.extend(Shipping.WMSNewINEdit, Ext.Panel, {
var jianshu2 = store.data.items.length > 0 ? store.data.items[store.data.items.length - 1].data.JIANSHU2 : 0; var jianshu2 = store.data.items.length > 0 ? store.data.items[store.data.items.length - 1].data.JIANSHU2 : 0;
var zongjianshu = store.data.items.length > 0 ? store.data.items[store.data.items.length - 1].data.GOODSPACK : 0; var zongjianshu = store.data.items.length > 0 ? store.data.items[store.data.items.length - 1].data.GOODSPACK : 0;
var goodsmodel = store.data.items.length > 0 ? store.data.items[store.data.items.length - 1].data.GOODSMODEL : ''; var goodsmodel = store.data.items.length > 0 ? store.data.items[store.data.items.length - 1].data.GOODSMODEL : '';
var countryid = store.data.items.length > 0 ? store.data.items[store.data.items.length - 1].data.COUNTRYID : ''; var countryid = COUNTRYIDSTR;
if (countryid=='')
countryid = store.data.items.length > 0 ? store.data.items[store.data.items.length - 1].data.COUNTRYID : '';
var goodskgs = store.data.items.length > 0 ? store.data.items[store.data.items.length - 1].data.GOODSKGS : 0; var goodskgs = store.data.items.length > 0 ? store.data.items[store.data.items.length - 1].data.GOODSKGS : 0;
@ -2867,7 +2869,7 @@ Ext.extend(Shipping.WMSNewINEdit, Ext.Panel, {
//var countryid = store.data.items.length > 0 ? store.data.items[store.data.items.length - 1].data.COUNTRYID : ''; //var countryid = store.data.items.length > 0 ? store.data.items[store.data.items.length - 1].data.COUNTRYID : '';
//var country = store.data.items.length > 0 ? store.data.items[store.data.items.length - 1].data.COUNTRY : ''; //var country = store.data.items.length > 0 ? store.data.items[store.data.items.length - 1].data.COUNTRY : '';
var country = COUNTRYNAMESTR; var country = COUNTRYNAMESTR;
var countryid = COUNTRYIDSTR;
var record = null; var record = null;
var areaname = data.AREANAME; var areaname = data.AREANAME;

Loading…
Cancel
Save