DS7_JinGang
hanxuntao 1 year ago
parent 077721f4fb
commit 98122f4d3f

@ -487,7 +487,7 @@ namespace DSWeb.MvcShipping.Controllers
{
result = modb.Save(bodyData);
MsOpLetterDAL.SaveTruckCtn(bodyData, bodyctnData);
MsOpLetterDAL.SaveTruckCtn(bodyData.LE_ID, bodyctnData);
T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA();
string sql_update = "UPDATE [op_task] SET [TASKTITLE]='箱型箱量:" + bodyData.CTNS + "|重量:" + Convert.ToString(bodyData.KGS) + "|工厂:" + bodyData.FACTRYNAME + " ' ";
if (bodyData.FACTRYTIME != "") sql_update = sql_update + ",TASKBEGINDATE='" + bodyData.FACTRYTIME + "'";
@ -569,7 +569,7 @@ namespace DSWeb.MvcShipping.Controllers
if (result.Success == true)
{
result = modb.Save(bodyData);
MsOpLetterDAL.SaveTruckCtn(bodyData, bodyctnData);
MsOpLetterDAL.SaveTruckCtn(bodyData.LE_ID, bodyctnData);
if (result.Success)
{
@ -721,7 +721,7 @@ namespace DSWeb.MvcShipping.Controllers
if (result.Success == true)
{
result = modb.Save(bodyData);
MsOpLetterDAL.SaveTruckCtn(bodyData, bodyctn1);
MsOpLetterDAL.SaveTruckCtn(bodyData.LE_ID, bodyctn1);
string sql_update = "UPDATE [op_task] SET [TASKTITLE]='箱型箱量:" + bodyData.CTNS + "|重量:" + Convert.ToString(bodyData.KGS) + "|工厂:" + bodyData.FACTRYNAME + " ' ";
sql_update = sql_update + " WHERE TASKNO='" + ble_id + "'";
bool blZ = T_ALL_DA.GetExecuteSqlCommand(sql_update);
@ -771,7 +771,7 @@ namespace DSWeb.MvcShipping.Controllers
if (result.Success == true)
{
result = modb.Save(bodyData);
MsOpLetterDAL.SaveTruckCtn(bodyData, bodyctn2);
MsOpLetterDAL.SaveTruckCtn(bodyData.LE_ID, bodyctn2);
if (result.Success)
{
@ -842,7 +842,7 @@ namespace DSWeb.MvcShipping.Controllers
if (result.Success == true)
{
result = modb.Save(bodyData);
MsOpLetterDAL.SaveTruckCtn(bodyData, bodyctnData);
MsOpLetterDAL.SaveTruckCtn(bodyData.LE_ID, bodyctnData);
if (result.Success)
{
if (bodyData.TRUCKFEE != "0")
@ -908,7 +908,7 @@ namespace DSWeb.MvcShipping.Controllers
if (result.Success == true)
{
result = modb.Save(bodyData);
MsOpLetterDAL.SaveTruckCtn(bodyData, bodyctnData);
MsOpLetterDAL.SaveTruckCtn(bodyData.LE_ID, bodyctnData);
if (result.Success)
{
//if (bodyData.TRUCKFEE == "1")
@ -980,7 +980,7 @@ namespace DSWeb.MvcShipping.Controllers
if (result.Success == true)
{
result = modb.Save(bodyData);
MsOpLetterDAL.SaveTruckCtn(bodyData, bodyctnData);
MsOpLetterDAL.SaveTruckCtn(bodyData.LE_ID, bodyctnData);
if (result.Success)
{
T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA();
@ -2033,7 +2033,7 @@ namespace DSWeb.MvcShipping.Controllers
bodyctn1.Add(Data);
}
MsOpLetterDAL.SaveTruckCtn(bodyData, bodyctn1);
MsOpLetterDAL.SaveTruckCtn(bodyData.LE_ID, bodyctn1);
}

@ -2075,7 +2075,7 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeDAL
}
if (lan == "en-us")
{
dataot.CURR = "TTL";
datattl.CURR = "TTL";
}
else
datattl.CURR = "合计";
@ -4079,14 +4079,16 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeDAL
if (lan == "en-us")
{
strSql.Append("Select FeeCode,Description Name,Description CodeAndName,DEFAULTCURR,DEFAULTDEBIT,DEFAULTCREDIT,feetype,Description,DefaultUnit,FeeFRT,ISADVANCEDPAY,ISOPEN,ISINVOICE,TAXRATE ");
strSql.Append(",isnull(CASE DEFAULTDEBIT when 1 then 'CARRIER' when 2 then 'FORWARD' when 3 then 'YARD' when 4 then 'TRUCK' when 5 then 'CUSTOMERNAME' when 6 then 'CUSTOMSER' when 7 then 'AGENTID' when 8 then '航空公司' when 9 then 'SHIPPERID' when 10 then 'CONSIGNEEID' when 11 then 'NOTIFYPARTYID' when 12 then 'SHIPAGENCY' when 0 then '' end ,'') DEFAULTDEBITREF ");
strSql.Append(",isnull(CASE DEFAULTCREDIT when 1 then 'CARRIER' when 2 then 'FORWARD' when 3 then 'YARD' when 4 then 'TRUCK' when 5 then 'CUSTOMERNAME' when 6 then 'CUSTOMSER' when 7 then 'AGENTID' when 8 then '航空公司' when 9 then 'SHIPPERID' when 10 then 'CONSIGNEEID' when 11 then 'NOTIFYPARTYID' when 12 then 'SHIPAGENCY' when 0 then '' end ,'') DEFAULTCREDITREF,FEEGROUP ");
}
else
{
strSql.Append("Select FeeCode,Name,FEECODE + '-' + NAME AS CodeAndName,DEFAULTCURR,DEFAULTDEBIT,DEFAULTCREDIT,feetype,Description,DefaultUnit,FeeFRT,ISADVANCEDPAY,ISOPEN,ISINVOICE,TAXRATE ");
strSql.Append(",isnull(CASE DEFAULTDEBIT when 1 then '船公司' when 2 then '订舱代理' when 3 then '场站' when 4 then '车队' when 5 then '委托单位' when 6 then '报关行' when 7 then '代理' when 8 then '航空公司' when 9 then '发货人' when 10 then '收货人' when 11 then '通知人' when 12 then '船代' when 0 then '其他' end ,'') DEFAULTDEBITREF ");
strSql.Append(",isnull(CASE DEFAULTCREDIT when 1 then '船公司' when 2 then '订舱代理' when 3 then '场站' when 4 then '车队' when 5 then '委托单位' when 6 then '报关行' when 7 then '代理' when 8 then '航空公司' when 9 then '发货人' when 10 then '收货人' when 11 then '通知人' when 12 then '船代' when 0 then '其他' end ,'') DEFAULTCREDITREF,FEEGROUP ");
}
strSql.Append(",isnull(CASE DEFAULTDEBIT when 1 then '船公司' when 2 then '订舱代理' when 3 then '场站' when 4 then '车队' when 5 then '委托单位' when 6 then '报关行' when 7 then '代理' when 8 then '航空公司' when 9 then '发货人' when 10 then '收货人' when 11 then '通知人' when 12 then '船代' when 0 then '其他' end ,'') DEFAULTDEBITREF ");
strSql.Append(",isnull(CASE DEFAULTCREDIT when 1 then '船公司' when 2 then '订舱代理' when 3 then '场站' when 4 then '车队' when 5 then '委托单位' when 6 then '报关行' when 7 then '代理' when 8 then '航空公司' when 9 then '发货人' when 10 then '收货人' when 11 then '通知人' when 12 then '船代' when 0 then '其他' end ,'') DEFAULTCREDITREF,FEEGROUP ");
strSql.Append(" from code_fee ");
if (!string.IsNullOrEmpty(sCondition))
{

@ -529,7 +529,7 @@ namespace DSWeb.Areas.MvcShipping.DAL
public static List<MsOpLetterTruckCtn> GetLetterCtnList(string strCondition)
{
var strSql = new StringBuilder();
strSql.Append("SELECT CTN_ID,LE_ID,CTNALL,CTNNUM,KGS from op_letter_yard_ctn");
strSql.Append("SELECT CTN_ID,LE_ID,CTNALL,CTNNUM,KGS,CNTRNO,SEALNO from op_letter_yard_ctn");
if (!string.IsNullOrEmpty(strCondition))
{
strSql.Append(" where " + strCondition);
@ -548,6 +548,8 @@ namespace DSWeb.Areas.MvcShipping.DAL
Data.CTNNUM = Convert.ToDecimal(reader["CTNNUM"]);
if (reader["KGS"] != DBNull.Value)
Data.KGS = Convert.ToDecimal(reader["KGS"]);
Data.CNTRNO = Convert.ToString(reader["CNTRNO"]);
Data.SEALNO = Convert.ToString(reader["SEALNO"]);
evList.Add(Data);
@ -559,7 +561,7 @@ namespace DSWeb.Areas.MvcShipping.DAL
}
public static DBResult SaveTruckCtn(MsOpLetterTruck headData, List<MsOpLetterTruckCtn> bodyList)
public static DBResult SaveTruckCtn(string LE_ID, List<MsOpLetterTruckCtn> bodyList)
{
var result = new DBResult();
Database db = DatabaseFactory.CreateDatabase();
@ -569,7 +571,7 @@ namespace DSWeb.Areas.MvcShipping.DAL
var tran = conn.BeginTransaction();
try
{
var cmddelete = db.GetSqlStringCommand(@"delete from op_letter_yard_ctn where LE_ID='" + headData.LE_ID + "'");
var cmddelete = db.GetSqlStringCommand(@"delete from op_letter_yard_ctn where LE_ID='" + LE_ID + "'");
db.ExecuteNonQuery(cmddelete, tran);
var cntr = "";
if (bodyList != null)
@ -579,7 +581,7 @@ namespace DSWeb.Areas.MvcShipping.DAL
//if (enumValue.LE_ID == "*"|| enumValue.LE_ID == "")
//{
var cmdInsert = db.GetSqlStringCommand(@"insert into op_letter_yard_ctn (CTN_ID,LE_ID,CTNNUM,CTNALL,KGS) values (newid(),'" + headData.LE_ID + "'," + enumValue.CTNNUM + ",'" + enumValue.CTNALL + "',"+enumValue.KGS+")");
var cmdInsert = db.GetSqlStringCommand(@"insert into op_letter_yard_ctn (CTN_ID,LE_ID,CTNNUM,CTNALL,KGS,CNTRNO,SEALNO) values (newid(),'" + LE_ID + "'," + enumValue.CTNNUM + ",'" + enumValue.CTNALL + "',"+enumValue.KGS+ ",'" + enumValue.CNTRNO + "','" + enumValue.SEALNO + "')");
db.ExecuteNonQuery(cmdInsert, tran);
//}
//else

@ -12,6 +12,7 @@ using DSWeb.EntityDA;
using System.Web;
using System.IO;
using DSWeb.Areas.CommMng.Models;
using DSWeb.MvcShipping.DAL.MsSysParamSet;
namespace DSWeb.MvcShipping.DAL.MsOpReceiptDAL
{
@ -887,7 +888,15 @@ namespace DSWeb.MvcShipping.DAL.MsOpReceiptDAL
public static DBResult UpdateFileData(string filename,string name,string BSNO, string userid,string type,string DOCUMENTATTACHEDCODE,string DOCUMENTATTACHEDNO,string CUSTNO,string MBLNO)
{
var result = new DBResult();
var opseabsno = "";
if (!string.IsNullOrEmpty(MBLNO)) {
var UPDOCTOSEAESAMEMBLNO = MsSysParamSetDAL.GetData("PARAMNAME='UPDOCTOSEAESAMEMBLNO'");
if (UPDOCTOSEAESAMEMBLNO.PARAMVALUE == "1") {
var head =MsOpSeaeDAL.MsOpSeaeDAL.GetData("MBLNO='" + MBLNO + "'");
opseabsno = head.BSNO;
}
}
Database db = DatabaseFactory.CreateDatabase();
using (var conn = db.CreateConnection())
@ -917,6 +926,22 @@ namespace DSWeb.MvcShipping.DAL.MsOpReceiptDAL
db.AddInParameter(cmdInsert, "@R_GID", DbType.String, CUSTNO);
db.ExecuteNonQuery(cmdInsert, tran);
if (!string.IsNullOrEmpty(opseabsno)) {
cmdInsert.Parameters.Clear();
db.AddInParameter(cmdInsert, "@GID", DbType.String, Guid.NewGuid().ToString());
db.AddInParameter(cmdInsert, "@BSNO", DbType.String, opseabsno);
db.AddInParameter(cmdInsert, "@URL", DbType.String, name);
db.AddInParameter(cmdInsert, "@Driect_URL", DbType.String, filename);
db.AddInParameter(cmdInsert, "@MODIFIEDUSER", DbType.String, userid);
db.AddInParameter(cmdInsert, "@MODIFIEDTIME", DbType.String, DateTime.Now.ToString());
db.AddInParameter(cmdInsert, "@RECEIPTTYPE", DbType.String, type);
db.AddInParameter(cmdInsert, "@DOCUMENTATTACHEDCODE", DbType.String, DOCUMENTATTACHEDCODE);
db.AddInParameter(cmdInsert, "@DOCUMENTATTACHEDNO", DbType.String, DOCUMENTATTACHEDNO);
db.AddInParameter(cmdInsert, "@R_GID", DbType.String, BSNO);
db.ExecuteNonQuery(cmdInsert, tran);
}
tran.Commit();
@ -941,7 +966,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpReceiptDAL
public static DBResult UpdateFileData(List<ReceiptDocmb> revdoc, string userid)
{
var result = new DBResult();
var UPDOCTOSEAESAMEMBLNO = MsSysParamSetDAL.GetData("PARAMNAME='UPDOCTOSEAESAMEMBLNO'");
Database db = DatabaseFactory.CreateDatabase();
using (var conn = db.CreateConnection())
@ -956,6 +981,11 @@ namespace DSWeb.MvcShipping.DAL.MsOpReceiptDAL
db.GetSqlStringCommand(
@"update Receipt_Doc set URL=@URL,Driect_URL=@Driect_URL,MODIFIEDUSER=@MODIFIEDUSER,MODIFIEDTIME=@MODIFIEDTIME,RECEIPTTYPE=@RECEIPTTYPE,DOCUMENTATTACHEDCODE=@DOCUMENTATTACHEDCODE,DOCUMENTATTACHEDNO=@DOCUMENTATTACHEDNO
,ISPUBLIC=@ISPUBLIC,BSNO=@BSNO WHERE GID=@GID ");
var cmdupdateopseae =
db.GetSqlStringCommand(
@"update Receipt_Doc set URL=@URL,Driect_URL=@Driect_URL,MODIFIEDUSER=@MODIFIEDUSER,MODIFIEDTIME=@MODIFIEDTIME,RECEIPTTYPE=@RECEIPTTYPE,DOCUMENTATTACHEDCODE=@DOCUMENTATTACHEDCODE,DOCUMENTATTACHEDNO=@DOCUMENTATTACHEDNO
,ISPUBLIC=@ISPUBLIC WHERE R_GID=@BSNO ");
if (revdoc != null)
{
foreach (var enumValue in revdoc)
@ -973,6 +1003,21 @@ namespace DSWeb.MvcShipping.DAL.MsOpReceiptDAL
db.AddInParameter(cmdInsert, "@ISPUBLIC", DbType.Boolean, enumValue.ISPUBLIC);
db.AddInParameter(cmdInsert, "@BSNO", DbType.String, enumValue.BSNO);
db.ExecuteNonQuery(cmdInsert, tran);
if (UPDOCTOSEAESAMEMBLNO.PARAMVALUE == "1")
{
cmdupdateopseae.Parameters.Clear();
db.AddInParameter(cmdupdateopseae, "@URL", DbType.String, enumValue.URL);
db.AddInParameter(cmdupdateopseae, "@Driect_URL", DbType.String, enumValue.Driect_URL);
db.AddInParameter(cmdupdateopseae, "@MODIFIEDUSER", DbType.String, userid);
db.AddInParameter(cmdupdateopseae, "@MODIFIEDTIME", DbType.String, DateTime.Now.ToString());
db.AddInParameter(cmdupdateopseae, "@RECEIPTTYPE", DbType.String, enumValue.RECEIPTTYPE);
db.AddInParameter(cmdupdateopseae, "@DOCUMENTATTACHEDCODE", DbType.String, enumValue.DOCUMENTATTACHEDCODE);
db.AddInParameter(cmdupdateopseae, "@DOCUMENTATTACHEDNO", DbType.String, enumValue.DOCUMENTATTACHEDNO);
db.AddInParameter(cmdupdateopseae, "@ISPUBLIC", DbType.Boolean, enumValue.ISPUBLIC);
db.AddInParameter(cmdupdateopseae, "@BSNO", DbType.String, enumValue.BSNO);
db.ExecuteNonQuery(cmdupdateopseae, tran);
}
}
}

@ -224,6 +224,10 @@ namespace DSWeb.MvcShipping.Models.MsOpLetter
get;
set;
}
[ModelDB]
public string CNTRNO { get; set; }
[ModelDB]
public string SEALNO { get; set; }
#endregion
public MsOpLetterTruckCtn()

@ -19,7 +19,7 @@
document.write('<script type=\"text/javascript\" src=\"../../../../Areas/MvcShipping/Viewsjs/MsOpLetter/Zi_zh-cn.js\"></sc' + 'ript>');
}
}
getSessgion6();
</script>
<script type="text/javascript" src="../../../../Areas/MvcShipping/Viewsjs/Comm/TimePickerField.js"></script>
<script type="text/javascript" src="../../../../Areas/MvcShipping/Viewsjs/Comm/DateTimePicker.js"></script>

@ -3032,11 +3032,12 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, {
if (value == '合计') {
return Zi.LAN.FEE.CustSum ;
}
}
}, {
sortable: true,
dataIndex: 'RMBDR',
header: LOCALCURR + '应收',
header: LOCALCURR + Zi.LAN.FEE.DRFEESTATUS ,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
@ -3061,7 +3062,7 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, {
}, {
sortable: true,
dataIndex: 'RMBCR',
header: LOCALCURR + '应付',
header: LOCALCURR + Zi.LAN.FEE.CRFEESTATUS ,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
@ -3086,7 +3087,7 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, {
}, {
sortable: true,
dataIndex: 'RMBPROFIT',
header: LOCALCURR + '利润',
header: LOCALCURR + Zi.LAN.FEE.ROFIT,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
if (value == "***") return value;
try {
@ -6556,7 +6557,7 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, {
var custtype = '';
if (type == 1)
custtype = '委托单位'
custtype = Zi.LAN.FEE.WEITUODANWEI
else {
custtype = '';
if (this.stroplb == 'op_truckbulk') custtype = '车队';
@ -6835,9 +6836,9 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, {
} else {
if (type == 1)
custtype = '委托单位'
custtype = Zi.LAN.FEE.WEITUODANWEI
else
custtype = '订舱代理'
custtype = Zi.LAN.FEE.DINGCANGDAILI
}
var records = DsStoreQueryBy(this.StoreCustType, 'CUSTTYPE', custtype);
@ -7178,9 +7179,9 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, {
} else {
if (type == 1)
custtype = '委托单位'
custtype = Zi.LAN.FEE.WEITUODANWEI
else
custtype = '订舱代理'
custtype = Zi.LAN.FEE.DINGCANGDAILI
}
var records = DsStoreQueryBy(this.StoreCustType, 'CUSTTYPE', custtype);
@ -10484,11 +10485,11 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, {
usddr = memberyf.data.NORATEDR;
usdcr = memberyf.data.NORATECR;
usdprofit = memberyf.data.PR;
} if (memberyf.data.CURR == '其他币别') {
} if (memberyf.data.CURR == '其他币别' || memberyf.data.CURR == 'OT CURR') {
otdr = memberyf.data.NORATEDR;
otcr = memberyf.data.NORATECR;
otprofit = memberyf.data.NORATEPR;
} if (memberyf.data.CURR == '合计') {
} if (memberyf.data.CURR == '合计' || memberyf.data.CURR == 'TTL') {
ttldr = memberyf.data.NORATEDR;
ttlcr = memberyf.data.NORATECR;
ttlprofit = memberyf.data.NORATEPR;
@ -10512,11 +10513,11 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, {
usddr = memberyf.data.DR;
usdcr = memberyf.data.CR;
usdprofit = memberyf.data.PR;
} if (memberyf.data.CURR == '其他币别') {
} if (memberyf.data.CURR == '其他币别' || memberyf.data.CURR == 'OT CURR') {
otdr = memberyf.data.DR;
otcr = memberyf.data.CR;
otprofit = memberyf.data.PR;
} if (memberyf.data.CURR == '合计') {
} if (memberyf.data.CURR == '合计' || memberyf.data.CURR == 'TTL') {
ttldr = memberyf.data.DR;
ttlcr = memberyf.data.CR;
ttlprofit = memberyf.data.PR;
@ -10545,7 +10546,7 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, {
}
if (usddr != 0 || usdcr != 0 || (usdprofit != 0 && usdprofit != "***")) {
if (usdprofit < 0) {
usdlb = "&nbsp&nbsp&nbsp" + Zi.LAN.FEE.USDDR + ": <font color='green'>" + returnfloat(usddr) + "</font> &nbsp&nbspU" + Zi.LAN.FEE.USDCR + ":<font color='green'>" + returnfloat(usdcr) + "</font> &nbsp&nbsp" + Zi.LAN.FEE.USDPROFIT+"<font color='red'>" + returnfloat(usdprofit) + "</font>&nbsp&nbsp&nbsp|";
usdlb = "&nbsp&nbsp&nbsp" + Zi.LAN.FEE.USDDR + ": <font color='green'>" + returnfloat(usddr) + "</font> &nbsp&nbsp" + Zi.LAN.FEE.USDCR + ":<font color='green'>" + returnfloat(usdcr) + "</font> &nbsp&nbsp" + Zi.LAN.FEE.USDPROFIT+"<font color='red'>" + returnfloat(usdprofit) + "</font>&nbsp&nbsp&nbsp|";
}else
usdlb = "&nbsp&nbsp&nbsp" + Zi.LAN.FEE.USDDR + ": <font color='green'>" + returnfloat(usddr) + "</font> &nbsp&nbsp" + Zi.LAN.FEE.USDCR + ":<font color='green'>" + returnfloat(usdcr) + "</font> &nbsp&nbsp" + Zi.LAN.FEE.USDPROFIT +"<font color='green'>" + returnfloat(usdprofit) + "</font>&nbsp&nbsp&nbsp|";

@ -7563,7 +7563,7 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, {
this.formscn = Ext.widget('form', {
region: 'north',
frame: true,
title: '舱单收发通',
title: Zi.LAN.cangdansftpage,
bodyPadding: 5,
layout: 'anchor',
trackResetOnLoad: true,

@ -21,10 +21,16 @@ Ext.extend(Shipping.MsOpStatusIndex, Ext.Panel, {
// var mainform = window.parent._this;
var mainform = window.parent.panelEdit;
this.EditRecord = mainform.editRecord;
this.stroplb = mainform.stroplb;
this.BsNo = this.EditRecord.get('BSNO');
if (mainform == undefined) {
mainform = window.parent._thisPc;
this.EditRecord = mainform.editRecord;
this.stroplb ='海运出口';
this.BsNo = this.EditRecord.get('gId');
} else {
this.EditRecord = mainform.editRecord;
this.stroplb = mainform.stroplb;
this.BsNo = this.EditRecord.get('BSNO');
}

@ -3,6 +3,7 @@
<script type="text/javascript" src="../../../../Areas/SoftMng/Viewsjs/SingleAudit/SingleModel.js"></script>
<script type="text/javascript" src="../../../../Areas/SoftMng/Viewsjs/SingleAudit/SingleIndex.js"></script>
<script type="text/javascript" src="../../../../Areas/SoftMng/Viewsjs/SingleAudit/Index.js"></script>
<script type="text/javascript" src="../../../../Areas/MvcShipping/Viewsjs/Comm/DsQuery.js"></script>
<script type="text/javascript">
var USERID;
var GID;

@ -253,6 +253,7 @@ Ext.extend(Shipping.SingleIndex, Ext.Panel, {
this.storeBillState.add({ "FSTATUS": "P", "NAME": "复核" });
this.storeBillState.add({ "FSTATUS": "L", "NAME": "已上传" });
this.storeBillState.add({ "FSTATUS": "R", "NAME": "驳回提交" });
this.storeBillState.add({ "FSTATUS": "", "NAME": "全部" });
this.comboxBillState = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '报关单状态',
@ -299,7 +300,29 @@ Ext.extend(Shipping.SingleIndex, Ext.Panel, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [this.comboxBillState,this.comboxCustCode,
items: [{
fieldLabel: '报关单号',
name: 'PS_CUSTOMNO',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
fieldLabel: '主提单号',
name: 'PS_MBLNO',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
},this.comboxBillState,this.comboxCustCode,
this.comboxTransType,
{
fieldLabel: '录入日期(从)',
@ -410,6 +433,23 @@ Ext.extend(Shipping.SingleIndex, Ext.Panel, {
}],
scope: this
}, {
xtype: 'button',
width: 90,
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
}
]
});
@ -460,6 +500,18 @@ Ext.extend(Shipping.SingleIndex, Ext.Panel, {
});
},
onDsQuery: function () {
//var girdcolums = this.gridList.getColumnMode();
var sql = this.sqlcontext;
//this.PageSize = this.Pagenum.getValue();
//this.storeList.pageSize = this.PageSize;
this.storeList.load({
params: { start: 0, limit: this.PageSize, sort: '', condition: sql },
waitMsg: "正在查询数据...",
scope: this
});
},
getCondition: function () {
var form = this.formSearch.getForm();
if (!form.isValid()) {
@ -482,6 +534,12 @@ Ext.extend(Shipping.SingleIndex, Ext.Panel, {
if (CUSTOMERNAME != '' && CUSTOMERNAME != null) {
sql = sql + getAndConSql(sql, CUSTOMERNAME, " o.CUSTOMERNAME like '%" + CUSTOMERNAME + "%'");
}
var PS_MBLNO = form.findField('PS_MBLNO').getValue();
sql = sql + getAndConSql(sql, PS_MBLNO, " o.MBLNO like '%" + PS_MBLNO + "%'");
var PS_CUSTOMNO = form.findField('PS_CUSTOMNO').getValue();
sql = sql + getAndConSql(sql, PS_CUSTOMNO, " o.CUSTOMNO like '%" + PS_CUSTOMNO + "%'");
var DATEFROM = form.findField('DateFrom').getRawValue();
sql = sql + getAndConSql(sql, DATEFROM, " d.PDate >= '" + DATEFROM + "'");

@ -137,11 +137,11 @@ namespace DSWeb.Areas.TruckMng.Controllers
}
public ContentResult SaveWFSD(string opstatus, string data)
public ContentResult SaveWFSD(string opstatus, string data,string ctnbody)
{
var headData = JsonConvert.Deserialize<MsWlPcHead_WFSDEdit>(data);
//var fixBodyList = JsonConvert.Deserialize<List<MsWlPcFixed>>(fixbody);
var bodyctnData = JsonConvert.Deserialize<List<MsOpLetterTruckCtn>>(ctnbody);
//var fixBodyDelList = JsonConvert.Deserialize<List<MsWlPcFixed>>(fixdelbody);
var isPost = true;
@ -209,7 +209,7 @@ namespace DSWeb.Areas.TruckMng.Controllers
DBResult result = modb.Save(headData);
if (result.Success == true) {
// MsWlPcDAL.SaveDetail(BSNO, fixBodyList, CookieConfig.GetCookie_UserId(Request));
MsOpLetterDAL.SaveTruckCtn(headData.gId, bodyctnData); // MsWlPcDAL.SaveDetail(BSNO, fixBodyList, CookieConfig.GetCookie_UserId(Request));
}
else
{

@ -548,7 +548,10 @@ namespace DSWeb.Areas.TruckMng.DAL.MsRptPcHeadEdit
strSql.Append(" ,ContainerType,LinkTel,YardName,LinkManSe,LinkTelSe,RtnYardName,BsType,CustName,CustLikeManName,CustTel,ChangedReson,DispatchName,RoadFee,FactoryAddr,ContainerNo,SealNo");
strSql.Append(",dbo.F_GetBillDrFeeStatus(t.GId) DRFEESTATUS");
strSql.Append(",dbo.F_GetBillCrFeeStatus(t.GId) CRFEESTATUS");
strSql.Append(",t.SALECORPID,(select [NAME] from [company] where GID=t.SALECORPID) as SALECORP");
strSql.Append(",(SELECT TOP 1 STATUS FROM V_OP_STATUS WITH (NOLOCK) WHERE BSNO=t.GId ORDER BY COMPTIME DESC,INPUTTIME DESC) as OPSTATUS");
strSql.Append(",(select TOP 1 COLOR FROM code_op_status_detail WITH (NOLOCK) WHERE OPSTATUS = (CASE WHEN (SELECT TOP 1 [STATUS] FROM V_OP_STATUS WHERE BSNO=t.GId ORDER BY COMPTIME DESC,INPUTTIME DESC) is null THEN '接受委托' else (SELECT TOP 1[STATUS] FROM V_OP_STATUS WHERE BSNO =t.GId ORDER BY COMPTIME DESC, INPUTTIME DESC) end))AS COLOR");
strSql.Append(",t.SALECORPID,(select [NAME] from [company] where GID=t.SALECORPID) as SALECORP,DCLASS,DUNNO");
strSql.Append(" ,INVOICENO,KINDPKGS,CUSTNO,SalesName,GoodsName,PORTLOAD,DESTINATION,RtnDocStatus,RtnDocTime,ACCDATE,(CASE FEESTATUS WHEN 1 THEN '锁定' else '未锁定' end) as FEESTATUSREF from tMsWlPcHead t ");
if (!string.IsNullOrEmpty(strCondition))
@ -596,7 +599,10 @@ namespace DSWeb.Areas.TruckMng.DAL.MsRptPcHeadEdit
strSql.Append(" ,ContainerType,LinkTel,YardName,LinkManSe,LinkTelSe,RtnYardName,BsType,CustName,CustLikeManName,CustTel,ChangedReson,DispatchName,RoadFee,FactoryAddr,ContainerNo,SealNo");
strSql.Append(",dbo.F_GetBillDrFeeStatus(t.GId) DRFEESTATUS");
strSql.Append(",dbo.F_GetBillCrFeeStatus(t.GId) CRFEESTATUS");
strSql.Append(",t.SALECORPID,(select [NAME] from [company] where GID=t.SALECORPID) as SALECORP");
strSql.Append(",(SELECT TOP 1 STATUS FROM V_OP_STATUS WITH (NOLOCK) WHERE BSNO=t.GId ORDER BY COMPTIME DESC,INPUTTIME DESC) as OPSTATUS");
strSql.Append(",(select TOP 1 COLOR FROM code_op_status_detail WITH (NOLOCK) WHERE OPSTATUS = (CASE WHEN (SELECT TOP 1 [STATUS] FROM V_OP_STATUS WHERE BSNO=t.GId ORDER BY COMPTIME DESC,INPUTTIME DESC) is null THEN '接受委托' else (SELECT TOP 1[STATUS] FROM V_OP_STATUS WHERE BSNO =t.GId ORDER BY COMPTIME DESC, INPUTTIME DESC) end))AS COLOR");
strSql.Append(",t.SALECORPID,(select [NAME] from [company] where GID=t.SALECORPID) as SALECORP,DCLASS,DUNNO");
strSql.Append(" ,INVOICENO,KINDPKGS,CUSTNO,SalesName,GoodsName,PORTLOAD,DESTINATION,RtnDocStatus,RtnDocTime,ACCDATE,(CASE FEESTATUS WHEN 1 THEN '锁定' else '未锁定' end) as FEESTATUSREF from tMsWlPcHead t ");
if (!string.IsNullOrEmpty(strCondition))
{
@ -634,7 +640,9 @@ namespace DSWeb.Areas.TruckMng.DAL.MsRptPcHeadEdit
strSql.Append(" ,ContainerType,ContainerTypeSe,LinkTel,YardName,LinkManSe,LinkTelSe,RtnYardName,BsType,CustName,CustLikeManName,CustTel,ChangedReson,DispatchName,RoadFee,FactoryAddr,ContainerNo,SealNo");
strSql.Append(",dbo.F_GetBillDrFeeStatus(t.GId) DRFEESTATUS");
strSql.Append(",dbo.F_GetBillCrFeeStatus(t.GId) CRFEESTATUS");
strSql.Append(",t.SALECORPID,(select [NAME] from [company] where GID=t.SALECORPID) as SALECORP");
strSql.Append(",(SELECT TOP 1 STATUS FROM V_OP_STATUS WITH (NOLOCK) WHERE BSNO=t.GId ORDER BY COMPTIME DESC,INPUTTIME DESC) as OPSTATUS");
strSql.Append(",'' AS COLOR");
strSql.Append(",t.SALECORPID,(select [NAME] from [company] where GID=t.SALECORPID) as SALECORP,DCLASS,DUNNO");
strSql.Append(" ,INVOICENO,KINDPKGS,CUSTNO,SalesName,GoodsName,PORTLOAD,DESTINATION,RtnDocStatus,RtnDocTime,ACCDATE,(CASE FEESTATUS WHEN 1 THEN '锁定' else '未锁定' end) as FEESTATUSREF from tMsWlPcHead t ");
if (!string.IsNullOrEmpty(condition))
{
@ -746,6 +754,10 @@ namespace DSWeb.Areas.TruckMng.DAL.MsRptPcHeadEdit
data.SealNo = Convert.ToString(reader["SealNo"]);
data.SALECORP = Convert.ToString(reader["SALECORP"]);
data.SALECORPID = Convert.ToString(reader["SALECORPID"]);
data.DCLASS = Convert.ToString(reader["DCLASS"]);
data.DUNNO = Convert.ToString(reader["DUNNO"]);
data.OPSTATUS = Convert.ToString(reader["OPSTATUS"]);
data.COLOR = Convert.ToString(reader["COLOR"]);
#endregion
headList.Add(data);
}

@ -2376,7 +2376,14 @@ namespace DSWeb.Areas.TruckMng.Models.MsWlBs
set { _accdate = value; }
}
[ModelDB]
public string DCLASS { get; set; }
[ModelDB]
public string DUNNO { get; set; }
public string OPSTATUS { get; set; }
public string COLOR { get; set; }
#endregion
public MsWlPcHead_WFSDEdit ( )

@ -101,6 +101,10 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, {
{ name: 'DESTINATION', type: 'string' },
{ name: 'SALECORPID', type: 'string' },
{ name: 'SALECORP', type: 'string' },
{ name: 'DCLASS', type: 'string' },
{ name: 'DUNNO', type: 'string' },
{ name: 'OPSTATUS', type: 'string' },
{ name: 'COLOR', type: 'string' },
{ name: 'DRFEESTATUS', type: 'string' },
{ name: 'CRFEESTATUS', type: 'string' },
{ name: 'ChangedReson', type: 'string' },
@ -397,7 +401,20 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, {
}
return value;
}
},
},
{
sortable: true,
id: '',
dataIndex: 'OPSTATUS',
header: '业务状态', //'业务状态',
width: 60,
renderer: function (value, metadata, record, rowIndex) {
metadata.style = "background-color:" + record.data.COLOR;
return value;
},
filter: true
},
{
sortable: true,
dataIndex: 'RowNumber',

@ -93,6 +93,11 @@ Ext.extend(DsTruck.MsPcWFSDEdit, Ext.Panel, {
{ name: 'DESTINATION', type: 'string' },
{ name: 'SALECORPID', type: 'string' },
{ name: 'SALECORP', type: 'string' },
{ name: 'DCLASS', type: 'string' },
{ name: 'DUNNO', type: 'string' },
{ name: 'OPSTATUS', type: 'string' },
{ name: 'COLOR', type: 'string' },
{ name: 'ChangedReson', type: 'string' },
{ name: 'LoadFactory', type: 'string' },
{ name: 'CargoID', type: 'string' }
@ -439,6 +444,153 @@ Ext.extend(DsTruck.MsPcWFSDEdit, Ext.Panel, {
displayField: 'NAME'
});
Ext.define('MsOpSeaeDetail', {
extend: 'Ext.data.Model',
fields: [
{ name: 'GID', type: 'string' },
{ name: 'CTN_ID', type: 'string' },
{ name: 'CTNNUM', type: 'number' },
{ name: 'KGS', type: 'number' },
{ name: 'CTNALL', type: 'string' },
{ name: 'CNTRNO', type: 'string' },
{ name: 'SEALNO', type: 'string' }
]
});
this.storeCtnList = Ext.create('Ext.data.Store', {
model: 'MsOpSeaeDetail',
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsOpLetter/GetLetterCtnList',
reader: {
id: 'CTN_ID',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//箱型_集装箱列表中的下拉框加载
this.storeCodeCtn = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CodeCtnModel',
proxy: { url: '/CommMng/BasicDataRef/GetCodeCtnList' }
});
this.storeCodeCtn.load();
this.comboxCTNALL = Ext.create('DsExt.ux.RefTableCombox', {
store: this.storeCodeCtn,
forceSelection: true,
name: 'CTNALL',
valueField: 'CTN',
displayField: 'CTN'
});
this.gridListCellEditing = Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 1
});
this.gridListCtn = new Ext.grid.GridPanel({
store: this.storeCtnList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
plugins: [this.gridListCellEditing],
selType: 'cellmodel',
tbar: [
{
text: '增加明细', //'增加明细',
tooltip: '增加明细', //'增加明细',
id: "btnadddetail",
iconCls: "btnadddetail",
handler: function (button, event) {
this.addDetail();
},
scope: this
}, '-', {
text: '删除明细', //'删除明细',
tooltip: '删除明细', //'删除明细',
id: "btndeldetail",
iconCls: "btndeletedetail",
handler: function (button, event) {
this.deleteDetail();
},
scope: this
}],
columns: [{
sortable: true,
dataIndex: 'CTN_ID',
header: '编号',
hidden: true,
width: 0
}, {
dataIndex: 'CTNALL',
header: '箱型', //'箱型',
width: 80,
editor: this.comboxCTNALL
}, {
dataIndex: 'CNTRNO',
header: '箱号', //'重量',
width: 120,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
}, {
dataIndex: 'SEALNO',
header:'封号', //'重量',
width: 120,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
}
// , {
// dataIndex: 'CTNNUM',
// header: Zi.LAN.CTNNUM, //'箱量',
// width: 100,
// editor: {
// xtype: 'numberfield',
// allowBlank: false,
// selectOnFocus: true
// }
//}, {
// dataIndex: 'KGS',
// header: Zi.LAN.ZHONGLIANG, //'重量',
// width: 120,
// editor: {
// xtype: 'textfield',
// selectOnFocus: true
// }
// }
]
});
this.storeCtnList.on('beforeload', function (store) {
var billNo = this.editRecord.get('gId');
var condition = "LE_ID='" + billNo + "'";
Ext.apply(store.proxy.extraParams, { condition: condition });
}, this);
this.panelBodyCtn = new Ext.Panel({
// title: '集装箱信息', //'集装箱信息',
layout: "border",
height: 100,
flex: 1,
margin: '5 20',
frame: true,
items: [this.gridListCtn]
});
//编辑form
this.formEdit = Ext.widget('form', {
region: 'center',
@ -645,9 +797,17 @@ Ext.extend(DsTruck.MsPcWFSDEdit, Ext.Panel, {
name: 'DESTINATION'
}, {
fieldLabel: '品名',
flex: 2,
flex: 1,
name: 'GoodsName'
}, {
}, {
fieldLabel: '危品等级',
flex: 0.5,
name: 'DCLASS'
}, {
fieldLabel: '危品编号',
flex: 0.5,
name: 'DUNNO'
}, {
fieldLabel: '陆运费',
flex: 1,
name: 'RoadFee'
@ -673,9 +833,10 @@ Ext.extend(DsTruck.MsPcWFSDEdit, Ext.Panel, {
defaultType: 'textarea',
items: [{
fieldLabel: '备注',
height: 40,
height: 80,
flex: 3,
name: 'Remark'
}]
},this.panelBodyCtn]
}
]//end items(fieldset 1)
}//end fieldset 1
@ -968,7 +1129,7 @@ Ext.extend(DsTruck.MsPcWFSDEdit, Ext.Panel, {
this.panelTop = new Ext.Panel({
layout: "border",
region: "north",
height: 330,
height: 390,
items: [this.panelBtn, this.formEdit]
});
@ -1268,6 +1429,19 @@ Ext.extend(DsTruck.MsPcWFSDEdit, Ext.Panel, {
this.tabSeaepanel.add(this.panelReceipt);
this.tabSeaepanel.doLayout();
var paneltabitems = new Ext.Panel({
id: 'pnlopstatus',
layout: "fit",
region: "center",
autoScroll: true,
frame: false,
closable: true,
title:'状态管理',
html: ' <iframe scrolling="auto" frameborder="0" width="100%" height="100%" src="../../MvcShipping/MsOpStatus"> </iframe>'
});
this.tabSeaepanel.add(paneltabitems);
this.tabSeaepanel.doLayout();
if (data.CustomerName != '') {
var s = " LINKID in (select gid from [info_client] where SHORTNAME='" + data.CustomerName + "')";
this.storeInfoClientContact.load({ params: { condition: s} });
@ -1300,6 +1474,7 @@ Ext.extend(DsTruck.MsPcWFSDEdit, Ext.Panel, {
}
});
this.panelFee.storeChFeeGain.load({ params: { bsno: bsno, optype: "tMsWlPcHead" } });
this.storeCtnList.load({ params: { condition: "LE_ID='" + bsno+ "'" } });
//this.storeBodyFix.load({ params: { billno: bsno } });
}, // end LoadDate
@ -1384,14 +1559,14 @@ Ext.extend(DsTruck.MsPcWFSDEdit, Ext.Panel, {
var data = basicForm.getValues();
basicForm.findField('BillNo').setDisabled(true);
//var bodyFixdatas = [];
//for (var i = 0; i < this.storeBodyFix.getCount(); i += 1) {
// var member = this.storeBodyFix.getAt(i);
// bodyFixdatas.push(member);
//}
//;
//var jsonFixBody = ConvertRecordsToJson(bodyFixdatas);
//var jsonFixDelBody = ConvertRecordsToJsonAll(this.fixBodyDel);
var bodyctndatas = [];
for (var i = 0; i < this.storeCtnList.getCount(); i += 1) {
var member = this.storeCtnList.getAt(i);
bodyctndatas.push(member);
}
;
var jsonCtnBody = ConvertRecordsToJson(bodyctndatas);
Ext.Msg.wait('正在保存数据, 请稍侯..');
@ -1401,7 +1576,8 @@ Ext.extend(DsTruck.MsPcWFSDEdit, Ext.Panel, {
scope: this,
params: {
opstatus: this.opStatus,
data: Ext.JSON.encode(data)
data: Ext.JSON.encode(data),
ctnbody:jsonCtnBody
},
callback: function (options, success, response) {
if (success) {
@ -1441,6 +1617,13 @@ Ext.extend(DsTruck.MsPcWFSDEdit, Ext.Panel, {
// member.commit();
//};
var LE_ID = this.editRecord.get('gId');
for (var j = 0; j < this.storeCtnList.getCount(); j += 1) {
var memberbody = this.storeCtnList.getAt(j);
memberbody.set("LE_ID", LE_ID);
memberbody.commit();
};
} else if (type == '1') {
window.close();
} else {
@ -1460,173 +1643,82 @@ Ext.extend(DsTruck.MsPcWFSDEdit, Ext.Panel, {
}, //end save
//#region 明细操作
onAddDetailClick: function (button, event, type) {
var allow = this.getAllowOperationDetail();
if (allow == false) {
return;
}
var store = null;
if (type == 1) {
store = this.storeBodyFix;
} else if (type == 2) {
store = this.storeBodyChFee;
} else {
alert('函数(onAddDetailClick)的参数type类型设置的不对');
return;
}
var newSerialno = this.GetHandleSerialNo(store, type);
var basicForm = this.formEdit.getForm();
var CustomerName = this.formEdit.getForm().findField('CustomerName').getValue()
var record = null;
if (type == 1) {
record = Ext.create('MsWlPcFixed', {
GId: NewGuid(),
BillNo: '*',
SerialNo: newSerialno,
FeeStatus: 1,
FeeStatus_Ref: '录入状态',
AuditStatus: 0,
CreditDebit: "2",
CreditDebit_Ref: "应付",
FeeTypeCode: '',
FeeTypeCode_Ref: '',
FeeTypeName: '',
DistCount: 0,
Price: 0,
FsTotal: 0,
JsTotal: 0,
Remark: ''
});
}
store.add(record);
var editColumnIndex = 0;
var cellediting = null;
if (type == 1) {
cellediting = this.cellEditingFix;
editColumnIndex = 2;
}
var n = store.getCount();
cellediting.startEditByPosition({ row: n - 1, column: editColumnIndex });
},
GetHandleSerialNo: function (store, type) {
var result = 0;
if (type == 1) {
result = this.fixSerialNo;
}
if (result == 0) {
for (var i = 0; i < store.getCount(); i += 1) {
var member = store.getAt(i);
if (member.data.SerialNo > result) {
result = member.data.SerialNo;
}
}
}
result = result + 1;
if (type == 1) {
this.fixSerialNo = result;
}
return result;
addDetail: function () {
var record = Ext.create('MsOpSeaeDetail', {
CTN_ID: NewGuid(),
LE_ID: '*',
CTNALL: '',
SEALNO: '',
CNTRNO: '',
CTNNUM: 1,
KGS: 0
});
this.storeCtnList.add(record);
var n = this.storeCtnList.getCount();
this.gridListCellEditing.startEditByPosition({ row: n - 1, column: 1 });
},
onDelDetailClick: function (button, event, type) {
var allow = this.getAllowOperationDetail();
if (allow == false) {
return;
}
deleteDetail: function () {
var selectedRecords = this.gridListCtn.selModel.getSelection();
for (var i = 0; i < selectedRecords.length; i++) {
var rec = selectedRecords[i];
if (rec.data.LE_ID == "" || rec.data.LE_ID == "*")//如果是新增但没有保存的数据,没有必要提交到后台
{
this.storeCtnList.remove(selectedRecords[i]);
this.setAllTotal();
var selections = this.gridListFix.getSelectionModel().getSelection();
if (selections.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请先选择单据!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var record = selections[0];
var GID = record.data.GId;
Ext.MessageBox.confirm('提示', '确定删除该记录吗?', function (btn) {
if (btn == 'yes') {
Ext.Msg.wait('正在删除数据...');
Ext.Ajax.request({
waitMsg: '正在删除数据...',
url: '/TruckMng/MsWlPc/DeleteFixBody',
params: {
GID: GID
},
callback: function (options, success, response) {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
this.storeBodyFix.remove(record);
Ext.Msg.show({ title: '提示', msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
}
else {
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
}
},
failure: function (response, options) {
Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
},
success: function (response, options) {
},
scope: this
}); //end Ext.Ajax.request
}
}, this);
},
getAllowOperationDetail: function () {
var feeStatus = this.getFeeStatus();
if (feeStatus == '0' || feeStatus == '' || typeof (feeStatus) == 'undefined' || feeStatus == false || feeStatus == 'false')
return true;
else {
Ext.Msg.show({ title: '错误', msg: "此票委托已费用已锁定,不允许操作费用!", icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
return false;
else {
Ext.MessageBox.confirm(Zi.LAN.TiShi, Zi.LAN.QueDingShanChuGaiJiLuMa, function (btn) {
if (btn == 'yes') {
Ext.Msg.wait('正在操作数据');
Ext.Ajax.request({
waitMsg: '正在操作数据', //'正在删除数据...',
url: '/MvcShipping/MsOpLetter/DeleteLetterCtn',
params: {
data: Ext.JSON.encode(rec.data)
},
callback: function (options, success, response) {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
this.storeCtnList.remove(rec);
this.setAllTotal();
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
}
else {
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
}
},
failure: function (response, options) {
Ext.Msg.show({ title: '警告', msg: '服务器响应出错!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
},
scope: this
}); //end Ext.Ajax.request
}
}, this);
}
//this.storeBodyList.remove(selectedRecords[i]);
}
},
cellEditingFixBeforeEdit: function (editor, e) {
var feeStatus = this.getFeeStatus();
var billStatus = this.getBillStatus();
var canedit = feeStatus == '0' && billStatus == '0';
return canedit;
setAllTotal: function () {
var cntrstr = '';
//var kgs = 0;
//for (var j = 0; j < _this.storeCtnList.getCount(); j += 1) {
// var memberbody = _this.storeCtnList.getAt(j);
// if (cntrstr == '')
// cntrstr = memberbody.data.CTNALL + '*' + memberbody.data.CTNNUM;
// else
// cntrstr = cntrstr + ' ' + memberbody.data.CTNALL + '*' + memberbody.data.CTNNUM;
//}
//this.formEdit.getForm().findField('CTNS').setValue(cntrstr);
//this.formEdit.getForm().findField('KGS').setValue(kgs);
},
gridListFixAfterEdit: function (editor, e, eOpts) {
if (e.field == 'FeeTypeCode') {
var records = DsStoreQueryBy(this.storeFeeTypeCodeRef, 'FeeCode', e.value);
if (records.getCount() > 0) {
var data = records.getAt(0).data;
e.record.set('FeeTypeCode_Ref', data.Name);
e.record.set('FeeTypeName', data.Name);
} else {
e.record.set('FeeTypeCode_Ref', '');
e.record.set('FeeTypeName', '');
}
} else if (e.field == 'CreditDebit') {
var recordsCreditDebit = DsStoreQueryBy(this.storeCreditDebitRef, 'EnumValueId', e.value);
if (recordsCreditDebit.getCount() > 0) {
var dataCreditDebit = recordsCreditDebit.getAt(0).data;
e.record.set('CreditDebit_Ref', dataCreditDebit.EnumValueName);
} else {
e.record.set('CreditDebit_Ref', '');
}
}
},
//#endregion

Loading…
Cancel
Save