Merge branch 'DS7_HYRD' of http://60.209.125.238:20010/dengyu/DS7 into DS7_HYRD

DS7_HYRD
hanxuntao 9 months ago
commit 36fbf9c012

@ -1197,6 +1197,48 @@ namespace DSWeb.Common.DB
public DateTime? PRINTTIME { get; set; }
}
[Table("ch_fee_recvapplication")]
public partial class ch_fee_recvapplication_md
{
[Key]
public string GID { get; set; }
public string BILLNO { get; set; }
public int? BILLSTATUS { get; set; }
public string CUSTOMERNAME { get; set; }
public string INVOICETITLE { get; set; }
public int? SETTLETYPE { get; set; }
public DateTime? RECVTIME { get; set; }
public decimal? AMOUNTRMB { get; set; }
public decimal? AMOUNTUSD { get; set; }
public decimal? RATE { get; set; }
public decimal? SETTLERMB { get; set; }
public decimal? SETTLEUSD { get; set; }
public decimal? SETTLERATE { get; set; }
public string APPLICANT { get; set; }
public DateTime? APPLYTIME { get; set; }
public DateTime? ENTERTIME { get; set; }
public string SETTLEUSER { get; set; }
public DateTime? SETTLETIME { get; set; }
public string AUDITUSER { get; set; }
public DateTime? AUDITTIME { get; set; }
public string REMARK { get; set; }
public bool? ISDELETE { get; set; }
public string DELETEUSER { get; set; }
public DateTime? DELETETIME { get; set; }
public string INVOICENUMREMARK { get; set; }
public string COMPANYID { get; set; }
public string CURR { get; set; }
public decimal? PREAMOUNTRMB { get; set; }
public decimal? PREAMOUNTUSD { get; set; }
public string ACCOUNT { get; set; }
public string SALECORPID { get; set; }
public int? PRINTCOUNT { get; set; }
}
[Table("company")]
public class company_md
{

@ -49,7 +49,8 @@ namespace DSWeb.Common.DB
public DbSet<ch_fee_do_md> ch_fee_do { get; set; }
public DbSet<ch_fee_payapplication_md> ch_fee_payapplication { get; set; }
public DbSet<ch_fee_recvapplication_md> ch_fee_recvapplication { get; set; }
public DbSet<company_md> company { get; set; }

@ -16,6 +16,8 @@ using DSWeb.Areas.CommMng.DAL;
using DSWeb.Areas.Account.Models.ChfeeDetail;
using DSWeb.MvcShipping.DAL.MsSysParamSet;
using DSWeb.MvcShipping.DAL.MsBaseInfoDAL;
using DSWeb.Common.DB;
using System.Linq;
namespace DSWeb.Areas.Account.DAL.Chfee_Recvapplication
{
@ -1196,10 +1198,32 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Recvapplication
#region 提交审核和撤销审核
public static DBResult CanSubmit(string bill)
{
var result = new DBResult();
var cdc = new CommonDataContext();
var head = cdc.ch_fee_recvapplication.First(x => x.BILLNO == bill);
if (string.IsNullOrWhiteSpace(head.CURR))
{
result.SetErrorInfo("必须选择币别");
}
else {
result.OK();
}
return result;
}
public static DBResult SubmitAudit(String WorkFlowName, String USERID, String bill)
{
var result = new DBResult();
result = CanSubmit(bill);
if (!result.Success) return result;
Database db = DatabaseFactory.CreateDatabase();
using (var conn = db.CreateConnection())
{
@ -1209,7 +1233,6 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Recvapplication
try
{
var cmdupdate = db.GetSqlStringCommand("update ch_fee_recvapplication set BILLSTATUS=2 where BILLNO=@BILLNO");
@ -1247,6 +1270,13 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Recvapplication
var result = new DBResult();
var billList = bills.Split(',');
foreach (var bill in billList)
{
result = CanSubmit(bill);
if (!result.Success) return result;
}
Database db = DatabaseFactory.CreateDatabase();
using (var conn = db.CreateConnection())
{

@ -2995,16 +2995,16 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Settlement
}
var strSql = new StringBuilder();
strSql.Append("SELECT *" +
",AMOUNT-DOAMOUNT AS BALAMOUNT,AMOUNTOT-OTDOAMOUNT AS OTBALAMOUNT" +
",AMOUNT-DOAMOUNT AS BALAMOUNT,OTAMOUNT-OTDOAMOUNT AS OTBALAMOUNT" +
",USDAMOUNT-USDDOAMOUNT AS USDBALAMOUNT FROM " +
"(SELECT GID,BILLNO,BILLSTATUS,CUSTOMERNAME,CURR,CHEQUEPAYABLE,SETTLETYPE ");
strSql.Append(" ,PAYABLETIME,RATE,AMOUNTRMB AMOUNT,ISNULL(AMOUNTOT,0) OTAMOUNT,ISNULL(AMOUNTUSD,0) USDAMOUNT");//AMOUNT OTAMOUNT USDAMOUNT
strSql.Append(" ,APPLICANT,APPLYTIME,ENTERTIME,SETTLEUSER,SETTLETIME ");
strSql.Append(",(select STLNAME from [code_stlmode] where STLCODE=cm.SETTLETYPE) as SETTLETYPEREF");
strSql.Append(" ,REMARK,COMPANYID,SALECORPID,(select [NAME] from [company] where GID=cm.SALECORPID) as SALECORP ");
strSql.Append(",(select SUM(CASE FEETYPE WHEN 1 THEN -DOAMOUNT ELSE DOAMOUNT END) from ch_fee_do where CURRENCY='RMB' AND BILLNO=cm.BILLNO) as DOAMOUNT ");
strSql.Append(",(select SUM(CASE FEETYPE WHEN 1 THEN -DOAMOUNT ELSE DOAMOUNT END) from ch_fee_do where CURRENCY='USD' AND BILLNO=cm.BILLNO) as USDDOAMOUNT ");
strSql.Append(",(select SUM(CASE FEETYPE WHEN 1 THEN -DOAMOUNT ELSE DOAMOUNT END) from ch_fee_do where CURRENCY<>'USD' and CURRENCY<>'RMB' AND BILLNO=cm.BILLNO) as OTDOAMOUNT ");
strSql.Append(",isnull((select SUM(CASE FEETYPE WHEN 1 THEN -DOAMOUNT ELSE DOAMOUNT END) from ch_fee_do where CURRENCY='RMB' AND BILLNO=cm.BILLNO),0) as DOAMOUNT ");
strSql.Append(",isnull((select SUM(CASE FEETYPE WHEN 1 THEN -DOAMOUNT ELSE DOAMOUNT END) from ch_fee_do where CURRENCY='USD' AND BILLNO=cm.BILLNO),0) as USDDOAMOUNT ");
strSql.Append(",isnull((select SUM(CASE FEETYPE WHEN 1 THEN -DOAMOUNT ELSE DOAMOUNT END) from ch_fee_do where CURRENCY<>'USD' and CURRENCY<>'RMB' AND BILLNO=cm.BILLNO),0) as OTDOAMOUNT ");
strSql.Append(",(select EnumValueName from tSysEnumValue where LangId=0 and EnumTypeID=97005 and EnumValueID=cm.BILLSTATUS) as BILLSTATUSREF");
strSql.Append(",(select ShowName from [user] where GID=cm.APPLICANT) as APPLICANTNAME");
strSql.Append(",CUSTACCOUNTGID");
@ -3977,10 +3977,13 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Settlement
strSql.Append(" SELECT GID,BILLNO,BILLSTATUS,CUSTOMERNAME,CURR,INVOICETITLE,SETTLETYPE ");
strSql.Append(" ,RECVTIME,AMOUNTRMB,RATE,AMOUNTUSD,SETTLERMB,SETTLEUSD,SETTLERATE");
strSql.Append(" ,APPLICANT,APPLYTIME,ENTERTIME,SETTLEUSER,SETTLETIME,AUDITUSER,AUDITTIME ");
strSql.Append(" ,REMARK,COMPANYID,INVOICENUMREMARK ");
strSql.Append(",(select SUM(CASE FEETYPE WHEN 2 THEN -DOAMOUNT ELSE DOAMOUNT END) from ch_fee_do where CURRENCY='RMB' AND BILLNO=cm.BILLNO) as RMBDOAMOUNT ");
strSql.Append(",(select SUM(CASE FEETYPE WHEN 2 THEN -DOAMOUNT ELSE DOAMOUNT END) from ch_fee_do where CURRENCY='USD' AND BILLNO=cm.BILLNO) as USDDOAMOUNT ");
strSql.Append(",isnull((select SUM(CASE FEETYPE WHEN 2 THEN -DOAMOUNT ELSE DOAMOUNT END) from ch_fee_do where CURRENCY='RMB' AND BILLNO=cm.BILLNO),0) as RMBDOAMOUNT ");
strSql.Append(",isnull((select SUM(CASE FEETYPE WHEN 2 THEN -DOAMOUNT ELSE DOAMOUNT END) from ch_fee_do where CURRENCY='USD' AND BILLNO=cm.BILLNO),0) as USDDOAMOUNT ");
strSql.Append(",(select EnumValueName from tSysEnumValue where LangId=0 and EnumTypeID=97005 and EnumValueID=cm.BILLSTATUS) as BILLSTATUSREF");
strSql.Append(",(select ShowName from [user] where GID=cm.APPLICANT) as APPLICANTNAME");
strSql.Append(",cm.SALECORPID,(select [NAME] from [company] where GID=cm.SALECORPID) as SALECORP");
@ -4022,6 +4025,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Settlement
data.AMOUNT = Convert.ToDecimal(reader["AMOUNTRMB"]);
if (reader["AMOUNTUSD"] != DBNull.Value)
data.USDAMOUNT = Convert.ToDecimal(reader["AMOUNTUSD"]);
if (reader["RMBDOAMOUNT"] != DBNull.Value)
data.DOAMOUNT = Convert.ToDecimal(reader["RMBDOAMOUNT"]);
if (reader["USDDOAMOUNT"] != DBNull.Value)
@ -4032,6 +4036,19 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Settlement
data.USDBALAMOUNT = data.USDAMOUNT - data.USDDOAMOUNT;
data.USDSTLAMOUNT = data.USDAMOUNT - data.USDDOAMOUNT;
if (data.CURR != "RMB" && data.CURR != "USD")
{
data.OTAMOUNT = data.USDAMOUNT;
data.OTDOAMOUNT = data.USDDOAMOUNT;
data.OTBALAMOUNT = data.USDBALAMOUNT;
data.OTSTLAMOUNT = data.USDSTLAMOUNT;
data.USDAMOUNT = 0;
data.USDDOAMOUNT = 0;
data.USDBALAMOUNT = 0;
data.USDSTLAMOUNT = 0;
}
data.APPLICANT = Convert.ToString(reader["APPLICANT"]);
data.APPLICANTNAME = Convert.ToString(reader["APPLICANTNAME"]);
if (reader["APPLYTIME"] != DBNull.Value)

@ -26,6 +26,12 @@ namespace DSWeb.Areas.Account.Models.Chfee_Settlement
private decimal _usddoamount = 0;
private decimal _usdstlamount = 0;
private decimal _usdbalamount = 0;
private decimal _otamount = 0;
private decimal _otdoamount = 0;
private decimal _otstlamount = 0;
private decimal _otbalamount = 0;
private decimal _exchangerate = 0;
private string _applicant;//
private string _applicantname;//
@ -146,25 +152,25 @@ namespace DSWeb.Areas.Account.Models.Chfee_Settlement
public decimal OTAMOUNT
{
get { return _usdamount; }
set { _usdamount = value; }
get { return _otamount; }
set { _otamount = value; }
}
public decimal OTDOAMOUNT
{
get { return _usddoamount; }
set { _usddoamount = value; }
get { return _otdoamount; }
set { _otdoamount = value; }
}
public decimal OTSTLAMOUNT
{
get { return _usdstlamount; }
set { _usdstlamount = value; }
get { return _otstlamount; }
set { _otstlamount = value; }
}
public decimal OTBALAMOUNT
{
get { return _usdbalamount; }
set { _usdbalamount = value; }
get { return _otbalamount; }
set { _otbalamount = value; }
}
public decimal EXCHANGERATE
{

@ -359,7 +359,13 @@ Ext.define('Payapplication_do_detail', {
{ name: 'USDAMOUNT', type: 'number' },
{ name: 'USDDOAMOUNT', type: 'number' },
{ name: 'USDBALAMOUNT', type: 'number' },
{ name: 'USDSTLAMOUNT', type: 'number' },
{ name: 'USDSTLAMOUNT', type: 'number' },
{ name: 'OTAMOUNT', type: 'number' },
{ name: 'OTDOAMOUNT', type: 'number' },
{ name: 'OTBALAMOUNT', type: 'number' },
{ name: 'OTSTLAMOUNT', type: 'number' },
{ name: 'ORIGCURRENCY', type: 'string' },
{ name: 'ORIGAMOUNT', type: 'number' },
{ name: 'EXCHANGERATE', type: 'number' },

@ -886,6 +886,11 @@ Ext.extend(Shipping.MsChRecvAppSettlementEdit, Ext.Panel, {
dataIndex: 'CUSTOMERNAME',
header: Zi.LAN.CustomerName,
width: 80
}, {
sortable: true,
dataIndex: 'CURR',
header: Zi.LAN.Currency,
width: 60
}, {
sortable: true,
dataIndex: 'AMOUNT',
@ -1073,7 +1078,92 @@ Ext.extend(Shipping.MsChRecvAppSettlementEdit, Ext.Panel, {
return value;
},
width: 100
}, {
}, {
sortable: true,
dataIndex: 'OTAMOUNT',
header: Zi.LAN.OTApplyMoney,
width: 100,
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;
}
return value;
}
}, {
sortable: true,
dataIndex: 'OTBALAMOUNT',
header: Zi.LAN.OTBalaMount,
width: 100,
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;
}
return value;
}
}, {
sortable: true,
dataIndex: 'OTSTLAMOUNT',
header: Zi.LAN.OTStlaMount,
editor: {
xtype: 'numberfield',
keyNavEnabled: false,
allowDecimals: true,
decimalPrecision: 2,
selectOnFocus: true,
mouseWheelEnabled: false,
enableKeyEvents: true,
listeners: {
keydown: function (textfield, e) {
if (e.getKey() == 40) {
_this.onNextKeyClick(8)
} else if (e.getKey() == 38) {
_this.onUpKeyClick(8)
}
}
}
},
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;
}
return value;
},
width: 100
}, {
sortable: true,
dataIndex: 'APPLYTIME',
header: Zi.LAN.ApplyTime,
@ -4260,7 +4350,7 @@ Ext.extend(Shipping.MsChRecvAppSettlementEdit, Ext.Panel, {
//#endregion
//
onSubmitAuditClick: function () {
var Duino = this.formEdit.getForm().findField('BILLNO').getValue();

@ -4,7 +4,7 @@
<ProjectView>ShowAllFiles</ProjectView>
<NameOfLastUsedPublishProfile>配置文件1</NameOfLastUsedPublishProfile>
<UseIISExpress>true</UseIISExpress>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<Use64BitIISExpress />
<IISExpressSSLPort />
<IISExpressAnonymousAuthentication />

Loading…
Cancel
Save