DS7_JinGang
hanxuntao 1 year ago
parent 27a951c708
commit 7e9e2d2336

@ -693,11 +693,30 @@ namespace DSWeb.Areas.Account.Controllers
public ContentResult Lock(string bill, string remark,string billtype="0")
{
var headData = ChsettlementDAL.GetData("BILLNO='" + bill + "'");
var errstr = "";
if (headData.AMOUNTRMB != 0 || headData.AMOUNTUSD != 0)
{
if (headData.ACCOUNTS_MONEY == 0 && headData.AHSR_MONEY == 0 && headData.PREPAY_MONEY == 0 && headData.FINANCIAL_MONEY == 0 && headData.ADVANCE_MONEY == 0)
{
errstr = errstr + " 预收付信息有错误不允许锁定!";
}
}
if (!string.IsNullOrEmpty(errstr))
{
var result2 = new DBResult();
result2.Success = false;
result2.Message = errstr;
var json2 = JsonConvert.Serialize(result2);
return new ContentResult() { Content = json2 };
}
DBResult result = ChsettlementDAL.Lock(bill,remark);
if (result.Success) {
if (billtype == "2") {
var headData = ChsettlementDAL.GetData("BILLNO='"+ bill + "'");
if (!string.IsNullOrEmpty(headData.INVOICENO) || !string.IsNullOrEmpty(headData.INVOICEDATE) || !string.IsNullOrEmpty(headData.INVOICEAMOUNT))
{
T_ALL_DA T_ALL_DA = new T_ALL_DA();
@ -746,6 +765,26 @@ namespace DSWeb.Areas.Account.Controllers
public ContentResult LockListNew(string data)
{
var headList = JsonConvert.Deserialize<List<ChSettlement>>(data);
var errstr = "";
foreach (var bill in headList)
{
if (bill.AMOUNTRMB != 0 || bill.AMOUNTUSD != 0) {
if (bill.ACCOUNTS_MONEY == 0 && bill.AHSR_MONEY == 0 && bill.PREPAY_MONEY == 0 && bill.FINANCIAL_MONEY == 0 && bill.ADVANCE_MONEY == 0) {
errstr = errstr + " 单号:" + bill.BILLNO + " 预收付信息有错误";
}
}
}
if (!string.IsNullOrEmpty(errstr)) {
var result2 = new DBResult();
result2.Success = false;
result2.Message = errstr+" 不能锁定";
var json2 = JsonConvert.Serialize(result2);
return new ContentResult() { Content = json2 };
}
DBResult result = ChsettlementDAL.LockListNew(headList);
var json = JsonConvert.Serialize(result);

@ -1223,7 +1223,7 @@ Ext.extend(Shipping.MsChRecvsettlementIndex, Ext.Panel, {
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.SelectBillFirst, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var bodyAddDatas = [];
var BILLNOStr = '';
for (var i = 0; i < selections.length; i++) {
var rec = selections[i];
@ -1235,6 +1235,7 @@ Ext.extend(Shipping.MsChRecvsettlementIndex, Ext.Panel, {
BILLNOStr = BILLNOStr + ',' + BILLNO;
}
bodyAddDatas.push(rec);
}
}
@ -1245,11 +1246,12 @@ Ext.extend(Shipping.MsChRecvsettlementIndex, Ext.Panel, {
if (BILLNOStr == '') {
} else {
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
Ext.Ajax.request({
waitMsg: Zi.LAN.Msg_Adding,
url: '/Account/Chfee_settlement/LockList',
url: '/Account/Chfee_settlement/LockListNew',
params: {
bills: BILLNOStr
data: jsonbodyAddDatas
},
callback: function (options, success, response) {
if (success) {

Loading…
Cancel
Save