DS7_HYRD
hanxuntao 6 months ago
parent c069699db2
commit 54d128bfa6

@ -2662,7 +2662,7 @@ namespace DSWeb.MvcShipping.Controllers
public ContentResult SumListData(int start, int limit, string condition, string sort, string printstr, string objname, string sumfieldtype, string topnum)
public ContentResult SumListData(int start, int limit, string condition, string sort, string printstr, string objname, string objname2, string sumfieldtype, string topnum)
{
var strDa = GetRangDAStr("index", Convert.ToString(Session["USERID"]), Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"]));
@ -2691,14 +2691,19 @@ namespace DSWeb.MvcShipping.Controllers
}
}
var objnameall = "";
if (!string.IsNullOrEmpty(objname)) objnameall = objname;
if (!string.IsNullOrEmpty(objname2)) objnameall = objnameall+"+'_'+"+objname2;
var strSql = new StringBuilder();
if (topnum=="0")
strSql.Append("SELECT "+objname+" AS OBJNAME ");
strSql.Append("SELECT "+ objnameall + " AS OBJNAME ");
else
strSql.Append("SELECT TOP "+topnum+" " + objname + " AS OBJNAME ");
strSql.Append("SELECT TOP "+topnum+" " + objnameall + " AS OBJNAME ");
if (sumfieldtype=="利润")
strSql.Append(",SUM(G.TTLDR-G.TTLCR) AS OBJNUM,SUM(G.RMBDR-G.RMBCR) AS OBJNUMRMB,SUM(G.USDDR-G.USDCR) AS OBJNUMUSD ");
@ -2762,7 +2767,7 @@ namespace DSWeb.MvcShipping.Controllers
strSql.Append(" AND (CASE WHEN F.FEETYPE=1 THEN AMOUNT*EXCHANGERATE ELSE 0 END)<>0 ");
if (sumfieldtype == "应付")
strSql.Append(" AND (CASE WHEN F.FEETYPE=2 THEN AMOUNT*EXCHANGERATE ELSE 0 END)<>0 ");
strSql.Append(" Group by " + objname);
strSql.Append(" Group by " + objnameall);
var sortstring = DatasetSort.Getsortstring(sort);

@ -61,7 +61,7 @@ Ext.extend(Shipping.MsCodeOpDefEdit, Ext.Panel, {
if (combo.value == '大宗散货') {
this.StoreField.load({ params: { optable: "OP_BULK"} });
}
if (combo.value == '陆运派车单') {
if (combo.value == '陆运派车单' || combo.value == '陆运派车') {
this.StoreField.load({ params: { optable: "tMsWlPCHead"} });
}
if (combo.value == '国内空运') {

@ -538,7 +538,9 @@ Ext.extend(Shipping.MsRptOpProfitPerCentIndex, Ext.Panel, {
{ id: 'rdoDestination', boxLabel: Zi.LAN.DESTINATION, name: 'OBJNAME', inputValue: 'B.DESTINATION' },
{ id: 'rdoStlname', boxLabel: Zi.LAN.STLNAME, name: 'OBJNAME', inputValue: 'B.STLNAME' },
{ id: 'rdoFeeObjName', boxLabel: Zi.LAN.DCCUST, name: 'OBJNAME', inputValue: 'F.CUSTOMERNAME' },
{ id: 'rdoFrCustService', boxLabel: Zi.LAN.PS_FRCUSTSERVICE, name: 'OBJNAME', inputValue: 'B.FRCUSTSERVICE' }
{ id: 'rdoFrCustService', boxLabel: Zi.LAN.PS_FRCUSTSERVICE, name: 'OBJNAME', inputValue: 'B.FRCUSTSERVICE' },
{ id: 'rdoBlType', boxLabel: Zi.LAN.BLTYPE, name: 'OBJNAME', inputValue: 'B.BLTYPE' },
{ id: 'rdoAll', boxLabel: Zi.LAN.All, name: 'OBJNAME', inputValue: '' }
],
listeners: {
change: function (rd, newValue, oldValue, eOpts) {
@ -548,30 +550,33 @@ Ext.extend(Shipping.MsRptOpProfitPerCentIndex, Ext.Panel, {
}
}, {
xtype: 'radiogroup',
fieldLabel: Zi.LAN.rdOBJCHART,
id: 'rdOBJCHART',
flex: 2,
columns: 2,
fieldLabel: Zi.LAN.OBJNAME+'2',
id: 'rdOBJNAME2',
flex: 5,
columns: 8,
vertical: true,
items: [
{ id: 'rdoBsSource2', boxLabel: Zi.LAN.BSSOURCE, name: 'OBJNAME2', inputValue: 'B.BSSOURCE' },
{ id: 'rdoLane2', boxLabel: Zi.LAN.LANE, name: 'OBJNAME2', inputValue: 'B.LANE', checked: true },
{ id: 'rdoSale2', boxLabel: Zi.LAN.PS_SALE, name: 'OBJNAME2', inputValue: 'B.SALE' },
{ id: 'rdoBsType2', boxLabel: Zi.LAN.PS_BSTYPE, name: 'OBJNAME2', inputValue: 'B.BSTYPE' },
{ id: 'rdoCustomerName2', boxLabel: Zi.LAN.PS_CUSTOMERNAME, name: 'OBJNAME2', inputValue: 'B.CUSTOMERNAME' },
{ id: 'rdoCarrier2', boxLabel: Zi.LAN.CARRIER, name: 'OBJNAME2', inputValue: 'B.CARRIER' },
{ id: 'rdoOp2', boxLabel: Zi.LAN.PS_OP, name: 'OBJNAME2', inputValue: 'B.OP' },
{ id: 'rdoCustService2', boxLabel: Zi.LAN.PS_CUSTSERVICE, name: 'OBJNAME2', inputValue: 'B.CUSTSERVICE' },
{ id: 'rdoDoc2', boxLabel: Zi.LAN.PS_DOC, name: 'OBJNAME2', inputValue: 'B.DOC' },
{ id: 'rdoDestination2', boxLabel: Zi.LAN.DESTINATION, name: 'OBJNAME2', inputValue: 'B.DESTINATION' },
{ id: 'rdoStlname2', boxLabel: Zi.LAN.STLNAME, name: 'OBJNAME2', inputValue: 'B.STLNAME' },
{ id: 'rdoFeeObjName2', boxLabel: Zi.LAN.DCCUST, name: 'OBJNAME2', inputValue: 'F.CUSTOMERNAME' },
{ id: 'rdoFrCustService2', boxLabel: Zi.LAN.PS_FRCUSTSERVICE, name: 'OBJNAME2', inputValue: 'B.FRCUSTSERVICE' },
{ id: 'rdoBlType2', boxLabel: Zi.LAN.BLTYPE, name: 'OBJNAME2', inputValue: 'B.BLTYPE' }
],
listeners: {
change: function (the, newValue, oldValue, eOpts) {
if (newValue.OBJCHART == '柱状图') {
_this.panelchart.setVisible(false);
_this.panelcolumnchart.setVisible(true);
} else {
_this.panelchart.setVisible(true);
_this.panelcolumnchart.setVisible(false);
// _this.panelBody.removeAll();
// _this.panelBody.add(_this.panelchart);
// _this.panelBody.add(_this.panelBodyChFee);
}
change: function (rd, newValue, oldValue, eOpts) {
if (_this.isquery)
_this.onRefreshClick();
}
},
items: [
{ boxLabel: Zi.LAN.rdOBJCHARTD2, name: 'OBJCHART', inputValue: '饼形图', checked: true },
{ boxLabel: Zi.LAN.rdOBJCHARTD1, name: 'OBJCHART', inputValue: '柱状图' }
]
}
}
]
}, {
@ -601,7 +606,33 @@ Ext.extend(Shipping.MsRptOpProfitPerCentIndex, Ext.Panel, {
_this.onRefreshClick();
}
}
}, { xtype: 'hiddenfield', flex: 2 }
}, {
xtype: 'radiogroup',
fieldLabel: Zi.LAN.rdOBJCHART,
id: 'rdOBJCHART',
flex: 2,
columns: 2,
vertical: true,
listeners: {
change: function (the, newValue, oldValue, eOpts) {
if (newValue.OBJCHART == '柱状图') {
_this.panelchart.setVisible(false);
_this.panelcolumnchart.setVisible(true);
} else {
_this.panelchart.setVisible(true);
_this.panelcolumnchart.setVisible(false);
// _this.panelBody.removeAll();
// _this.panelBody.add(_this.panelchart);
// _this.panelBody.add(_this.panelBodyChFee);
}
}
},
items: [
{ boxLabel: Zi.LAN.rdOBJCHARTD2, name: 'OBJCHART', inputValue: '饼形图', checked: true },
{ boxLabel: Zi.LAN.rdOBJCHARTD1, name: 'OBJCHART', inputValue: '柱状图' }
]
}
]
}, {
xtype: 'container',
@ -926,9 +957,11 @@ Ext.extend(Shipping.MsRptOpProfitPerCentIndex, Ext.Panel, {
var OBJNAME = rdOBJNAME.getValue();
var OBJNUM = rdOBJNUM.getValue();
var TOPNUM = Ext.getCmp('rdTOP').getValue();
var rdOBJNAME2 = Ext.getCmp('rdOBJNAME2');
var OBJNAME2 = rdOBJNAME2.getValue();
var sql = this.getCondition();
Ext.apply(store.proxy.extraParams, { condition: sql, objname: OBJNAME, sumfieldtype: OBJNUM, topnum: TOPNUM });
Ext.apply(store.proxy.extraParams, { condition: sql, objname: OBJNAME, sumfieldtype: OBJNUM, topnum: TOPNUM, objname2: OBJNAME2 });
}, this);
LoadQueryData(this.formname, this.formSearch, this.CheckSaveQuery);
@ -946,6 +979,8 @@ Ext.extend(Shipping.MsRptOpProfitPerCentIndex, Ext.Panel, {
var OBJNAME = rdOBJNAME.getValue();
var OBJNUM = rdOBJNUM.getValue();
var TOPNUM = Ext.getCmp('rdTOP').getValue();
var rdOBJNAME2 = Ext.getCmp('rdOBJNAME2');
var OBJNAME2 = rdOBJNAME2.getValue();
var sql = this.getCondition();
@ -953,7 +988,7 @@ Ext.extend(Shipping.MsRptOpProfitPerCentIndex, Ext.Panel, {
this.storeList.load({
params: { start: 0, limit: this.PageSize, condition: sql, objname: OBJNAME, sumfieldtype: OBJNUM, topnum: TOPNUM },
params: { start: 0, limit: this.PageSize, condition: sql, objname: OBJNAME, sumfieldtype: OBJNUM, topnum: TOPNUM, objname2: OBJNAME2 },
waitMsg: "正在查询数据...",
scope: this
});
@ -969,11 +1004,13 @@ Ext.extend(Shipping.MsRptOpProfitPerCentIndex, Ext.Panel, {
var OBJNAME = rdOBJNAME.getValue();
var OBJNUM = rdOBJNUM.getValue();
var TOPNUM = Ext.getCmp('rdTOP').getValue();
var rdOBJNAME2 = Ext.getCmp('rdOBJNAME2');
var OBJNAME2 = rdOBJNAME2.getValue();
var sql = this.sqlcontext;
this.storeList.load({
params: { start: 0, limit: this.PageSize, condition: sql, objname: OBJNAME, sumfieldtype: OBJNUM, topnum: TOPNUM },
params: { start: 0, limit: this.PageSize, condition: sql, objname: OBJNAME, sumfieldtype: OBJNUM, topnum: TOPNUM, objname2: OBJNAME2 },
waitMsg: "正在查询数据...",
scope: this
});

@ -73,6 +73,9 @@ Zi.LAN.KSRQBNDYJSRQ = "业务开始日期不能大于结束日期";
Zi.LAN.KSKQQJBNWK = "开始会计期间不能为空!";
Zi.LAN.JSKQQJBNWK = "结束会计期间不能为空!";
Zi.LAN.KSQJQJBNDYJSKJQJ = "会计期间开始日期不能大于结束日期";
Zi.LAN.KSQJQJBNDYJSKJQJ = "会计期间开始日期不能大于结束日期";
Zi.LAN.BLTYPE = "装运方式";
Zi.LAN.All = "全部";
//Zi.LAN. = "";

@ -214,14 +214,23 @@ namespace DSWeb.Areas.TruckMng.Controllers
if (opstatus == "add")
{
var billnoset = MsSysBillNoSetDAL.GetData("OPLBNAME='陆运'", Convert.ToString(Session["COMPANYID"]));
billnoset.BILLTYPE = "0111";
billnoset.RULEDATETYPE = "业务日期";
var bsdate=headData.ExpDate;
if (bsdate == "" || bsdate == null)
bsdate = DateTime.Now.ToString("yyyy-MM-dd");
headData.BillNo = MsSysBillNoSetDAL.GetBillNo(billnoset, bsdate, DateTime.Now.ToString("yyyy-MM")); //获取合同号
if (headData.BLTYPE== "派车分票"&&!string.IsNullOrEmpty(headData.PGid) && headData.PGid != headData.gId)
{
headData.BillNo = MsRptPcHeadEditDAL.GetFenBillNo(headData.PGid);
}
else
{
var billnoset = MsSysBillNoSetDAL.GetData("OPLBNAME='陆运'", Convert.ToString(Session["COMPANYID"]));
billnoset.BILLTYPE = "0111";
billnoset.RULEDATETYPE = "业务日期";
var bsdate = headData.ExpDate;
if (bsdate == "" || bsdate == null)
bsdate = DateTime.Now.ToString("yyyy-MM-dd");
headData.BillNo = MsSysBillNoSetDAL.GetBillNo(billnoset, bsdate, DateTime.Now.ToString("yyyy-MM")); //获取合同号
}
headData.OrgCode = CookieConfig.GetCookie_OrgCode(Request);

@ -20,6 +20,7 @@ using DSWeb.MvcShipping.DAL.MsChFeeDAL;
using DSWeb.Common.DB;
using System.Data.Entity.Migrations;
using System.Web.UI.WebControls;
using DSWeb.Areas.MvcShipping.Models.Message.VGM;
namespace DSWeb.Areas.TruckMng.DAL.MsRptPcHeadEdit
{
@ -1085,6 +1086,54 @@ namespace DSWeb.Areas.TruckMng.DAL.MsRptPcHeadEdit
}
public static string GetFenBillNo(string PGID)
{
var result =" ";
var tmpbillno = "";
var head = MsRptPcHeadEditDAL.GetWFSDData("t.GID<>'" + PGID + "'");
var FenList = MsRptPcHeadEditDAL.GetWFSDFenList("t.PGID='" + PGID + "' AND t.GID<>'" + PGID + "'", " BillNo Desc ");
if (FenList != null && FenList.Count != 0) {
tmpbillno = FenList[0].BillNo;
var subcode = tmpbillno.Substring(tmpbillno.Length - 2, 1);
var subcode2 = tmpbillno.Substring(tmpbillno.Length - 3, 1);
if (subcode == "-" || subcode2 == "-")
{
var subnum = "";
if (subcode == "-")
subnum = tmpbillno.Substring(tmpbillno.Length - 1, 1);
if (subcode2 == "-")
subnum = tmpbillno.Substring(tmpbillno.Length - 2, 2);
try
{
var num = Convert.ToInt16(subnum) + 1;
result = head.BillNo +"-" +num.ToString();
}
catch (Exception e)
{
}
}
else
{
result = head.BillNo + "-1";
}
}
else {
result = head.BillNo + "-1";
}
return result;
}
#endregion

@ -22,6 +22,21 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, {
this.MsPeriod = null;
this.bsno = getUrlParam('bsno');
this.storeDefValue = Ext.create('Ext.data.Store', {
model: 'DsShipping.ux.OpDefValue',
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsCodeOpDef/GetDataList',
reader: {
id: 'GID',
root: 'data',
totalProperty: 'totalCount'
}
}
});
Ext.define('PCmb', {
extend: 'Ext.data.Model',
idProperty: '',
@ -320,6 +335,7 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, {
'select': function (combo, records, eOpts) {
if (records.length > 0) {
this.formEdit.getForm().findField('F_CustomerName').setValue(records[0].data.OWNER);
this.formEdit.getForm().findField('DrvCode').setValue(records[0].data.DrvCode);
}
}
@ -1297,6 +1313,10 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, {
this.formEdit.getForm().findField('TruckNo').setValue(this.editRecord.get('TruckNo'));
}
}
if (this.opStatus == 'add') {
this.LoadDefValue();
}
this.LoadPeriod();
if (data.PCSTATUSREF != '完成') {
this.setSaveBtnStatus(true);
@ -1926,6 +1946,30 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, {
},
LoadDefValue: function () {
this.storeDefValue.load({
params: { condition: "BSTYPE='陆运派车单'" },
callback: function (r, options, success) {
if (success) {
if (this.storeDefValue.getCount() > 0) {
for (var j = 0; j < this.storeDefValue.getCount(); j += 1) {
var member = this.storeDefValue.getAt(j);
var headfield = this.formEdit.getForm().findField(member.data.FIELDNAME);
if (headfield != NaN && headfield != null)
headfield.setValue(member.data.DEFVALUE);
};
} else {
}
}
},
scope: this
});
},
GainToDriverFee: function () {
var ratio = this.formRatio.getForm().findField('Ratio').getValue();
this.winRatio.close();

@ -2,7 +2,7 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ShowAllFiles</ProjectView>
<NameOfLastUsedPublishProfile>配置文件1</NameOfLastUsedPublishProfile>
<NameOfLastUsedPublishProfile>D:\DONGSHENG7\DS7HYRD\DSWeb\Properties\PublishProfiles\配置文件1.pubxml</NameOfLastUsedPublishProfile>
<UseIISExpress>true</UseIISExpress>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<Use64BitIISExpress />

Loading…
Cancel
Save