hanxuntao 9 months ago
parent 2f56cff564
commit 2c37b5df88

@ -77,16 +77,20 @@ Ext.extend(Shipping.MsChRecvapplicationBLEdit, Ext.Panel, {
this.storeCustCode = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' }
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListRm' }
});
this.storeCustCode.load({ params: { condition: ""} });
//this.storeCustCode.load({ params: { condition: ""} });
this.comboxCustCode = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '结算单位',
store: this.storeCustCode,
allowBlank: false,
forceSelection: true,
queryMode: 'remote',
minChars: 1,
queryParam: 'CODENAME',
name: 'CUSTOMERNAME',
//forceSelection: true,
//name: 'CUSTOMERNAME',
valueField: 'CustName',
displayField: 'CodeAndName',
listeners: {

@ -483,6 +483,57 @@ namespace DSWeb.MvcShipping.Controllers
//}
}
var APPLYACCDATESAME = MsSysParamSetDAL.GetData("PARAMNAME='APPLYACCDATESAME'");
if (!string.IsNullOrEmpty(APPLYACCDATESAME.PARAMVALUE)) {
var nowperiod = ChMonthCloseDAL.GetData("", Convert.ToString(Session["COMPANYID"]));
if (APPLYACCDATESAME.PARAMVALUE == "ETD") {
if (Convert.ToDateTime(headData.ETD) >= Convert.ToDateTime(nowperiod.FDAY)) {
var myaccdate = Convert.ToDateTime(headData.ETD).ToString("yyyy-MM");
if (nowperiod.CLOSEDAY != 0) {
if (Convert.ToDateTime(headData.ETD).Day > nowperiod.CLOSEDAY) {
myaccdate = Convert.ToDateTime(headData.ETD).AddMonths(1).ToString("yyyy-MM");
}
}
headData.ACCDATE = myaccdate;
}
}else if (APPLYACCDATESAME.PARAMVALUE == "CUSTOMDATE")
{
if (Convert.ToDateTime(headData.CUSTOMDATE) >= Convert.ToDateTime(nowperiod.FDAY))
{
var myaccdate = Convert.ToDateTime(headData.CUSTOMDATE).ToString("yyyy-MM");
if (nowperiod.CLOSEDAY != 0)
{
if (Convert.ToDateTime(headData.CUSTOMDATE).Day > nowperiod.CLOSEDAY)
{
myaccdate = Convert.ToDateTime(headData.CUSTOMDATE).AddMonths(1).ToString("yyyy-MM");
}
}
headData.ACCDATE = myaccdate;
}
}
else if (APPLYACCDATESAME.PARAMVALUE == "OPDATE")
{
if (Convert.ToDateTime(headData.OPDATE) >= Convert.ToDateTime(nowperiod.FDAY))
{
var myaccdate = Convert.ToDateTime(headData.OPDATE).ToString("yyyy-MM");
if (nowperiod.CLOSEDAY != 0)
{
if (Convert.ToDateTime(headData.OPDATE).Day > nowperiod.CLOSEDAY)
{
myaccdate = Convert.ToDateTime(headData.OPDATE).AddMonths(1).ToString("yyyy-MM");
}
}
headData.ACCDATE = myaccdate;
}
}
}
if (headData.CORPID == ""||headData.CORPID ==null)
{
headData.CORPID = Convert.ToString(Session["COMPANYID"]);

Loading…
Cancel
Save