hanxuntao 1 week ago
parent fcf531202a
commit 12fbb5ad3d

@ -175,10 +175,18 @@ namespace DSWeb.Areas.CommMng.Controllers
[HttpPost]
[SqlKeyWordsFilter(Type = "Action")]//sql 防注入过滤器
//[SqlKeyWordsFilter(Type = "Action")]//sql 防注入过滤器
[ValidateInput(false)]
public ActionResult ExcelRptIndex(string strCondition, string formname,string filename)
{
string userid = Convert.ToString(Session["USERID"]);
if (userid == "" || userid == null)
{
var jsonRespose2 = new JsonResponse { Success = false, Message = "登陆状态失效,请重新登陆进行操作!" };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
}
string strHeader = "";//中文名称
string strDataIndex = "";//字段名称

@ -330,6 +330,26 @@ namespace DSWeb.MvcShipping.Controllers
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
}
public ContentResult SetCancel(string data,string orreason)
{
var head = JsonConvert.Deserialize<MsSeaeOrder>(data);
var isfee = MsSeaeOrderDAL.GetFeeCount(head.BSNO);
if (isfee)
{
var jsonRespose = new JsonResponse { Success = false, Message = "此票业务存在费用,请先删除费用才能退仓!" };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
else
{
T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA();
string blUpSQL = " update crm_seaeorder set ORSTATUS=4,ORREASON=isnull(ORREASON,'')+' '+'"+ orreason + "' where ORDNO='" + head.ORDNO + "' ";
bool bl = T_ALL_DA.GetExecuteSqlCommand(blUpSQL);
var jsonRespose = new JsonResponse { Success = true, Message = "更新完成" };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
}
public ContentResult ShenModify(string data,string olddata, string ctnbody, string oldctnbody, string optype,string bsno)
{

@ -1771,7 +1771,7 @@ namespace DSWeb.MvcShipping.DAL.MsInfoClient
var strSql = new StringBuilder();
strSql.Append("SELECT * ,(SELECT SHORTNAME FROM info_client where GID=info_client_bank.LINKID) CUSTNAME");
strSql.Append(",BANKNAME + '-' + ACCOUNTNAME AS ACCOUNTNAMEREF");
strSql.Append(",BANKNAME + ' ' + ACCOUNT AS BANKACCOUNT");
strSql.Append(",BANKNAME + ' ' + ACCOUNT+'('+ACCOUNTNAME+')' AS BANKACCOUNT");
strSql.Append(",(select country from code_country where countryid=info_client_bank.countryid) country");
strSql.Append(",ISINVDEF,(CASE WHEN ISINVDEF='1' THEN '是' ELSE '否' END) ISINVDEFREF");
strSql.Append(" from info_client_bank where 1=1");
@ -1797,7 +1797,7 @@ namespace DSWeb.MvcShipping.DAL.MsInfoClient
var strSql = new StringBuilder();
strSql.Append("SELECT * ,(SELECT SHORTNAME FROM info_client where GID=info_client_bank.LINKID) CUSTNAME");
strSql.Append(",BANKNAME + '-' + ACCOUNTNAME AS ACCOUNTNAMEREF");
strSql.Append(",BANKNAME + ' ' + ACCOUNT AS BANKACCOUNT");
strSql.Append(",BANKNAME + ' ' + ACCOUNT+'('+ACCOUNTNAME+')' AS BANKACCOUNT");
strSql.Append(",(select country from code_country where countryid=info_client_bank.countryid) country");
strSql.Append(",ISINVDEF,(CASE WHEN ISINVDEF='1' THEN '是' ELSE '否' END) ISINVDEFREF");

@ -2783,8 +2783,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL
str = str + Environment.NewLine + "PG:" + opctndetail.PACKINGGROUP;
var hw = "N";
if (opctndetail.ISMP == "1") hw = "Y";
str = str + Environment.NewLine + "闪点:" + opctndetail.DFLASH + "海污:" + hw;
str = str + Environment.NewLine + "闪点:" + opctndetail.DFLASH + "海污:" + hw + Environment.NewLine;
addbodyList.Add(opctndetail);
}

@ -161,8 +161,10 @@ namespace DSWeb.Areas.MvcShipping.DAL
data.CUSTOMERNAME = Convert.ToString(reader["CUSTOMERNAME"]);
data.CARRIER= Convert.ToString(reader["CARRIER"]);
data.CUSTNO = Convert.ToString(reader["CUSTNO"]);
if (reader["STLDATE"] != DBNull.Value)
if (reader["STLDATE"] != DBNull.Value && Convert.ToString(reader["STLDATE"]) != "")
data.STLDATE = Convert.ToDateTime(reader["STLDATE"]).ToString("yyyy-MM-dd");//到港日期
else
data.STLDATE = data.ETD;
data.OPLB = Convert.ToString(reader["OPLB"]);
#endregion

@ -1369,6 +1369,13 @@ Ext.extend(Shipping.MainForm, Ext.Panel, {
}
if (finded == false) {
var TITILE = '';
if (record.data.PARENTNAME == '') {
TITILE = record.data.DESCRIPTION;
} else {
TITILE = record.data.PARENTNAME + '-' + record.data.DESCRIPTION;
}
var paneltabitems = new Ext.Panel({
id: 'pnl' + record.data.NAME,
layout: "fit",
@ -1376,7 +1383,7 @@ Ext.extend(Shipping.MainForm, Ext.Panel, {
autoScroll: true,
frame: false,
closable: true,
title: record.data.PARENTNAME + '-' + record.data.DESCRIPTION,
title: TITILE,
html:
' <iframe scrolling="auto" frameborder="0" width="100%" height="100%" src="' +
record.data.MODULEURL +

@ -1259,8 +1259,12 @@ Ext.extend(Shipping.MsOpApplyEdit, Ext.Panel, {
header: '报关件数',
editor: {
xtype: 'numberfield',
allowBlank: false,
selectOnFocus: true
keyNavEnabled: false,
selectOnFocus: true,
decimalPrecision: 4,
hideTrigger: true,
mouseWheelEnabled: false,
enableKeyEvents: true
},
width: 120
}, {

@ -2957,6 +2957,11 @@ Ext.extend(Shipping.MsOpSeaiEdit, Ext.Panel, {
}, '-', {
text: Zi.LAN.btnSeaeCtnCopy,
handler: function (button, event) {
if (this.formHead.getForm().findField('CUSTNO').getValue() == "") {
Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.QingXianBaoCunYeWu, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });//'请先保存业务信息后再打开其他模块!'
return;
}
DsOpenEditWin('/MvcShipping/MsOpSeai/Seae2SeaiCtnIndex?OPTYPE=SEAI', "出口引入", "600", "940", "10", "10");

@ -242,31 +242,31 @@ Ext.extend(Shipping.MsOpTaskIndex, Ext.Panel, {
}, {
sortable: true,
dataIndex: 'CUSTNO',
align: 'center',
header: '委托编号',
width: 120
}, {
sortable: true,
dataIndex: 'MBLNO',
align: 'center',
header: '提单号',
width: 120
}, {
sortable: true,
dataIndex: 'CARRIER',
align: 'center',
header: '船公司',
width: 120
}, {
sortable: true,
dataIndex: 'CUSTOMERNAME',
align: 'center',
header: '委托单位',
width: 120
}, {
sortable: true,
dataIndex: 'ETD',
align: 'center',
header: '开船日期',
width: 120
}, {
@ -351,7 +351,32 @@ Ext.extend(Shipping.MsOpTaskIndex, Ext.Panel, {
selType: 'cellmodel',
viewConfig: {
enableTextSelection: true, //允许复制数据
autoFill: true
autoFill: true,
getRowClass: function (record, rowIndex, rowParams, store) {
var TASKTYPE = record.get('TASKTYPE');
var STLDATE = record.get('STLDATE');
if (TASKTYPE == '未开票')
return 'text_yellow';
if (TASKTYPE == '超额度欠费')
return 'text_red';
if (TASKTYPE == '欠费待收款') {
if (STLDATE != '') {
var myDate = new Date();
var mydatestr = Ext.util.Format.date(myDate, 'Y-m-d');
mydatestr = getNewDay(mydatestr, 3);
mydatestr = new Date(mydatestr);
ENDATE = new Date(STLDATE);
if (mydatestr.getTime() > ENDATE.getTime()) {
return 'text_red';
} else {
return 'text_yellow';
}
} else {
return 'text_yellow';
}
}
}
},
columns: this.girdcolums,
bbar: Ext.create('Ext.PagingToolbar', {
@ -569,24 +594,26 @@ Ext.extend(Shipping.MsOpTaskIndex, Ext.Panel, {
}, {
text: "修改承诺付款时间",
handler: function (menu, event) {
this.onUpTransStatusClick('转发邮件');
_this.winModifyStlDateShow.show();
},
scope: this
}],
scope: this
}, '-',
'-',
// '-',
{
text: "取消任务",
// iconCls: "btnsave",
handler: function (button, event) {
this.onUpTransStatusClick('取消任务');
// {
// text: "取消任务",
//// iconCls: "btnsave",
// handler: function (button, event) {
// this.onUpTransStatusClick('取消任务');
},
scope: this
}, '-', {
// },
// scope: this
// },
'-', {
text: "保存列表样式",
id: "btntest",
menu: [
@ -651,7 +678,7 @@ Ext.extend(Shipping.MsOpTaskIndex, Ext.Panel, {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 60,
labelWidth: 80,
msgTarget: 'qtip'
},
@ -685,7 +712,7 @@ Ext.extend(Shipping.MsOpTaskIndex, Ext.Panel, {
this.winModifyStlDateShow = Ext.create('Ext.window.Window', {
title: "批量修改承诺付款日期", //"批量修改",
width: 30,
width: 230,
//height : 120,
//plain : true,
iconCls: "addicon",

@ -315,7 +315,7 @@ Ext.extend(Shipping.MsRptChInvTotalIndex, Ext.Panel, {
}, {
sortable: true,
dataIndex: 'TTLUSD',
header:Zi.LAN.BLANKFIELD,
header: Zi.LAN.TTLUSD,
//header: 'USD应开',
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; },
align: 'right',
@ -323,7 +323,7 @@ Ext.extend(Shipping.MsRptChInvTotalIndex, Ext.Panel, {
}, {
sortable: true,
dataIndex: 'INVUSD',
header:Zi.LAN.BLANKFIELD,
header: Zi.LAN.INVUSD,
//header: 'USD已开',
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; },
align: 'right',

@ -13,6 +13,7 @@ Ext.extend(Shipping.MsSeaeOrderIndex, Ext.Panel, {
isShowAdvancedQuery: 0, //是否显示高级查询面板
IsAudit: false,
bsno: '',
reason: "",
sqlcontext: '',
initUIComponents: function () {
this.formname = "formMsSeaeOrderIndex"; //页面名称
@ -304,7 +305,13 @@ Ext.extend(Shipping.MsSeaeOrderIndex, Ext.Panel, {
dataIndex: 'CONFIRMDATE',
header: '确认日期',
width: 100
},
},
{
sortable: true,
dataIndex: 'ORREASON',
header: '驳回/退舱原因',
width: 100
},
{
sortable: true,
dataIndex: 'REMARK',
@ -953,7 +960,14 @@ Ext.extend(Shipping.MsSeaeOrderIndex, Ext.Panel, {
this.onSubmitAuditBackClick();
},
scope: this
}, '-', {
}, {
text: "退仓",
iconCls: "btndelete",
handler: function (button, event) {
this.winAuditBackShow.show();
},
scope: this
}, '-', {
text: "保存列表样式", //"保存列表样式",
id: "btntest",
menu: [{
@ -1128,6 +1142,74 @@ Ext.extend(Shipping.MsSeaeOrderIndex, Ext.Panel, {
});
this.relayEvents(this.PluginCover, ['opentab']);
this.formAuditBack = Ext.widget('form', {
frame: true,
region: 'center',
title: "<a href='#'><font color='#FF0000'>退仓原因</font></a>",
bodyPadding: 5,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 90,
msgTarget: 'qtip'
},
items: [{
xtype: 'textareafield',
grow: true,
fieldLabel: '',
labelSeparator: '',
labelWidth: 0,
height: 100,
name: 'ORREASON',
anchor: '100%'
}
]//end root items
});
me = this;
this.winAuditBackShow = Ext.create('Ext.window.Window', {
title: "退仓",
width: 450,
//height : 120,
//plain : true,
iconCls: "addicon",
resizable: false,
// 是否可以拖动
// draggable:false,
collapsible: true, // 允许缩放条
closeAction: 'close',
closable: true,
modal: 'true',
buttonAlign: "center",
bodyStyle: "padding:0 0 0 0",
items: [this.formAuditBack],
buttons: [{
text: "确认退仓",
minWidth: 70,
handler: function () {
var form = me.formAuditBack.getForm();
var ORREASON = form.findField('ORREASON').getRawValue();
if (ORREASON == '' || ORREASON == null || ORREASON == undefined) {
Ext.Msg.show({ title: '提示', msg: '退仓原因为必填!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
};
me.reason = ORREASON;
me.onCancelClick();
}
}, {
text: "关闭",
minWidth: 70,
handler: function () {
me.winAuditBackShow.close();
}
}]
});
}, //end initUIComponents
@ -1236,6 +1318,75 @@ Ext.extend(Shipping.MsSeaeOrderIndex, Ext.Panel, {
}, this);
},
onCancelClick: function (button, event) {
var selections = this.gridList.getSelectionModel().getSelection();
if (selections.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请先选择业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var record = selections[0];
if (record.data.ORSTATUS == '8') {
Ext.Msg.show({ title: '警告', msg: '此业务已确认订舱,不允许退舱!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });
return;
}
if (record.data.ORSTATUS == '4') {
Ext.Msg.show({ title: '警告', msg: '此业务已退舱,不允许退舱!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });
return;
}
if (this.StoreOpRange.getCount() == 0) {
Ext.Msg.show({ title: '警告', msg: '权限不足,不允许退舱!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });
return;
} else {
var op = record.data.OP;
var inputby = record.data.INPUTBY;
var records = DsStoreQueryBy(this.StoreOpRange, 'OPID', op);
if (records.getCount() > 0) {
} else {
var recordins = DsStoreQueryBy(this.StoreOpRange, 'OPID', inputby);
if (recordins.getCount() > 0) {
} else {
canedit = false;
Ext.Msg.show({ title: '警告', msg: '权限不足,不允许退舱!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });
return;
}
}
}
Ext.MessageBox.confirm('提示', '确定退舱该业务吗?', function (btn) {
if (btn == 'yes') {
Ext.Msg.wait('正在退舱数据...');
Ext.Ajax.request({
waitMsg: '正在退舱数据...',
url: '/MvcShipping/MsSeaeOrder/SetCancel',
params: {
data: Ext.JSON.encode(record.data),
orreason: _this.reason
},
callback: function (options, success, response) {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
this.storeList.reload();
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 });
}
_this.winAuditBackShow.close();
}
},
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);
},
onSubmitAuditClick: function () {
var selections = this.gridList.getSelectionModel().getSelection();

@ -130,6 +130,15 @@ namespace DSWeb.Areas.TruckMng.Controllers
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = dataList.Count, data = list.ToList() });
return new ContentResult() { Content = json };
}
[SqlKeyWordsFilter(Type = "Action")]//sql 防注入过滤器
public ContentResult GetHYRDDataListStr(string sort, string condition, string ismaster)
{
var dataListStr = MsRptPcHeadEditDAL.GetHYRDListStr(condition, CookieConfig.GetCookie_UserId(Request), CookieConfig.GetCookie_UserCode(Request), CookieConfig.GetCookie_UserName(Request), CookieConfig.GetCookie_CompanyId(Request), sort, ismaster);
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功",data = dataListStr });
return new ContentResult() { Content = json };
}
[SqlKeyWordsFilter(Type = "Action")]//sql 防注入过滤器
public ContentResult GetDataFenList(int start, int limit, string sort, string condition)
@ -465,12 +474,15 @@ namespace DSWeb.Areas.TruckMng.Controllers
var jsonRespose = new JsonResponse { Success = false, Message = "工作号重复,不允许保存!" };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
var ct2 = MsRptPcHeadEditDAL.GetRdCount("Gid<>'" + headData.gId + "' AND MblNoSe='" + headData.MblNoSe + "' and BSTYPE='" + headData.BsType + "' and BLTYPE<>'派车分票' ");
if (ct2 != 0)
if (!string.IsNullOrEmpty(headData.MblNoSe))
{
isPost = false;
var jsonRespose = new JsonResponse { Success = false, Message = "工作号重复,不允许保存!" };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
var ct2 = MsRptPcHeadEditDAL.GetRdCount("Gid<>'" + headData.gId + "' AND MblNoSe='" + headData.MblNoSe + "' and BSTYPE='" + headData.BsType + "' and BLTYPE<>'派车分票' ");
if (ct2 != 0)
{
isPost = false;
var jsonRespose = new JsonResponse { Success = false, Message = "主提单号重复,不允许保存!" };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
}
}
@ -1398,7 +1410,7 @@ namespace DSWeb.Areas.TruckMng.Controllers
strSql.Append(",g.TRUCKLQFCR,g.TTLTRUCKCR,g.TTLTRUCKSTLCR,g.TTLTRUCKBLCCR,g.TTLYFCR,g.TTLDSFCR,g.TTLGSFCR,g.TTLQTFCR,g.TTLOTCR,g.TTLOTSTLCR,g.TTLOTBLCCR,g.TTLDR,g.TTLCR ");
strSql.Append(",g.TTLDR-g.TTLCR TTLPROFIT,g.TTLOTCR-g.TTLTRUCKSTLCR TTLTRUCKPROFIT ");
strSql.Append(" from tMsWlPcHead t left join v_op_gain_sum_truck g on (g.BSNO=t.gId) ");
strSql.Append(" from V_tMsWlPcHead t left join v_op_gain_sum_truck g on (g.BSNO=t.gId) ");
if (!string.IsNullOrEmpty(condition))
{

@ -1680,7 +1680,7 @@ namespace DSWeb.Areas.TruckMng.DAL.MsRptPcHeadEdit
strSql.Append(" ,ROW_NUMBER()over (partition by dbo.trimdate(expdate) order by expdate ) RowNumber ");
strSql.Append(" ,BillNo,dbo.trimtime(ExpDate) ExpDate, dbo.trimdate(expdate) GroupDate ,ArriveDate,ReturnDate ");
strSql.Append(" ,CustomerName,F_CustomerName,t.DrvName,t.DdName,t.DrvCode,t.TruckNo,MblNo,LinkMan,DstArea,DetiNation,ContainerQty,GOODSCOUNT,CBM ");
strSql.Append(" ,Ton,AroundTon,t.LoadCount,LoadPlace,TruckSpec,IsDouble,Property,RefBillNo,RefBillNose,MblNoSe,EndPortDate,VoyVeg,VoyVegSe,EtDate ");
strSql.Append(" ,Ton,AroundTon,OverLoadMil,t.LoadCount,LoadPlace,TruckSpec,IsDouble,Property,RefBillNo,RefBillNose,MblNoSe,EndPortDate,VoyVeg,VoyVegSe,EtDate ");
strSql.Append(" ,(select sum(amount) from ch_Fee where bsno=t.gid and feename='运费' and FEETYPE=1)YUNFEI ");
strSql.Append(" ,(select sum(amount) from ch_Fee where bsno=t.gid and feename='回程合计' and FEETYPE=1)HCHJ ");
strSql.Append(" ,(select sum(amount) from ch_Fee where bsno=t.gid and feename='装卸费' and FEETYPE=1)ZXF ");
@ -1748,6 +1748,8 @@ namespace DSWeb.Areas.TruckMng.DAL.MsRptPcHeadEdit
}
}
}
@ -1765,11 +1767,138 @@ namespace DSWeb.Areas.TruckMng.DAL.MsRptPcHeadEdit
}
else
{
strSql.Append(" order by Expdate,billno ");
strSql.Append(" order by ArriveDate desc ");
}
return SetHYRDData(strSql);
}
static public string GetHYRDListStr(string strCondition, string userid, string usercode, string username, string companyid, string sort, string ismaster = "")
{ //合同信息/商品信息
if (!string.IsNullOrWhiteSpace(userid) || !string.IsNullOrWhiteSpace(usercode) || !string.IsNullOrWhiteSpace(username) || !string.IsNullOrWhiteSpace(companyid))
{
var rangstr = GetRangDAStr("index", userid, usercode, username, companyid);
if (!string.IsNullOrEmpty(rangstr))
{
if (!string.IsNullOrEmpty(strCondition))
{
strCondition = strCondition + " and " + rangstr;
}
else
{
strCondition = rangstr;
}
}
}
var strSql = new StringBuilder();
strSql.Append("SELECT * ");
strSql.Append(",CASE WHEN ISNULL(TTLINVCR,0)=0 THEN '未开票' WHEN ISNULL(TTLINVCR,0)=ISNULL(TTLCR,0) THEN '已开票' WHEN ISNULL(TTLINVCR,0)!=ISNULL(TTLCR,0) THEN '部分开票' END CRINVSTATUS ");
strSql.Append(",CASE WHEN ISNULL(TTLINVDR,0)=0 THEN '未开票' WHEN ISNULL(TTLINVDR,0)=ISNULL(TTLDR,0) THEN '已开票' WHEN ISNULL(TTLINVDR,0)!=ISNULL(TTLDR,0) THEN '部分开票' END DRINVSTATUS ");
strSql.Append(",CASE WHEN ISNULL(TTLDUIDR,0)=0 THEN '未对账' WHEN ISNULL(TTLDUIDR,0)=ISNULL(TTLDR,0) THEN '已对账' WHEN ISNULL(TTLDUIDR,0)!=ISNULL(TTLDR,0) THEN '部分对账' END DRDUISTATUS ");
strSql.Append(",CASE WHEN ISNULL(TTLDUICR,0)=0 THEN '未对账' WHEN ISNULL(TTLDUICR,0)=ISNULL(TTLCR,0) THEN '已对账' WHEN ISNULL(TTLDUICR,0)!=ISNULL(TTLCR,0) THEN '部分对账' END CRDUISTATUS ");
strSql.Append(" FROM (");
strSql.Append(" select CargoID,LoadFactory,PcBillType,PGid,BLTYPE,TRANSSTATUS ");
strSql.Append(" ,(select EnumValueName from tSysEnumValue where LangId=0 and EnumTypeID=99046 and EnumValueID=t.PcBillType) PcBillTypeREF ");
strSql.Append(" ,convert(bigint ,t.TimeMark) as timeMark,gId,UserName ");
strSql.Append(" ,ROW_NUMBER()over (partition by dbo.trimdate(expdate) order by expdate ) RowNumber ");
strSql.Append(" ,BillNo,dbo.trimtime(ExpDate) ExpDate, dbo.trimdate(expdate) GroupDate ,ArriveDate,ReturnDate ");
strSql.Append(" ,CustomerName,F_CustomerName,t.DrvName,t.DdName,t.DrvCode,t.TruckNo,MblNo,LinkMan,DstArea,DetiNation,ContainerQty,GOODSCOUNT,CBM ");
strSql.Append(" ,Ton,AroundTon,OverLoadMil,t.LoadCount,LoadPlace,TruckSpec,IsDouble,Property,RefBillNo,RefBillNose,MblNoSe,EndPortDate,VoyVeg,VoyVegSe,EtDate ");
strSql.Append(" ,(select sum(amount) from ch_Fee where bsno=t.gid and feename='运费' and FEETYPE=1)YUNFEI ");
strSql.Append(" ,(select sum(amount) from ch_Fee where bsno=t.gid and feename='回程合计' and FEETYPE=1)HCHJ ");
strSql.Append(" ,(select sum(amount) from ch_Fee where bsno=t.gid and feename='装卸费' and FEETYPE=1)ZXF ");
strSql.Append(" ,(select sum(amount) from ch_Fee where bsno=t.gid and feename='代垫费' and FEETYPE=1)DDF ");
strSql.Append(" ,(select sum(amount) from ch_Fee where bsno=t.gid and feename not in('运费','回程合计','装卸费','代垫费') and FEETYPE=1)QTFee ");
strSql.Append(" ,(select sum(amount) from ch_Fee where bsno=t.gid and FEETYPE=1)TotalFee,t.Remark,t.FeeStatus,dbo.trimtime(LrDate) LrDate");
strSql.Append(" ,case when t.TruckNo='' then '接单' else case when isnull(isend,0)=0 then '派车' else '完成' end end PCSTATUSREF ");
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(",(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,(CASE ISNULL(BillStatus,0) WHEN 1 THEN '锁定' else '未锁定' end) as BSSTATUSREF ");
strSql.Append(",FuelPrice,FuelQty,RealMil,isEnd,RatedMil,RatedFuel,RealFuel,DetiNationSe,FactoryAddrSe,ContainerNoSe,EtDateSe,YardCodeSe,YardNameSe");
strSql.Append(",ISSHUISHI,ISGAOWEN,ISXIANLIANG,ISCHECHUAN,ISHAIWU,ISFENGXIANG,ISWEISHENBAO,ISBAOGUAN,ISRIZHAO,ISBOCHUAN,ISPINGTAI,FrTruckNo,FrDrvName,WmsTruckNo,WmsDrvName");
strSql.Append(",I.TTLDR,I.TTLINVDR,I.TTLDUIDR,I.TTLCR,I.TTLINVCR,I.TTLDUICR,ISCANCEL,DstAreaSe");
strSql.Append(" from tMsWlPcHead t ");
strSql.Append(" LEFT JOIN v_op_gain_dr_INV I ON (I.BSNO=t.GID) ");
if (ismaster != "1" && ismaster != "2")
{
if (!string.IsNullOrEmpty(strCondition))
{
strSql.Append(" where (t.BLTYPE='派车主票' or t.BLTYPE='派车单票') AND EXISTS ( select 1 from tMsWlPcHead WHERE t.GID=tMsWlPcHead.PGID AND " + strCondition + " )");
}
else
{
//strSql.Append(" where 1=1 " );
strSql.Append(" where (t.BLTYPE='派车主票' or t.BLTYPE='派车单票') ");
}
}
else
{
if (ismaster == "2")
{
if (!string.IsNullOrEmpty(strCondition))
{
strSql.Append(" where (t.BLTYPE='派车分票' or t.BLTYPE='派车单票') AND " + strCondition);
}
else
{
//strSql.Append(" where 1=1 " );
strSql.Append(" where (t.BLTYPE='派车分票' or t.BLTYPE='派车单票') ");
}
}
else
{
if (!string.IsNullOrEmpty(strCondition))
{
strSql.Append(" where 1=1 AND " + strCondition);
}
else
{
//strSql.Append(" where 1=1 " );
strSql.Append(" where 1=1");
}
}
}
strSql.Append(") AS T");
var sortstring = DatasetSort.Getsortstring(sort);
if (!string.IsNullOrEmpty(sortstring))
{
if (sortstring.ToUpper().IndexOf("DRINVSTATUS") >= 0)
strSql.Append(" order by " + sortstring.Replace("DRINVSTATUS", " CASE WHEN ISNULL(I.TTLINVDR,0)=0 THEN '未开票' ELSE CASE WHEN ISNULL(I.TTLINVDR,0)=ISNULL(I.TTLDR,0) THEN '已开票' ELSE '部分开票' END END "));
if (sortstring.ToUpper().IndexOf("DRDUISTATUS") >= 0)
strSql.Append(" order by " + sortstring.Replace("DRDUISTATUS", " CASE WHEN ISNULL(I.TTLDUIDR,0)=0 THEN '未对账' ELSE CASE WHEN ISNULL(I.TTLDUIDR,0)=ISNULL(I.TTLDR,0) THEN '已对账' ELSE '部分对账' END END "));
strSql.Append(" order by " + sortstring);
}
else
{
strSql.Append(" order by ArriveDate desc ");
}
return strSql.ToString();
}
static public MsWlPcHead_WFSDEdit GetHYRDData(string condition)
@ -1781,7 +1910,7 @@ namespace DSWeb.Areas.TruckMng.DAL.MsRptPcHeadEdit
strSql.Append(" ,ROW_NUMBER()over (partition by dbo.trimdate(expdate) order by expdate ) RowNumber ");
strSql.Append(" ,BillNo,dbo.trimtime(ExpDate) ExpDate, dbo.trimdate(expdate) GroupDate ,ArriveDate,ReturnDate ");
strSql.Append(" ,CustomerName,F_CustomerName,t.DrvName,t.DdName,t.DrvCode,t.TruckNo,MblNo,LinkMan,DstArea,DetiNation,ContainerQty,GOODSCOUNT,CBM ");
strSql.Append(" ,Ton,AroundTon,t.LoadCount,LoadPlace,TruckSpec,IsDouble,Property,RefBillNo,RefBillNose,MblNoSe,dbo.trimtime(EndPortDate) EndPortDate,VoyVeg,VoyVegSe,dbo.trimtime(EtDate) EtDate ");
strSql.Append(" ,Ton,AroundTon,OverLoadMil,t.LoadCount,LoadPlace,TruckSpec,IsDouble,Property,RefBillNo,RefBillNose,MblNoSe,dbo.trimtime(EndPortDate) EndPortDate,VoyVeg,VoyVegSe,dbo.trimtime(EtDate) EtDate ");
strSql.Append(" ,(select sum(amount) from ch_Fee where bsno=t.gid and feename='运费' and FEETYPE=1)YUNFEI ");
strSql.Append(" ,(select sum(amount) from ch_Fee where bsno=t.gid and feename='回程合计' and FEETYPE=1)HCHJ ");
strSql.Append(" ,(select sum(amount) from ch_Fee where bsno=t.gid and feename='装卸费' and FEETYPE=1)ZXF ");
@ -1851,6 +1980,7 @@ namespace DSWeb.Areas.TruckMng.DAL.MsRptPcHeadEdit
data.DstAreaSe = Convert.ToString(reader["DstAreaSe"]);
data.DetiNation = Convert.ToString(reader["DetiNation"]);
data.ContainerQty = Convert.ToString(reader["ContainerQty"]);
data.OverLoadMil = Convert.ToString(reader["OverLoadMil"]);
data.Ton = Convert.ToString(reader["Ton"]);
data.AroundTon = Convert.ToString(reader["AroundTon"]);
data.GOODSCOUNT = Convert.ToString(reader["GOODSCOUNT"]);
@ -2375,10 +2505,21 @@ namespace DSWeb.Areas.TruckMng.DAL.MsRptPcHeadEdit
var tran = conn.BeginTransaction();
try
{
var cmdDelete = db.GetSqlStringCommand("insert into op_status(ST_ID,BSNO,STATUS,ISCOMP,COMPTIME,INPUTTIME,STTYPE,COMPOP,INPUTBY) values(NEWID(),'" + bsno + "','"+ status + "',1,'" + DateTime.Now.ToString() + "','" + DateTime.Now.ToString() + "','1','" + op + "','" + op + "')");
db.ExecuteNonQuery(cmdDelete, tran);
// var cmdDelete = db.GetSqlStringCommand("insert into op_status(ST_ID,BSNO,STATUS,ISCOMP,COMPTIME,INPUTTIME,STTYPE,COMPOP,INPUTBY) values(NEWID(),'" + bsno + "','"+ status + "',1,'" + DateTime.Now.ToString() + "','" + DateTime.Now.ToString() + "','1','" + op + "','" + op + "')");
// db.ExecuteNonQuery(cmdDelete, tran);
if (status == "完结")
{
var cmdDelete = db.GetSqlStringCommand("insert into op_status(ST_ID,BSNO,STATUS,ISCOMP,COMPTIME,INPUTTIME,STTYPE,COMPOP,INPUTBY) SELECT " +
"NEWID(),GID,'" + status + "',1,'" + DateTime.Now.ToString() + "','" + DateTime.Now.ToString() + "','1','" + op + "','" + op + "' FROM tMsWlPcHead WHERE PGID='"+bsno+"' ");
db.ExecuteNonQuery(cmdDelete, tran);
}
else
{
var cmdDelete = db.GetSqlStringCommand("insert into op_status(ST_ID,BSNO,STATUS,ISCOMP,COMPTIME,INPUTTIME,STTYPE,COMPOP,INPUTBY) values(NEWID(),'" + bsno + "','" + status + "',1,'" + DateTime.Now.ToString() + "','" + DateTime.Now.ToString() + "','1','" + op + "','" + op + "')");
db.ExecuteNonQuery(cmdDelete, tran);
}
tran.Commit();

@ -1995,6 +1995,13 @@ namespace DSWeb.Areas.TruckMng.Models.MsWlBs
get { return _AroundTon; }
set { _AroundTon = value; }
}
private string _OverLoadMil = "0";
[ModelDB]
public string OverLoadMil
{
get { return _OverLoadMil; }
set { _OverLoadMil = value; }
}
[ModelDB]
public string GOODSCOUNT

@ -64,6 +64,7 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, {
{ name: 'DetiNation', type: 'string' },
{ name: 'ContainerQty', type: 'string' },
{ name: 'Ton', type: 'string' },
{ name: 'OverLoadMil', type: 'string' },
{ name: 'AroundTon', type: 'string' },
{ name: 'LoadCount', type: 'string' },
{ name: 'LoadPlace', type: 'string' },
@ -1220,6 +1221,16 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, {
},
renderer: Ext.util.Format.dateRenderer('Y-m-d')
},
{
sortable: true,
dataIndex: 'OverLoadMil',
header: '入库分成',
width: 110,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
},
{
sortable: true,
dataIndex: 'Ton',
@ -1546,7 +1557,8 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, {
displayField: 'NAME',
forceSelection: true,
name: 'ISWMS',
flex: 0.5,
labelWidth: 65,
value: '',
enableKeyEvents: true,
listeners: {
@ -1572,7 +1584,8 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, {
displayField: 'NAME',
forceSelection: true,
name: 'ISCTN',
flex: 0.5,
labelWidth: 65,
value: '',
enableKeyEvents: true,
listeners: {
@ -1787,7 +1800,18 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, {
}
}
}
}, this.comboxWmsStatus, this.comboxCtnStatus,{
}, this.comboxWmsStatus, this.comboxCtnStatus, {
fieldLabel: '箱号',
name: 'CntrNo',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_thisPcIndex.onRefreshClick();
}
}
}
},{
//xtype: 'button',
width: 90,
text: "高级查询",
@ -2112,6 +2136,21 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, {
trackMouseOver: true,
disableSelection: false,
selModel: this.MainCBFen,
viewConfig: {
enableTextSelection: true,
autoFill: true,
getRowClass: function (record, rowIndex, rowParams, store) {
var ISCANCEL = record.get('ISCANCEL');
if (ISCANCEL == '1')
return 'feestatus_Del';
var DRDUISTATUS = record.get('DRDUISTATUS');
if (DRDUISTATUS == '已对账')
return 'feestatus_pass';
var OPSTATUS = record.get('OPSTATUS');
if (OPSTATUS == '完结')
return 'feestatus_settle';
}
},
// plugins: [this.cellEditingfen],
columns: this.column,
tbar: [{
@ -2869,7 +2908,7 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
this.onDsQuery();
this.storeList.reload();
Ext.Msg.show({ title: '提示', msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
}
else {
@ -3202,6 +3241,12 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, {
var DstArea = form.findField('FactoryAddrSe').getValue();
sql = sql + getAndConSql(sql, DstArea, " (FactoryAddrSe like '%" + DstArea + "%' ) ");
var CntrNo = form.findField('CntrNo').getValue();
sql = sql + getAndConSql(sql, CntrNo, " (ContainerNo like '%" + CntrNo + "%' ) ");
// var VoyVeg = form.findField('VoyVeg').getValue();
// sql = sql + getAndConSql(sql, VoyVeg, " (VoyVeg like '%" + VoyVeg + "%' ) ");
@ -3350,9 +3395,7 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, {
ret[5] = this.storePLList;
return ret;
},
onExportClick: function (button, event) {
GridExportExcelPage(this.gridList);
},
SetEnd: function (isEnd) {
selectedRecords = this.gridList.selModel.getSelection();
var GIDList = "";
@ -3993,56 +4036,145 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, {
},
//#region 打印
Print: function () {
var selections = this.gridList.getSelectionModel().getSelection();
if (selections.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请先选择业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
onExportClick: function (button, event) {
_this = this;
if (this.storeList.getCount() == 0) {
return;
}
var record = selections[0];
var bsNo = record.data.RefBillNo;
if (record.data.RefBillNo == '') {
//Ext.Msg.show({ title: '警告', msg: '此票无法查看业务信息!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });
//return;
bsNo='111'
}
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/TruckMng/PcHeadEdit_WFSD/GetHYRDDataListStr',
scope: this,
params: {
condition: _this.sqlcontext,
printstr: 'true'
},
callback: function (options, success, response) {
if (success) {
Ext.MessageBox.hide();
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
var returnstr = jsonresult.data;
var sql1 = returnstr;
sql1 = sql1.replace(/\+/g, "@@@")
if (sql1 != '') {
GridExportBySql(sql1, this.formname, '陆运派车列表.xls');
}
var oplb = record.data.MblNoSe;
} else {
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
} else {
Ext.Msg.show({
title: '请重试',
msg: '服务器响应出错',
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
});
}
}
});
},
var le_id = record.data.RefBillNose;
var billNo = record.data.BillNo;
var printType = 'MSOPLETTERTRUCKLS';
if (oplb == "海运进口") {
printType = 'MSOPLETTERTRUCKSEAILS'
} else if (oplb == "空运进口") {
printType = 'MSOPLETTERTRUCKAIRILS'
} else if (oplb == "空运出口") {
printType = 'MSOPLETTERTRUCKAIRELS'
}
//#region 打印
var sql1 = "SET LANGUAGE 'us_english' SELECT * FROM op_letter WHERE LE_ID = '" + le_id + "'";
var sql2 = "SET LANGUAGE 'us_english' SELECT * FROM tMsWlPcHead WHERE billNo = '" + billNo + "'";
var sql3 = "";
if (this.oplb == "海运进口")
sql3 = "SET LANGUAGE 'us_english' SELECT * FROM op_seai WHERE BSNO = '" + bsNo + "'";
else if (this.oplb == "空运进口")
sql3 = "SET LANGUAGE 'us_english' SELECT * FROM op_airi WHERE BSNO = '" + bsNo + "'";
else if (this.oplb == "空运出口")
sql3 = "SET LANGUAGE 'us_english' SELECT * FROM op_aire WHERE BSNO = '" + bsNo + "'";
else
sql3 = "SET LANGUAGE 'us_english' SELECT * FROM op_seae WHERE BSNO = '" + bsNo + "'";
Print: function () {
var sql4 = "";
var sql5 = "";
var sql6 = "";
_this = this;
if (this.storeList.getCount() == 0) {
return;
}
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/TruckMng/PcHeadEdit_WFSD/GetHYRDDataListStr',
scope: this,
params: {
condition: _this.sqlcontext,
printstr: 'true'
},
callback: function (options, success, response) {
if (success) {
Ext.MessageBox.hide();
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
var returnstr = jsonresult.data;
var printType = 'tMsWlPcHead';
var sql1 = returnstr;
var sql2 = "";
var sql3 = "";
var sql4 = "";
var sql5 = "";
var sql6 = "";
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
} else {
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
} else {
Ext.Msg.show({
title: '请重试',
msg: '服务器响应出错',
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
});
}
}
});
},
//Print: function () {
// var selections = this.gridList.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 bsNo = record.data.RefBillNo;
// if (record.data.RefBillNo == '') {
// //Ext.Msg.show({ title: '警告', msg: '此票无法查看业务信息!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });
// //return;
// bsNo='111'
// }
// var oplb = record.data.MblNoSe;
// var le_id = record.data.RefBillNose;
// var billNo = record.data.BillNo;
// var printType = 'MSOPLETTERTRUCKLS';
// if (oplb == "海运进口") {
// printType = 'MSOPLETTERTRUCKSEAILS'
// } else if (oplb == "空运进口") {
// printType = 'MSOPLETTERTRUCKAIRILS'
// } else if (oplb == "空运出口") {
// printType = 'MSOPLETTERTRUCKAIRELS'
// }
// var sql1 = "SET LANGUAGE 'us_english' SELECT * FROM op_letter WHERE LE_ID = '" + le_id + "'";
// var sql2 = "SET LANGUAGE 'us_english' SELECT * FROM tMsWlPcHead WHERE billNo = '" + billNo + "'";
// var sql3 = "";
// if (this.oplb == "海运进口")
// sql3 = "SET LANGUAGE 'us_english' SELECT * FROM op_seai WHERE BSNO = '" + bsNo + "'";
// else if (this.oplb == "空运进口")
// sql3 = "SET LANGUAGE 'us_english' SELECT * FROM op_airi WHERE BSNO = '" + bsNo + "'";
// else if (this.oplb == "空运出口")
// sql3 = "SET LANGUAGE 'us_english' SELECT * FROM op_aire WHERE BSNO = '" + bsNo + "'";
// else
// sql3 = "SET LANGUAGE 'us_english' SELECT * FROM op_seae WHERE BSNO = '" + bsNo + "'";
// var sql4 = "";
// var sql5 = "";
// var sql6 = "";
// PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
//},
PrintFen: function () {
var selections = this.gridListFen.getSelectionModel().getSelection();

@ -64,6 +64,7 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, {
{ name: 'ContainerQty', type: 'string' },
{ name: 'Ton', type: 'string' },
{ name: 'AroundTon', type: 'string' },
{ name: 'OverLoadMil', type: 'string' },
{ name: 'LoadCount', type: 'string' },
{ name: 'LoadPlace', type: 'string' },
{ name: 'TruckSpec', type: 'string' },
@ -1039,6 +1040,36 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, {
selectOnFocus: true
}
},
{
sortable: true,
dataIndex: 'OverLoadMil',
header: '入库分成',
width: 110,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
},
{
sortable: true,
dataIndex: 'Ton',
header: '外点分成',
width: 110,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
},
{
sortable: true,
dataIndex: 'AroundTon',
header: '空箱分成',
width: 110,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
},
{
sortable: true, hidden: true,
dataIndex: 'OrgName',
@ -1345,6 +1376,7 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, {
this.comboxWmsStatus = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '是否入库',
store: this.storeWmsStatus,
/* labelWidth: 65,*/
valueField: 'FSTATUS',
displayField: 'NAME',
forceSelection: true,
@ -1371,6 +1403,7 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, {
this.comboxCtnStatus = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '是否空箱',
store: this.storeCtnStatus,
/* labelWidth: 65,*/
valueField: 'FSTATUS',
displayField: 'NAME',
forceSelection: true,
@ -1629,6 +1662,17 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, {
}
}
}
}, {
fieldLabel: '箱号',
name: 'CntrNo',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_thisPcIndex.onRefreshClick();
}
}
}
},
{
text: "执行查询",
@ -1973,6 +2017,21 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, {
trackMouseOver: true,
disableSelection: false,
selModel: this.MainCBFen,
viewConfig: {
enableTextSelection: true,
autoFill: true,
getRowClass: function (record, rowIndex, rowParams, store) {
var ISCANCEL = record.get('ISCANCEL');
if (ISCANCEL == '1')
return 'feestatus_Del';
var DRDUISTATUS = record.get('DRDUISTATUS');
if (DRDUISTATUS == '已对账')
return 'feestatus_pass';
var OPSTATUS = record.get('OPSTATUS');
if (OPSTATUS == '完结')
return 'feestatus_settle';
}
},
// plugins: [this.cellEditingfen],
columns: this.column,
tbar: [{
@ -2709,7 +2768,7 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
this.onDsQuery();
this.storeList.reload();
Ext.Msg.show({ title: '提示', msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
}
else {
@ -3126,6 +3185,10 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, {
var DstArea = form.findField('FactoryAddrSe').getValue();
sql = sql + getAndConSql(sql, DstArea, " (FactoryAddrSe like '%" + DstArea + "%' ) ");
var CntrNo = form.findField('CntrNo').getValue();
sql = sql + getAndConSql(sql, CntrNo, " (ContainerNo like '%" + CntrNo + "%' ) ");
var Fr_ArriveDate = form.findField('Fr_ArriveDate').getRawValue();
sql = sql + getAndConSql(sql, Fr_ArriveDate, " ArriveDate>='" + Fr_ArriveDate + "'");
@ -3288,9 +3351,9 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, {
ret[5] = this.storePLList;
return ret;
},
onExportClick: function (button, event) {
GridExportExcelPage(this.gridList);
},
//onExportClick: function (button, event) {
// GridExportExcelPage(this.gridList);
//},
SetEnd: function (isEnd) {
selectedRecords = this.gridList.selModel.getSelection();
var GIDList = "";
@ -3908,6 +3971,48 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, {
},
onExportClick: function (button, event) {
_this = this;
if (this.storeList.getCount() == 0) {
return;
}
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/TruckMng/PcHeadEdit_WFSD/GetHYRDDataListStr',
scope: this,
params: {
condition: _this.sqlcontext,
printstr: 'true'
},
callback: function (options, success, response) {
if (success) {
Ext.MessageBox.hide();
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
var returnstr = jsonresult.data;
var sql1 = returnstr;
sql1 = sql1.replace(/\+/g, "@@@")
if (sql1 != '') {
GridExportBySql(sql1, this.formname, '装箱派车列表.xls');
}
} else {
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
} else {
Ext.Msg.show({
title: '请重试',
msg: '服务器响应出错',
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
});
}
}
});
},
//#region 打印
Print: function () {

@ -70,6 +70,8 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, {
{ name: 'ContainerQty', type: 'string' },
{ name: 'Ton', type: 'string' },
{ name: 'AroundTon', type: 'string' },
{ name: 'OverLoadMil', type: 'string' },
{ name: 'LoadCount', type: 'string' },
{ name: 'LoadPlace', type: 'string' },
{ name: 'TruckSpec', type: 'string' },
@ -1034,6 +1036,10 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, {
fieldLabel: '入库趟数',
flex: 0.5,
name: 'LoadCount'
}, {
fieldLabel: '入库分成',
flex: 0.5,
name: 'OverLoadMil'
}, {
fieldLabel: '外点分成',
flex: 0.5,
@ -1503,7 +1509,7 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, {
hidden: true,
layout: "border",
region: 'west',
width: 260,
width: 400,
items: [this.gridListFix]
});

@ -71,6 +71,7 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, {
{ name: 'ContainerQty', type: 'string' },
{ name: 'Ton', type: 'string' },
{ name: 'AroundTon', type: 'string' },
{ name: 'OverLoadMil', type: 'string' },
{ name: 'LoadCount', type: 'string' },
{ name: 'LoadPlace', type: 'string' },
{ name: 'TruckSpec', type: 'string' },
@ -1615,6 +1616,10 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, {
fieldLabel: '入库趟数',
flex: 0.5,
name: 'LoadCount'
}, {
fieldLabel: '入库分成',
flex: 0.5,
name: 'OverLoadMil'
}, {
fieldLabel: '外点分成',
flex: 0.5,
@ -2075,7 +2080,7 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, {
layout: "border",
region: 'west',
hidden:true,
width: 260,
width: 400,
items: [this.gridListFix]
});

@ -1258,8 +1258,10 @@ Ext.extend(DsTruck.MsWlBsEdit, Ext.Panel, {
// member.commit();
// };
let gid = this.editRecord.get('GId');
let billno = this.editRecord.get('BillNo')
this.storeBodyChFee.load({ params: { condition: "Bsno='" + gid + "' or Bsno='" + billno + "'" } });
//let billno = this.editRecord.get('BillNo')
//this.storeBodyChFee.load({ params: { condition: "Bsno='" + gid + "' or Bsno='" + billno + "'" } });
this.storeBodyChFee.load({ params: { billno: gid } });
} else if (type == '1') {
window.close();

@ -87,7 +87,11 @@
.x-grid-row.text_red .x-grid-cell {
color: #FF0000;
}
/*黄色字体*/
.x-grid-row.text_yellow .x-grid-cell {
color: #FF9933;
}
/*蓝色字体*/
/*用于被冲红的发票*/
.x-grid-row.text_blue .x-grid-cell {

@ -25,7 +25,7 @@ namespace JobCreateFee
{
log.Debug($"清空未开票任务");
dbcon.Open();
var sql = "DELETE FROM op_task where TASKTYPE='未开票' and TASKSTATUS='未开始'";
SqlCommand cmd = new SqlCommand(sql, dbcon);
cmd.ExecuteNonQuery();
@ -38,13 +38,17 @@ namespace JobCreateFee
if (NoInvList != null && NoInvList.Count != 0) {
foreach (var NoInv in NoInvList)
{
insertTask(NoInv.BSNO, NoInv.MBLNO,NoInv.SALEDEPT+"_"+NoInv.OPLBNAME+"_"+NoInv.CUSTOMERNAME + "_" + NoInv.CUSTOMERNAME + "_RMB应收:" + NoInv.RMBDR + "_USD应收:" + NoInv.USDDR, "未开票",NoInv.OP,dbcon);
insertTask(NoInv.BSNO, NoInv.MBLNO,NoInv.SALEDEPT+"_"+NoInv.OPLBNAME+"_"+NoInv.CUSTOMERNAME + "_RMB应收:" + NoInv.RMBDR + "_USD应收:" + NoInv.USDDR, "未开票",NoInv.OP,dbcon);
}
}
log.Debug($"更新欠费待收款任务");
var sql21 = "DELETE FROM op_task where TASKTYPE='欠费待收款' and TASKSTATUS='未开始' and EXISTS (select 1 from v_op_bs where op_task.BSNO=v_op_bs.BSNO AND DATEDIFF([day],GETDATE(),ISNULL(v_op_bs.STLDATE,v_op_bs.ETD))>7) ";
SqlCommand cmd21 = new SqlCommand(sql21, dbcon);
cmd21.ExecuteNonQuery();
var sql2 = "UPDATE op_task SET ISCOMPLETE=1,TASKSTATUS='已完成',COMPLETETYPE='自动',COMPLETETIME=GETDATE() where TASKTYPE='欠费待收款' and TASKSTATUS='未开始' and EXISTS (select 1 from v_op_gain_sum where op_task.BSNO=v_op_gain_sum.BSNO AND STLTTLDR=TTLDR and TTLDR<>0) ";
SqlCommand cmd2 = new SqlCommand(sql2, dbcon);
cmd2.ExecuteNonQuery();
@ -185,9 +189,9 @@ namespace JobCreateFee
var strSql = new StringBuilder();
strSql.Append("SELECT * FROM (");
strSql.Append("SELECT A.ALLOWAMOUNT,C.SHORTNAME,[dbo].[GetCustZq](C.SHORTNAME) ZQ,ISNULL((SELECT SUM((AMOUNT-SETTLEMENT)*EXCHANGERATE) FROM CH_FEE WHERE FEETYPE=1 AND CUSTOMERNAME=C.SHORTNAME),0) NOSTLAMOUNT");
strSql.Append("FROM [shippingweb_qj].[dbo].[Info_Client_ACCDATE] A");
strSql.Append("left join info_client C ON C.GID=A.LINKGID");
strSql.Append("WHERE ISNULL(ALLOWAMOUNT,0)>0");
strSql.Append(" FROM Info_Client_ACCDATE A ");
strSql.Append(" left join info_client C ON C.GID=A.LINKGID");
strSql.Append(" WHERE ISNULL(ALLOWAMOUNT,0)>0");
strSql.Append(" ) AS T WHERE NOSTLAMOUNT>ALLOWAMOUNT ");
SqlDataAdapter adapter = new SqlDataAdapter(strSql.ToString(), dbcon);
@ -225,7 +229,7 @@ namespace JobCreateFee
sql = sql + "'DEMO-SA' as [发起人],GETDATE() as [录入日期],GETDATE() as[任务开始时间], '手动' as [完成方式],null as [完成时间] ,null as [KPI值] , '" + MBLNO + "' as [提单号], ";
sql = sql + " null as [文件编号], '' as [邮件编号], '' as [电子档案路径], 0 as 是否公共,'"+ OP + "','" + BSNO + "' as 编号,0";
log.Debug($"插入语句:{sql}");
// log.Debug($"插入语句:{sql}");
SqlCommand cmd = new SqlCommand(sql, dbcon);
cmd.ExecuteNonQuery();
return "";

Loading…
Cancel
Save