DS7_HYRD
hanxuntao 1 year ago
parent ce3dc0504f
commit d9efa450b5

@ -22,6 +22,9 @@ using DSWeb.MvcShipping.DAL.ChMonthCloseDAL;
using static DSWeb.Areas.CommMng.Controllers.DSWEBAPPInterfaceController;
using System.IO;
using System.Text;
using DSWeb.MvcShipping.DAL.MsCodeDingTalkSet;
using DSWeb.Areas.Dispatch.Helper;
using DSWeb.MvcShipping.DAL.MsCompanysDAL;
namespace DSWeb.Areas.Account.Controllers
{
@ -583,6 +586,30 @@ namespace DSWeb.Areas.Account.Controllers
DBResult resultbl = Chfee_AuditDAL.SubmitAuditBL(Convert.ToString(Session["USERID"]), Convert.ToString(Session["SHOWNAME"]), billlist, true, "", "", Convert.ToString(Session["COMPANYID"]), SUBMITFEEBLFEELOCK.PARAMVALUE);
if (resultbl.Success) {
var DingTalkSet = MsCodeDingTalkSetDAL.GetData("(MODULENAME='整票费用审核')", Convert.ToString(Session["COMPANYID"]));
if (DingTalkSet != null && DingTalkSet.ISENABLE)
{
var DingTalkSetDetail = MsCodeDingTalkSetDAL.GetBodyList("MODULEID='" + DingTalkSet.GID + "'");
foreach (var bill in billlist)
{
var bodyList = JsonConvert.Deserialize<List<MsChFee>>(feebody);
long deptid = 0;
if (!string.IsNullOrEmpty(bill.SALECORP))
{
var company = MsCompanysDAL.GetNoPicData("GID='" + bill.SALECORP + "'");
if (!string.IsNullOrEmpty(company.DTALKDEPTID)) deptid = Convert.ToInt64(company.DTALKDEPTID);
}
var result2 = DingTalkHelper.Send_Audit(DingTalkSet, DingTalkSetDetail,bill.BSNO, bill, ModelObjectConvert<MsChFee>.ToModelObjectList(bodyList), Convert.ToString(Session["USERID"]), deptid);
}
}
}
var jsonbl = JsonConvert.Serialize(resultbl);
return new ContentResult() { Content = jsonbl };

@ -365,6 +365,42 @@ namespace DSWeb.MvcShipping.DAL.Chfee_AuditDAL
}
return SetBillData(strSql);
}
static public List<MsOpBill> GetBillAllDataList(string strCondition)
{
var strSql = new StringBuilder();
//if (all == true)
strSql.Append("SELECT ");
//else
// strSql.Append("SELECT TOP 100 ");
strSql.Append(" BSNO,PARENTID,OPLB,OPLBNAME,BSSTATUS,FEESTATUS,ACCDATE,MBLNO,HBLNO,CUSTNO,CUSTOMNO,BSTYPE,OPTYPE,ORDERNO,CREATETIME,BLTYPE ");
strSql.Append(",CUSTOMERNAME,INVNO,BillFeeStatus,BILLFEESTATUSTIME");
strSql.Append(",VESSEL,VOYNO,ETD,PORTLOAD,PLACERECEIPT,DESTINATION ");
strSql.Append(",PORTDISCHARGE,INPUTBY,OP,CUSTSERVICE,GOODSNAME");
strSql.Append(",DOC,SALE,ENTERP,BSSOURCE,BSSOURCEDETAIL,CUSTOMSNUM,CNTRTOTAL,PKGS,CBM,KGS,BSCUSTOMNO,REMARK,TRADETERM,REASON,BLFRT");
strSql.Append(",(CASE BSSTATUS WHEN 1 THEN '锁定' else '未锁定' end) as BSSTATUSREF");
strSql.Append(",(CASE FEESTATUS WHEN 1 THEN '锁定' else '未锁定' end) as FEESTATUSREF");
strSql.Append(",dbo.F_GetBillDrFeeStatus(v_op_bill.BSNO) DRFEESTATUS");
strSql.Append(",dbo.F_GetBillCrFeeStatus(v_op_bill.BSNO) CRFEESTATUS");
strSql.Append(",(SELECT TOP 1 STATUS+' '+ CONVERT(varchar(100),COMPTIME, 20) FROM OP_STATUS WHERE BSNO=v_op_bill.BSNO AND STTYPE='2' ORDER BY COMPTIME DESC,INPUTTIME DESC) as OPSTATUS ");
strSql.Append(",(SELECT TOP 1 COMMISSIONRATE FROM V_Client_ACCDATE WHERE SHORTNAME=v_op_bill.CUSTOMERNAME ORDER BY BGNDATE DESC) as COMMISSIONRATE ");
strSql.Append(",CARRIER,YARD,FORWARDER,CONTRACTNO,ISSUETYPE,SERVICE,REMARK2,CARGOID,DCLASS ");
strSql.Append(",SALEDEPT,(select [NAME] from [company] where GID=v_op_bill.SALECORPID) as SALECORP,'' BILLFEEOP ");//
strSql.Append(" from v_op_bill ");
if (!string.IsNullOrEmpty(strCondition))
{
strSql.Append(" where " + strCondition);
}
return SetBillData(strSql);
}
static public string GetBillDataListStr(string strCondition, string userid, string username, string companyid, string sort = null, bool all = false)
{

@ -29,6 +29,7 @@ using System.Configuration;
using System.Security.Cryptography;
using DSWeb.MvcShipping.DAL.MsCompanysDAL;
using DSWeb.MvcShipping.DAL.MsChFeeDAL;
using DSWeb.MvcShipping.DAL.MsInfoClient;
namespace DSWeb.Areas.Account.DAL.Chfee_Invoice
{
@ -198,7 +199,41 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoice
return strSql.ToString();
}
static public ChInvoice GetData(string condition)
{
var strSql = new StringBuilder();
strSql.Append(" SELECT GID,INVOICENO,BILLNO,CUSTOMERNAME,ACTUALCUSTOMERNAME,INVOICECUSTNAME,INVOICEMAKETIME,BANK,ACCOUNT,BSNO,VESSELVOYAGE,ETD,POL,POD");
strSql.Append(" ,FEEITEM,AMOUNT,INVAMOUNT,AMOUNTCAPITAL,OTCURRAMOUNT,CURRENCY,REMARK,APPLYTIME,OPERATOR,LICENSECODE,TAXCODE,INVOICETYPE,BILLSTATUS");
strSql.Append(" ,ISNEEDPRINT,ISNEEDFEE,OPERATETIME,MBLNO,EXCHANGERATE,PRINTCAPITAL,PRINTAMOUNT,PRINTTITLE,COMPANYID,VOUCHERNO ");
strSql.Append(" ,CUSTRATENO,CUSTADDRTEL,CUSTBANK,INVOICECATEGORY,ISDELETE,DELETEOPERATOR,DELETETIME,RECVCURR ");
strSql.Append(",(select EnumValueName from tSysEnumValue where LangId=0 and EnumTypeID=97008 and EnumValueID=cm.INVOICECATEGORY) as INVOICECATEGORYREF");
strSql.Append(",(select EnumValueName from tSysEnumValue where LangId=0 and EnumTypeID=97009 and EnumValueID=cm.INVOICETYPE) as INVOICETYPEREF");
strSql.Append(",(case cm.billstatus when 1 then '已锁定' else '未锁定' end) as BILLSTATUSREF");
strSql.Append(",(select ShowName from [user] where GID=cm.OPERATOR) as OPERATORNAME");
strSql.Append(",CREATEUSER,(select ShowName from [user] where GID=cm.CREATEUSER) as CREATEUSERREF,CREATETIME");
strSql.Append(",(select ShowName from [user] where GID=cm.DELETEOPERATOR) as DELOPERATORNAME");
strSql.Append(",dbo.GetFeeNoStlByInvNo(cm.BILLNO) as NOSTL,FEEAMOUNT,VOUNO,DZSTATUS");
strSql.Append(", INVSHENNO=stuff ((SELECT distinct BILLNO+',' FROM ch_fee_invoiceapplication p WHERE p.INVBILLNO=cm.BILLNO FOR xml path('')), 1, 0, '')");
strSql.Append(",(select top 1 (select ShowName from [user] where GID=ap.applicant) APPLICANT from ch_fee_invoiceapplication ap where invbillno=cm.BILLNO) APPLICANT");
strSql.Append(",(select top 1 (select DEPTNAME from [VW_user] where userid=ap.applicant) APPLICANTDEPT from ch_fee_invoiceapplication ap where invbillno=cm.BILLNO) APPLICANTDEPT");
strSql.Append(",SALECORPID,(select [NAME] from [company] where GID=cm.SALECORPID) as SALECORP");
strSql.Append(",(select sum(TAX) from ch_fee_invoicedetail where PID=cm.GID) as TAX");
strSql.Append(",PTORRED,SETRED,INVAMOUNT-(select sum(TAX) from ch_fee_invoicedetail where PID=cm.GID) NOTAXAMOUNT");
strSql.Append(" FROM ch_fee_invoice cm where 1=1 ");
if (!string.IsNullOrEmpty(condition))
{
strSql.Append(" and " + condition);
}
strSql.Append(" order by CURRENCY,OPERATETIME DESC");
var list = SetData(strSql);
if (list.Count > 0)
return list[0];
return new ChInvoice();
}
static public ChInvoice GetData(string condition, string userid = "", string usercode = "", string orgcode = "")
{
var list = GetDataList(0,1,condition,userid,usercode,orgcode,"");
@ -4042,7 +4077,21 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoice
return result;
}
public static string GetInvTempSubStr(string html, string startstr, string endstr)
{
var subhtml = html;
var htmllength = subhtml.Length;
var startindex = subhtml.IndexOf(startstr);
//if (startindex == -1 || startindex == 0) return "";
if (startindex == -1) return "";
subhtml = subhtml.Substring(startindex + startstr.Length - 1);
var endindex = subhtml.IndexOf(endstr);
if (endindex != -1 && endindex != 0)
subhtml = subhtml.Substring(0, endindex + 1);
return subhtml;
}
public static DBResult GetRemarksData(List<Chfee_do_detail> bodyList, string companyid, string billno, string templatename = "",string invdate="", bool isapp = false)
{
var result = new DBResult();
@ -4099,28 +4148,35 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoice
}
var CUSTBANK = "";
var ACCOUNT = "";
var CUSTNAME = "";
if (isapp)
{
var head2 = ChinvoiceapplicationDAL.GetData("BILLNO='" + billno + "'");
CUSTBANK = head2.CUSTBANK;
CUSTNAME = head2.CUSTOMERNAME;
}
else {
var head = GetData("BILLNO='" + billno + "'");
CUSTBANK = head.CUSTBANK;
ACCOUNT = head.ACCOUNT;
CUSTNAME = head.CUSTOMERNAME;
}
decimal rmbttl = 0;
decimal usdttl = 0;
decimal Allrmbttl = 0;
decimal Allusdttl = 0;
var str = templatestr;
var str = GetInvTempSubStr(templatestr,"《", "》");
var strl = "";
if (!string.IsNullOrEmpty(str))
{
templatestr = templatestr.Replace(str, "《明细数据》");
str = str.Replace("《", "");
str = str.Replace("》", "");
str = str.Replace("\r\n", "\\");
str = str.Replace("\n", "\\");
str = str.Replace("\r", " ");
}
string[] StrList = str.Split('\\');
@ -4164,8 +4220,6 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoice
str = StrList[i];
if (str.IndexOf("[购方银行]") < 0 && str.IndexOf("[购方账号]") < 0 && str.IndexOf("[销方银行]") < 0 && str.IndexOf("[外币金额(总计)]") < 0 && str.IndexOf("[人民币金额(总计)]") < 0 && str.IndexOf("[折算汇率(总计)]") < 0)
{
str = str.Replace("[委托编号]", enumValue.CUSTNO);
str = str.Replace("[主提单号]", enumValue.MBLNO);
str = str.Replace("[分提单号]", enumValue.HBLNO);
@ -4200,7 +4254,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoice
if (strl == "") strl = str +" ";
else strl = strl + str +" ";
}
}
//rmbttl = rmbttl + enumValue.AMOUNT;
//if (enumValue.ORIGCURRENCY != "RMB")
@ -4208,44 +4262,89 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoice
}
}
for (var i = 0; i <= StrList.Length - 1; i++)
{
str = StrList[i];
if (str.IndexOf("[购方银行]") >= 0 || str.IndexOf("[购方账号]") >= 0 || str.IndexOf("[销方银行]") >= 0 || str.IndexOf("[外币金额(总计)]") >=0|| str.IndexOf("[人民币金额(总计)]") >= 0 && str.IndexOf("[折算汇率(总计)]") >= 0)
{
str = str.Replace("[委托编号]", "");
str = str.Replace("[主提单号]", "");
str = str.Replace("[委托单位]", "");
str = str.Replace("[开船日期]", "");
str = str.Replace("[订舱编号]", "");
str = str.Replace("[揽货人]", "");
str = str.Replace("[船名]", "");
str = str.Replace("[航次]", "");
str = str.Replace("[装货港]", "");
str = str.Replace("[卸货港]", "");
str = str.Replace("[目的港]", "");
str = str.Replace("[外币金额]", "");
str = str.Replace("[人民币金额]", "");
str = str.Replace("[折算汇率]", "");
str = str.Replace("[购方银行]", custbank);
str = str.Replace("[购方账号]", custaccount);
str = str.Replace("[销方银行]", ACCOUNT);
str = str.Replace("[外币金额(总计)]", Allusdttl.ToString("#0.00"));
str = str.Replace("[人民币金额(总计)]", Allrmbttl.ToString("#0.00"));
//for (var i = 0; i <= StrList.Length - 1; i++)
//{
// str = StrList[i];
// if (str.IndexOf("[购方银行]") >= 0 || str.IndexOf("[购方账号]") >= 0 || str.IndexOf("[销方银行]") >= 0 || str.IndexOf("[外币金额(总计)]") >=0|| str.IndexOf("[人民币金额(总计)]") >= 0 && str.IndexOf("[折算汇率(总计)]") >= 0)
// {
// str = str.Replace("[委托编号]", "");
// str = str.Replace("[主提单号]", "");
// str = str.Replace("[委托单位]", "");
// str = str.Replace("[开船日期]", "");
// str = str.Replace("[订舱编号]", "");
// str = str.Replace("[揽货人]", "");
// str = str.Replace("[船名]", "");
// str = str.Replace("[航次]", "");
// str = str.Replace("[装货港]", "");
// str = str.Replace("[卸货港]", "");
// str = str.Replace("[目的港]", "");
// str = str.Replace("[外币金额]", "");
// str = str.Replace("[人民币金额]", "");
// str = str.Replace("[折算汇率]", "");
// str = str.Replace("[购方银行]", custbank);
// str = str.Replace("[购方账号]", custaccount);
// str = str.Replace("[销方银行]", ACCOUNT);
// str = str.Replace("[外币金额(总计)]", Allusdttl.ToString("#0.00"));
// str = str.Replace("[人民币金额(总计)]", Allrmbttl.ToString("#0.00"));
// //if (dsUserOp != null)
// // str = str.Replace("[折算汇率(总计)]", dsUserOp.Tables[0].Rows[0]["EXCHANGERATE"].ToString().Trim());
// //else
// // str = str.Replace("[折算汇率(总计)]", "");
// str = str.Replace("[折算汇率(总计)]", exrate);
// if (str.Trim() != "")
// strl = strl + str + " ";
// }
//}
templatestr = templatestr.Replace("《明细数据》", strl);
templatestr = templatestr.Replace("[购方银行]", custbank);
templatestr = templatestr.Replace("[购方账号]", custaccount);
templatestr = templatestr.Replace("[销方银行]", ACCOUNT);
templatestr = templatestr.Replace("[外币金额(总计)]", Allusdttl.ToString("#0.00"));
templatestr = templatestr.Replace("[人民币金额(总计)]", Allrmbttl.ToString("#0.00"));
//if (dsUserOp != null)
// str = str.Replace("[折算汇率(总计)]", dsUserOp.Tables[0].Rows[0]["EXCHANGERATE"].ToString().Trim());
//else
// str = str.Replace("[折算汇率(总计)]", "");
str = str.Replace("[折算汇率(总计)]", exrate);
if (str.Trim() != "")
strl = strl + str + " ";
templatestr = templatestr.Replace("[折算汇率(总计)]", exrate);
var BANKLIST = MsInfoClientDAL.GetBankList(" LINKID in (select GID FROM info_client where SHORTNAME='" + CUSTNAME + "')");
var isusd = false;
var isrmb = false;
if (BANKLIST != null && BANKLIST.Count != 0)
{
foreach (var bank in BANKLIST)
{
if (!isusd && bank.CURRENCY == "USD")
{
templatestr = templatestr.Replace("[购方USD银行]", bank.BANKNAME);
templatestr = templatestr.Replace("[购方USD账号]", bank.ACCOUNT);
isusd = true;
}
if (!isrmb && bank.CURRENCY == "RMB")
{
templatestr = templatestr.Replace("[购方RMB银行]", bank.BANKNAME);
templatestr = templatestr.Replace("[购方RMB账号]", bank.ACCOUNT);
isrmb = true;
}
}
}
if (!isusd)
{
templatestr = templatestr.Replace("[购方USD银行]", "");
templatestr = templatestr.Replace("[购方USD账号]", "");
}
if (!isrmb)
{
templatestr = templatestr.Replace("[购方RMB银行]", "");
templatestr = templatestr.Replace("[购方RMB账号]", "");
isrmb = true;
}
result.Data = result.Data + strl;
result.Data = result.Data + templatestr;
tran.Commit();
}

@ -9,7 +9,7 @@ namespace DSWeb.Areas.Account.Models.MsOpBill
{
[JsonObject]
public class MsOpBill : ModelObjectBillBody
public class MsOpBill : ModelObjectBillHead
{
#region 私有成员
private string _BSNO = "";//业务编号

@ -1036,7 +1036,7 @@ Ext.extend(Shipping.MsChInvoicehexiaoIndex, Ext.Panel, {
sql = sql + getAndConSql(sql, INVOICECATEGORY, "INVOICECATEGORY=" + INVOICECATEGORY);
var CustomNo = form.findField('CustomNo').getValue();
sql = sql + getAndConSql(sql, CustomNo, "BILLNO IN (SELECT BILLNO FROM CH_FEE_DO WHERE BSNO IN (SELECT BSNO FROM V_OP_BILL b WHERE b.CUSTNO like '%" + CustomNo + "%' or b.MBLNO like '%" + CustomNo + "%' or b.HBLNO like '%" + CustomNo + "%' or b.CUSTOMNO like '%" + CustomNo + "%' or b.ORDERNO like '%" + CustomNo + "%'))");
sql = sql + getAndConSql(sql, CustomNo, "BILLNO IN (SELECT BILLNO FROM CH_FEE_DO_INVOICE WHERE BSNO IN (SELECT BSNO FROM V_OP_BILL b WHERE b.CUSTNO like '%" + CustomNo + "%' or b.MBLNO like '%" + CustomNo + "%' or b.HBLNO like '%" + CustomNo + "%' or b.CUSTOMNO like '%" + CustomNo + "%' or b.ORDERNO like '%" + CustomNo + "%'))");

@ -394,7 +394,7 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
this.comboxInvNo = Ext.create('DsExt.ux.RefTableCombox', {
store: this.StoreInvNo,
fieldLabel: '发票号',
allowBlank: false,
//allowBlank: false,
flex: 2,
name: 'INVOICENO',
valueField: 'INVNO',
@ -4631,6 +4631,14 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
StoreFieldName.add({ "OPLBNAME": "外币金额(总计)" });
StoreFieldName.add({ "OPLBNAME": "人民币金额(总计)" });
StoreFieldName.add({ "OPLBNAME": "折算汇率(总计)" });
StoreFieldName.add({ "OPLBNAME": "购方银行" });
StoreFieldName.add({ "OPLBNAME": "购方账号" });
StoreFieldName.add({ "OPLBNAME": "销方银行" });
StoreFieldName.add({ "OPLBNAME": "购方USD银行" });
StoreFieldName.add({ "OPLBNAME": "购方USD账号" });
StoreFieldName.add({ "OPLBNAME": "购方RMB银行" });
StoreFieldName.add({ "OPLBNAME": "购方RMB账号" });
var gridField = new Ext.grid.GridPanel({
store: StoreFieldName,
@ -4729,6 +4737,9 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
anchor: '100%'
},
items: [{
xtype: 'label',
html: "<font color='red'>注意:请将明细部分用 《》 圈起来 例如:《[主提单号] [船名]》</font>"
},{
xtype: 'textareafield',
grow: true,
height: 300,

@ -5578,6 +5578,9 @@ Ext.extend(Shipping.MsChInvoiceBLEdit, Ext.Panel, {
anchor: '100%'
},
items: [{
xtype: 'label',
html: "<font color='red'>注意:请将明细部分用 《》 圈起来 例如:《[主提单号] [船名]》</font>"
},{
xtype: 'textareafield',
grow: true,
height: 300,

@ -5852,6 +5852,10 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
StoreFieldName.add({ "OPLBNAME": "购方银行" });
StoreFieldName.add({ "OPLBNAME": "购方账号" });
StoreFieldName.add({ "OPLBNAME": "销方银行" });
StoreFieldName.add({ "OPLBNAME": "购方USD银行" });
StoreFieldName.add({ "OPLBNAME": "购方USD账号" });
StoreFieldName.add({ "OPLBNAME": "购方RMB银行" });
StoreFieldName.add({ "OPLBNAME": "购方RMB账号" });
var gridField = new Ext.grid.GridPanel({
store: StoreFieldName,
@ -5950,7 +5954,10 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, {
defaults: {
anchor: '100%'
},
items: [{
items: [
{xtype: 'label',
html: "<font color='red'>注意:请将明细部分用 《》 圈起来 例如:《[主提单号] [船名]》</font>"
},{
xtype: 'textareafield',
grow: true,
height: 300,

@ -6949,6 +6949,10 @@ Ext.extend(Shipping.MsChInvoiceBLEdit, Ext.Panel, {
StoreFieldName.add({ "OPLBNAME": "购方银行" });
StoreFieldName.add({ "OPLBNAME": "购方账号" });
StoreFieldName.add({ "OPLBNAME": "销方银行" });
StoreFieldName.add({ "OPLBNAME": "购方USD银行" });
StoreFieldName.add({ "OPLBNAME": "购方USD账号" });
StoreFieldName.add({ "OPLBNAME": "购方RMB银行" });
StoreFieldName.add({ "OPLBNAME": "购方RMB账号" });
var gridField = new Ext.grid.GridPanel({
store: StoreFieldName,
@ -7050,6 +7054,9 @@ Ext.extend(Shipping.MsChInvoiceBLEdit, Ext.Panel, {
anchor: '100%'
},
items: [{
xtype: 'label',
html: "<font color='red'>注意:请将明细部分用 《》 圈起来 例如:《[主提单号] [船名]》</font>"
},{
xtype: 'textareafield',
grow: true,
height: 300,

@ -376,6 +376,7 @@ Ext.extend(Shipping.MsChInvoiceapplicationIndex, Ext.Panel, {
});
this.storeAPPLICANT.load();
this.comboxAPPLICANT = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '申请人',
store: this.storeAPPLICANT,
forceSelection: true,
name: 'APPLICANT',

@ -168,6 +168,11 @@ Ext.extend(Shipping.MsChRecvapplicationIndex, Ext.Panel, {
dataIndex: 'REMARK',
header: '备注',
width: 160
}, {
sortable: true,
dataIndex: 'SALECORP',
header:'所属分部', //驳回原因
width: 80
}
];

@ -27,6 +27,7 @@ Ext.extend(Shipping.MsChPayInvSettlementEdit, Ext.Panel, {
this.sortdire = '';
this.MsPeriod = null;
this.ISRATESET = 0;
this.sqlcontext = '';
this.storeMustBe = Ext.create('Ext.data.Store', {
model: 'DsShipping.ux.OpDefValue',
@ -1225,7 +1226,7 @@ Ext.extend(Shipping.MsChPayInvSettlementEdit, Ext.Panel, {
this.comboxCurr2 = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.Currency,
store: this.StoreCurr,
flex: 0.5,
//flex: 0.5,
labelWidth: 40,
forceSelection: true,
name: 'Currency',
@ -1349,6 +1350,21 @@ Ext.extend(Shipping.MsChPayInvSettlementEdit, Ext.Panel, {
}
}
}, {
xtype: 'button',
width: 90,
text: Zi.LAN.SearchOrRefresh,
iconCls: "btnrefresh",
handler: function (button, event) {
this.onRefreshClick();
},
scope: this
}
]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.InvHead,
//xtype: 'datefield',
name: 'InvHead',
@ -1360,13 +1376,44 @@ Ext.extend(Shipping.MsChPayInvSettlementEdit, Ext.Panel, {
}
}
}
}, this.comboxSALECORPID, {
}, {
fieldLabel: Zi.LAN.InvoiceNumber,
//xtype: 'datefield',
name: 'InvNo',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, this.comboxSALECORPID, { xtype: 'hiddenfield' }, { xtype: 'hiddenfield' }, { xtype: 'hiddenfield' }, {
xtype: 'button',
width: 90,
text: Zi.LAN.SearchOrRefresh,
iconCls: "btnrefresh",
width: 45,
text: "",
iconCls: "btnreset",
handler: function (button, event) {
this.onRefreshClick();
this.onClearSql(button, event);
},
scope: this
}, {
xtype: 'button',
width: 45,
text: "",
iconCls: "btnmore",
handler: function (button, event) {
var sql = this.getCondition();
var winAccess = new Shipping.DsQuery({
});
winAccess.StoreList = this.storeList;
winAccess.formname = this.formname;
winAccess.condition = sql;
winAccess.show();
return;
},
scope: this
}
@ -4189,9 +4236,13 @@ Ext.extend(Shipping.MsChPayInvSettlementEdit, Ext.Panel, {
onRefreshClick: function (button, event) {
var sql = this.getCondition();
this.sqlcontext = sql;
this.storeAddFeeList.load({ params: { start: 0, limit: this.PageSize, sort: '', condition: sql} });
},
onDsQuery: function (button, event) {
var sql = this.sqlcontext;
this.storeAddFeeList.load({ params: { start: 0, limit: this.PageSize, sort: '', condition: sql } });
},
onInitRefreshClick: function (button, event) {
var sql =" 1=2 ";
this.storeAddFeeList.load({ params: { start: 0, limit: this.PageSize, sort: '', condition: sql} });
@ -4217,7 +4268,8 @@ Ext.extend(Shipping.MsChPayInvSettlementEdit, Ext.Panel, {
var INVNO = form.findField('InvNo').getValue();
sql = sql + getAndConSql(sql, INVNO, " INVNO='" + INVNO + "'");
var CUSTNAME = form.findField('CUSTNAME').getValue();

@ -36,6 +36,8 @@ using DSWeb.MvcShipping.Models.DingTalkSet;
using HcUtility.Core;
using DSWeb.MvcShipping.DAL.MsCodeDingTalkSet;
using DSWeb.Areas.Account.DAL.Chfee_Payapplication;
using DSWeb.MvcShipping.DAL.Chfee_AuditDAL;
using DSWeb.Areas.MvcShipping.DAL;
namespace DSWeb.Areas.Dispatch.Helper
{
@ -180,7 +182,7 @@ namespace DSWeb.Areas.Dispatch.Helper
{
return result;
}
if (DingTalkSet.MODULENAME == "付款申请") {
if (DingTalkSet.MODULENAME == "付款申请"|| DingTalkSet.MODULENAME == "付费申请") {
var lv = BasicDataRefDAL.GetLogicHaveValue("钉钉审批", "instanceId", DingCallBackInfo.processInstanceId);
if (lv != null && lv.ContainsKey("instanceId"))
@ -213,6 +215,43 @@ namespace DSWeb.Areas.Dispatch.Helper
}
}else
if (DingTalkSet.MODULENAME == "整票费用审核")
{
var lv = BasicDataRefDAL.GetLogicHaveValue("钉钉审批", "instanceId", DingCallBackInfo.processInstanceId);
if (lv != null && lv.ContainsKey("instanceId"))
{
var BILLNO = lv["BSNO"];
if (DingCallBackInfo.EventType == "bpms_instance_change" && DingCallBackInfo.result == "agree" && DingCallBackInfo.type == "finish")
{
BasicDataRefDAL.SaveLog("BLAuditList" + BILLNO, "admin", "钉钉回调", "bpms_instance_change");
var billlist = Chfee_AuditDAL.GetBillAllDataList("MASTERNO='" + BILLNO + "'");
var WorkFlowID = WorkFlowDAL.GetBSNOWorkFlowID("BLFeeAudit", BILLNO)[0].GID;
var RECEIVER = WorkFlowDAL.GetAuditor(WorkFlowID, "1");
if (RECEIVER != null && RECEIVER.Count != 0)
{
result = Chfee_AuditDAL.AuditListBL(RECEIVER[0].GID, billlist,"");
}
}
else if (DingCallBackInfo.type == "finish" && DingCallBackInfo.result == "refuse")
{
BasicDataRefDAL.SaveLog("AuditBLBackList" + BILLNO, "admin", "钉钉回调", "bpms_instance_change");
var billlist = Chfee_AuditDAL.GetBillAllDataList("MASTERNO='" + BILLNO + "'");
var WorkFlowID = WorkFlowDAL.GetBSNOWorkFlowID("BLFeeAudit", BILLNO)[0].GID;
var RECEIVER = WorkFlowDAL.GetAuditor(WorkFlowID, "1");
if (RECEIVER != null && RECEIVER.Count != 0)
{
result = Chfee_AuditDAL.AuditBackBL(RECEIVER[0].GID, billlist,"","", "");
}
}
}
}
return result;

@ -1202,7 +1202,7 @@ Ext.extend(Shipping.MsOpSeaeAmendIndex, Ext.Panel, {
}
}
}
}, this.comboxOP, this.comboxSALE, {
}, this.comboxOP, {
xtype: 'button',
width: 90,
text: Zi.LAN.btnrefresh, //"执行查询",
@ -1211,7 +1211,62 @@ Ext.extend(Shipping.MsOpSeaeAmendIndex, Ext.Panel, {
this.onRefreshClick(button, event);
},
scope: this
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.CREATETIME2, //'开船日期',
format: 'Y-m-d',
xtype: 'datefield',
name: 'CREATETIMEBGN',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
fieldLabel: Zi.LAN.CREATETIME2, //'到',
format: 'Y-m-d',
xtype: 'datefield',
name: 'CREATETIMEEND',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
fieldLabel: Zi.LAN.ACCDATE, //'开船日期',
xtype: 'monthfield',
name: 'ACCDATEbgn',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
fieldLabel: Zi.LAN.ACCDATE, //'到',
xtype: 'monthfield',
name: 'ACCDATEend',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, this.comboxSALE, {
xtype: 'button',
width: 90,
text: Zi.LAN.btnmore, //"高级查询",
@ -1308,7 +1363,7 @@ Ext.extend(Shipping.MsOpSeaeAmendIndex, Ext.Panel, {
this.panelTop = new Ext.Panel({
layout: "border",
region: "north",
height: 75,
height: 115,
items: [this.panelBtn, this.formSearch]
});
@ -1550,6 +1605,18 @@ Ext.extend(Shipping.MsOpSeaeAmendIndex, Ext.Panel, {
var ETDend = form.findField('ETDend').getRawValue();
sql = sql + getAndConSql(sql, ETDend, "B.ETD <='" + ETDend + "'");
this.strbetd = ' 开船日期:' + ETDbgn + '至' + ETDend;
//到港日期
var ACCDATEbgn = form.findField('ACCDATEbgn').getRawValue();
sql = sql + getAndConSql(sql, ACCDATEbgn, "B.ACCDATE >='" + ACCDATEbgn + "'");
var ACCDATEend = form.findField('ACCDATEend').getRawValue();
sql = sql + getAndConSql(sql, ACCDATEend, "B.ACCDATE <='" + ACCDATEend + "'");
//到港日期
var CREATETIMEBGN = form.findField('CREATETIMEBGN').getRawValue();
sql = sql + getAndConSql(sql, CREATETIMEBGN, "B.CREATETIME >='" + CREATETIMEBGN + "'");
var CREATETIMEEND = form.findField('CREATETIMEEND').getRawValue();
sql = sql + getAndConSql(sql, CREATETIMEEND, "B.CREATETIME <='" + CREATETIMEEND + " 23:59:59'");
//操作人
var OP = form.findField('OP').getValue();

@ -8368,11 +8368,6 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, {
name: 'CARRIER',
inputValue: Zi.LAN.CARRIER_LianDai, //'联代',
checked: false
}, {
boxLabel: '中联运通', //'中海',
name: 'CARRIER',
inputValue: '中联运通', //'中海',
checked: false
}, {
boxLabel: Zi.LAN.CARRIER_ZhongChuang, //'中创',
name: 'CARRIER',
@ -12511,11 +12506,6 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, {
name: 'CARRIER',
inputValue: Zi.LAN.CARRIER_LianDai, //'联代',
checked: false
}, {
boxLabel: '中联运通', //'中海',
name: 'CARRIER',
inputValue: '中联运通', //'中海',
checked: false
}, {
boxLabel: Zi.LAN.CARRIER_ZhongChuang, //'中创',
name: 'CARRIER',

@ -1458,7 +1458,12 @@ Ext.extend(Shipping.MsUserAuthorityIndex, Ext.Panel, {
params: { PARENTID: '0', USERID: _this.SELECTUSERID, AUTHORITYID: _this.AUTHORITYID },
waitMsg: "正在刷新数据...",
timeout: 6000000, //60秒
scope: this
scope: this,
callback: function (r, options, success) {
if (success) {
_this.tabtree_OPERATE.expandAll();
}
}
});
}
if (rtype == "VS") {
@ -1466,7 +1471,12 @@ Ext.extend(Shipping.MsUserAuthorityIndex, Ext.Panel, {
params: { PARENTID: '0', USERID: _this.SELECTUSERID, AUTHORITYID: _this.AUTHORITYID },
waitMsg: "正在刷新数据...",
timeout: 6000000, //60秒
scope: this
scope: this,
callback: function (r, options, success) {
if (success) {
_this.tabtree_VISIBLE.expandAll();
}
}
});
}
@ -1516,7 +1526,12 @@ Ext.extend(Shipping.MsUserAuthorityIndex, Ext.Panel, {
params: { PARENTID: '0', USERID: _this.SELECTUSERID, AUTHORITYID: _this.AUTHORITYID },
waitMsg: "正在刷新数据...",
timeout: 6000000, //60秒
scope: this
scope: this,
callback: function (r, options, success) {
if (success) {
_this.tabtree_OPERATE.expandAll();
}
}
});
}
if (rtype == "VS") {
@ -1524,7 +1539,12 @@ Ext.extend(Shipping.MsUserAuthorityIndex, Ext.Panel, {
params: { PARENTID: '0', USERID: _this.SELECTUSERID, AUTHORITYID: _this.AUTHORITYID },
waitMsg: "正在刷新数据...",
timeout: 6000000, //60秒
scope: this
scope: this,
callback: function (r, options, success) {
if (success) {
_this.tabtree_VISIBLE.expandAll();
}
}
});
}

@ -26,7 +26,7 @@ namespace JobCreateFee
{
var clientlist = CreateClientList(dbcon);
var strSql = new StringBuilder();
strSql.Append("select * from t_ch_project_new where 方案状态='审核通过' AND 结束日期>=GETDATE() order by 方案名称 ");
strSql.Append("select * from t_ch_project_new WITH (NOLOCK) where 方案状态='审核通过' AND 结束日期>=GETDATE() order by 方案名称 ");
SqlCommand cmd = new SqlCommand();
@ -48,7 +48,7 @@ namespace JobCreateFee
var strSqlBs = new StringBuilder();
strSqlBs.Clear();
strSqlBs.Append("select B.编号,B.方案名称,B.主提单号,B.委托单位,B.船公司,B.货代公司,B.报关行,B.船代,B.场站,B.代理,B.发货人,B.收货人,B.通知人,B.第三方付费,B.其他相关公司,B.承运车队,B.预抵日期 ");
strSqlBs.Append(",B.操作员,B.销售部门 from t_op_seae B where ISNULL(B.是否占舱,'')<>'Y' And B.预抵日期>='" + enumFeeproject.ETDFR + "' and B.预抵日期<'"+ enumFeeproject.ETDTO + "' ");
strSqlBs.Append(",B.操作员,B.销售部门 from t_op_seae B WITH (NOLOCK) where ISNULL(B.是否占舱,'')<>'Y' And B.预抵日期>='" + enumFeeproject.ETDFR + "' and B.预抵日期<'"+ enumFeeproject.ETDTO + "' ");
if (querySql != "")
strSqlBs.Append(querySql);
@ -151,7 +151,7 @@ namespace JobCreateFee
{
var headList = new List<MsClient>();
var strSql = new StringBuilder();
strSql.Append("SELECT 客户简称,客户全称,客商编码 from t_crm_client ");
strSql.Append("SELECT 客户简称,客户全称,客商编码 from t_crm_client WITH (NOLOCK) ");
SqlDataAdapter adapter = new SqlDataAdapter(strSql.ToString(), dbcon);
DataTable table = new DataTable();
adapter.Fill(table);
@ -183,7 +183,8 @@ namespace JobCreateFee
// var usdexrate = GetUsdExrate(dbcon,enumValue.ETD);
try
{
if ( enumValue.DLFA.IndexOf(feeProject.FADESCRIP) < 0)
var FANAME = GetOpSeaeFAStr(dbcon,enumValue.BSNO);
if (FANAME.IndexOf(feeProject.FADESCRIP) < 0)
{
log.Debug($"{enumValue.MBLNO}开始生成费用,方案:{feeProject.FADESCRIP}--{DateTime.Now.ToString()}");
var FeeUnitList = GetFeeUnit(enumValue.BSNO, dbcon);
@ -327,7 +328,7 @@ namespace JobCreateFee
var headList = new List<MsChFee>();
var strSql = new StringBuilder();
strSql.Append("SELECT *");
strSql.Append(" from t_ch_project_Condition where 方案代码=" + FA_ID);
strSql.Append(" from t_ch_project_Condition WITH (NOLOCK) where 方案代码=" + FA_ID);
SqlDataAdapter adapter = new SqlDataAdapter(strSql.ToString(), dbcon);
DataTable table = new DataTable();
adapter.Fill(table);
@ -348,7 +349,7 @@ namespace JobCreateFee
var headList = new List<MsChFee>();
var strSql = new StringBuilder();
strSql.Append("SELECT * ");
strSql.Append(" from t_ch_project_fee_new where 方案代码=" + FA_ID);
strSql.Append(" from t_ch_project_fee_new WITH (NOLOCK) where 方案代码=" + FA_ID);
strSql.Append(" order by 顺序,DE_ID");
SqlDataAdapter adapter = new SqlDataAdapter(strSql.ToString(), dbcon);
@ -393,7 +394,7 @@ namespace JobCreateFee
var headList = new List<MsChFee>();
var strSql = new StringBuilder();
strSql.Append("SELECT * ");
strSql.Append(" from t_ch_project_standard_new where DE_ID=" + DE_ID);
strSql.Append(" from t_ch_project_standard_new WITH (NOLOCK) where DE_ID=" + DE_ID);
SqlDataAdapter adapter = new SqlDataAdapter(strSql.ToString(), dbcon);
DataTable table = new DataTable();
@ -425,7 +426,7 @@ namespace JobCreateFee
var headList = new List<MsChFee>();
var strSql = new StringBuilder();
strSql.Append("SELECT * ");
strSql.Append(" from t_ch_fee where 编号='" + BSNO + "'");
strSql.Append(" from t_ch_fee WITH (NOLOCK) where 编号='" + BSNO + "'");
SqlDataAdapter adapter = new SqlDataAdapter(strSql.ToString(), dbcon);
DataTable table = new DataTable();
@ -474,10 +475,10 @@ namespace JobCreateFee
strSql.Append("SELECT '1' as NO,件数 PKGS,重量 KGS,尺码 CBM,重量 AS NETWEIGHT,0 AS FEEKGS,");
strSql.Append("'' as CTNALL,0 AS CTNNUM,0 AS TEU ");
strSql.Append(",isnull((select sum(数量) from t_op_ctn where 编号=t_op_seae.编号),0) 总箱数 ");
strSql.Append(",isnull((select sum(数量) from t_op_ctn WITH (NOLOCK) where 编号=t_op_seae.编号),0) 总箱数 ");
// strSql.Append(",isnull((select sum(ctnrCount) from t_op_txxp_log where 编号=t_op_seae.编号),0)-isnull((select sum(数量) from t_op_ctn where 编号=t_op_seae.编号),0) 超额小票数 ");
strSql.Append(" from t_op_seae ");
strSql.Append(" from t_op_seae WITH (NOLOCK) ");
strSql.Append(" where 编号='"+BSNO+"'");
strSql.Append(") AS T ");
@ -485,7 +486,7 @@ namespace JobCreateFee
strSql.Append(" union ");
strSql.Append("SELECT '2' AS NO,0 AS PKGS,0 AS KGS,0 AS CBM,0 AS NETWEIGHT,0 AS FEEKGS,");
strSql.Append("P.表现形式 CTNALL,SUM(P.数量) AS CTNNUM,SUM(P.TEU) AS TEU");
strSql.Append(" from t_op_ctn P ");
strSql.Append(" from t_op_ctn P WITH (NOLOCK) ");
strSql.Append(" where p.编号='"+BSNO+"'");
strSql.Append(" GROUP BY P.表现形式 order by PKGS desc");
@ -589,7 +590,7 @@ namespace JobCreateFee
{
decimal usdexrate = 0;
var strSql = new StringBuilder();
strSql.Append("select 汇率 from t_code_usdexrate where 开始日期<='"+ etd + "' and 结束日期>='"+ etd + "'");
strSql.Append("select 汇率 from t_code_usdexrate WITH (NOLOCK) where 开始日期<='" + etd + "' and 结束日期>='"+ etd + "'");
SqlDataAdapter adapter = new SqlDataAdapter(strSql.ToString(), dbcon);
DataTable table = new DataTable();
adapter.Fill(table);
@ -618,7 +619,24 @@ namespace JobCreateFee
return usdexrate;
}
static public string GetOpSeaeFAStr(SqlConnection dbcon, string bsno)
{
string FANAME="";
var strSql = new StringBuilder();
strSql.Append("select 方案名称 from t_op_seae WITH (NOLOCK) where 编号='" + bsno + "'");
SqlDataAdapter adapter = new SqlDataAdapter(strSql.ToString(), dbcon);
DataTable table = new DataTable();
adapter.Fill(table);
if (table.Rows.Count > 0)
{
foreach (DataRow row in table.Rows)
{
FANAME = Convert.ToString(row["方案名称"].ToString());
}
}
return FANAME;
}
}
}

Loading…
Cancel
Save