|
|
//集运管理-路单查询
|
|
|
Ext.namespace('Shipping');
|
|
|
|
|
|
Shipping.MsChfeelock = function (config) {
|
|
|
Ext.applyIf(this, config);
|
|
|
this.initUIComponents();
|
|
|
window.Shipping.MsChfeelock.superclass.constructor.call(this);
|
|
|
};
|
|
|
|
|
|
Ext.extend(Shipping.MsChfeelock, Ext.Panel, {
|
|
|
PageSize: 100,
|
|
|
OprationStatus: null, //仅当弹出界面时使用
|
|
|
SelectedRecord: null,
|
|
|
sqlcontext: '1=1',
|
|
|
AccDate: null,
|
|
|
IsAccDate: '',
|
|
|
sortfield: '',
|
|
|
sortdire: '',
|
|
|
ISRATE: true,
|
|
|
tbRATE: 0,
|
|
|
VOUDATE: null,
|
|
|
PREPARED: '',
|
|
|
|
|
|
|
|
|
|
|
|
initUIComponents: function () {
|
|
|
|
|
|
this.formname = 'frmMsChfeelock';
|
|
|
this.MsPeriod = null;
|
|
|
Ext.Ajax.timeout = 12000000;
|
|
|
this.sqlcontext = '1=1';
|
|
|
this.billlocktype = locktype;
|
|
|
|
|
|
this.storeModuleEnable = Ext.create('Ext.data.Store', {
|
|
|
model: 'DsShipping.ux.ModuleModel',
|
|
|
remoteSort: true,
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
url: '/MvcShipping/MsBaseInfo/GetUserModuleEnableList',
|
|
|
reader: {
|
|
|
id: 'id',
|
|
|
root: 'data',
|
|
|
totalProperty: 'totalCount'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
//定义数据集
|
|
|
this.storeList = Ext.create('Ext.data.Store', {
|
|
|
pageSize: this.PageSize,
|
|
|
fields: [
|
|
|
{ name: 'BSNO', type: 'string' },
|
|
|
{ name: 'OPLB', type: 'string' },
|
|
|
{ name: 'OPTYPE', type: 'string' },
|
|
|
{ name: 'BLTYPE', type: 'string' },
|
|
|
{ name: 'OPLBNAME', type: 'string' },
|
|
|
{ name: 'BSTYPE', type: 'string' },
|
|
|
{ name: 'CUSTOMERNAME', type: 'string' },
|
|
|
{ name: 'OPSTATUS', type: 'string' },
|
|
|
{ name: 'ACCDATE', type: 'string' },
|
|
|
{ name: 'CUSTNO', type: 'string' },
|
|
|
{ name: 'MBLNO', type: 'string' },
|
|
|
{ name: 'HBLNO', type: 'string' },
|
|
|
{ name: 'ORDERNO', type: 'string' },
|
|
|
{ name: 'ETD', type: 'string' },
|
|
|
{ name: 'VESSEL', type: 'string' },
|
|
|
{ name: 'VOYNO', type: 'string' },
|
|
|
{ name: 'INPUTBY', type: 'string' },
|
|
|
{ name: 'CREATETIME', type: 'string' },
|
|
|
{ name: 'BSSTATUS', type: 'string' },
|
|
|
{ name: 'FEESTATUS', type: 'string' },
|
|
|
{ name: 'ISVOU', type: 'string' },
|
|
|
{ name: 'VOUNO', type: 'string' },
|
|
|
{ name: 'BSSTATUSREF', type: 'string' },
|
|
|
{ name: 'FEESTATUSREF', type: 'string' },
|
|
|
{ name: 'ETDCLOSEREF', type: 'string' },
|
|
|
{ name: 'DRCLOSEREF', type: 'string' },
|
|
|
{ name: 'CRCLOSEREF', type: 'string' },
|
|
|
{ name: 'DRFEESTATUS', type: 'string' },
|
|
|
{ name: 'CRFEESTATUS', type: 'string' },
|
|
|
{ name: 'ETA', type: 'string' },
|
|
|
{ name: 'SALE', type: 'string' },
|
|
|
{ name: 'OP', type: 'string' },
|
|
|
{ name: 'DOC', type: 'string' },
|
|
|
{ name: 'CUSTSERVICE', type: 'string' },
|
|
|
{ name: 'FRCUSTSERVICE', type: 'string' },
|
|
|
{ name: 'PORTLOAD', type: 'string' },
|
|
|
{ name: 'PORTDISCHARGE', type: 'string' },
|
|
|
{ name: 'DESTINATION', type: 'string' },
|
|
|
{ name: 'CUSTOMNO', type: 'string' },
|
|
|
{ name: 'CONTRACTNO', type: 'string' },
|
|
|
{ name: 'SERVICECONTRACTNO', type: 'string' },
|
|
|
{ name: 'ACCDATE', type: 'string' },
|
|
|
{ name: 'CARRIER', type: 'string' },
|
|
|
{ name: 'AGENTID', type: 'string' },
|
|
|
{ name: 'BSSOURCE', type: 'string' },
|
|
|
{ name: 'BSSOURCEDETAIL', type: 'string' },
|
|
|
{ name: 'CARGOID', type: 'string' },
|
|
|
{ name: 'DCLASS', type: 'string' },
|
|
|
{ name: 'LANE', type: 'string' },
|
|
|
{ name: 'YARD', type: 'string' },
|
|
|
{ name: 'SALEDEPT', type: 'string' },
|
|
|
{ name: 'REMARK', type: 'string' },
|
|
|
{ name: 'REMARK2', type: 'string' },
|
|
|
{ name: 'FORWARDER', type: 'string' },
|
|
|
{ name: 'CNTRTOTAL', type: 'string' },
|
|
|
{ name: 'TRADETYPE', type: 'string' },
|
|
|
{ name: 'GOODSNAME', type: 'string' },
|
|
|
{ name: 'OPDATE', type: 'string' },
|
|
|
{ name: 'CUSTOMDATE', type: 'string' },
|
|
|
{ name: 'ENTERP', type: 'string' },
|
|
|
{ name: 'ISPRINTPR', type: 'string' },
|
|
|
{ name: 'BSCLOSETIME', type: 'string' },
|
|
|
{ name: 'BSCLOSEOP', type: 'string' },
|
|
|
{ name: 'FEECLOSETIME', type: 'string' },
|
|
|
{ name: 'FEECLOSEOP', type: 'string' },
|
|
|
{ name: 'BSUNCLOSETIME', type: 'string' },
|
|
|
{ name: 'BSUNCLOSEOP', type: 'string' },
|
|
|
{ name: 'FEEUNCLOSETIME', type: 'string' },
|
|
|
{ name: 'FEEUNCLOSEOP', type: 'string' },
|
|
|
{ name: 'SALECORP', type: 'string' },
|
|
|
{ name: 'REASON', type: 'string' },
|
|
|
{ name: 'NETWEIGHT', type: 'number' },
|
|
|
{ name: 'KGS', type: 'number' },
|
|
|
{ name: 'TEU', type: 'number' },
|
|
|
{ name: 'CNTR1', type: 'number' },
|
|
|
{ name: 'CNTR2', type: 'number' },
|
|
|
{ name: 'CNTR3', type: 'number' },
|
|
|
{ name: 'CNTR4', type: 'number' },
|
|
|
{ name: 'CNTR5', type: 'number' },
|
|
|
{ name: 'CNTR6', type: 'number' },
|
|
|
{ name: 'CNTR7', type: 'number' },
|
|
|
{ name: 'CNTR8', type: 'number' },
|
|
|
{ name: 'CNTR9', type: 'number' },
|
|
|
{ name: 'CNTR10', type: 'number' },
|
|
|
{ name: 'OTCNTR', type: 'number' },
|
|
|
{ name: 'RMBDR', type: 'number' },
|
|
|
{ name: 'RMBCR', type: 'number' },
|
|
|
{ name: 'USDDR', type: 'number' },
|
|
|
{ name: 'USDCR', type: 'number' },
|
|
|
{ name: 'OTDR', type: 'number' },
|
|
|
{ name: 'OTCR', type: 'number' },
|
|
|
{ name: 'TTLDR', type: 'number' },
|
|
|
{ name: 'TTLCR', type: 'number' },
|
|
|
{ name: 'RMBPROFIT', type: 'number' },
|
|
|
{ name: 'USDPROFIT', type: 'number' },
|
|
|
{ name: 'OTPROFIT', type: 'number' },
|
|
|
{ name: 'TTLPROFIT', type: 'number' },
|
|
|
{ name: 'TTLINVDR', type: 'number' },
|
|
|
{ name: 'TTLDUIDR', type: 'number' },
|
|
|
{ name: 'PROFITRATE', type: 'string' },
|
|
|
{ name: 'BillFeeStatus', type: 'string' }
|
|
|
|
|
|
],
|
|
|
remoteSort: true,
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
timeout: 120000,
|
|
|
url: '/Account/Chfee_lock/BsListData',
|
|
|
reader: {
|
|
|
id: '',
|
|
|
root: 'data',
|
|
|
totalProperty: 'totalCount'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
//定义Grid
|
|
|
|
|
|
|
|
|
|
|
|
this.Pagenum = Ext.create('Ext.form.field.Number', {
|
|
|
name: 'bottles',
|
|
|
fieldLabel: Zi.LAN.bottles,
|
|
|
labelAlign: 'right',
|
|
|
value: this.PageSize,
|
|
|
maxValue: 100000,
|
|
|
width: 180,
|
|
|
minValue: 0,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
this.initgirdcolums = [{
|
|
|
sortable: true,
|
|
|
dataIndex: 'BSNO',
|
|
|
header: 'BSNO',
|
|
|
hidden: true,
|
|
|
width: 130
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
align: 'center',
|
|
|
dataIndex: 'BSSTATUSREF',
|
|
|
header: Zi.LAN.BSSTATUSREF,
|
|
|
width: 60,
|
|
|
renderer: function (value, cellmeta) {
|
|
|
if (value == '已锁定' || value == '锁定') {
|
|
|
return "<img src='../../../../TruckMng/Content/Images/Lock.png' />";
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
align: 'center',
|
|
|
dataIndex: 'FEESTATUSREF',
|
|
|
header: Zi.LAN.FEESTATUSREF,
|
|
|
width: 60,
|
|
|
renderer: function (value, cellmeta) {
|
|
|
if (value == '已锁定' || value == '锁定') {
|
|
|
return "<img src='../../../../TruckMng/Content/Images/Lock.png' />";
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISVOU',
|
|
|
header: Zi.LAN.ISVOU,
|
|
|
width: 80,
|
|
|
renderer: function (value, meta, record) {
|
|
|
if (value == 'true')
|
|
|
return '√';
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'BillFeeStatus',
|
|
|
header: Zi.LAN.BillFeeStatus, //'整票状态',
|
|
|
width: 60,
|
|
|
renderer: function (value, meta) {
|
|
|
if (value == '0' || value == '') {
|
|
|
return Zi.LAN.WEITIJIAO;
|
|
|
} else if (value == '1') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
return Zi.LAN.ZHENGPIAOTIJIAO;
|
|
|
} else if (value == '2') {
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
return Zi.LAN.SHENHETONGGUO;
|
|
|
} else if (value == '4') {
|
|
|
meta.tdCls = 'feestatus_nopass';
|
|
|
return Zi.LAN.ZHENGPIAOBOHUI;
|
|
|
} else {
|
|
|
return "";
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'VOUNO',
|
|
|
header: Zi.LAN.VOUNO,
|
|
|
width: 70
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISPRINTPR',
|
|
|
header: Zi.LAN.ISPRINTPR ,
|
|
|
width: 80,
|
|
|
renderer: function (value, meta, record) {
|
|
|
if (value == '1')
|
|
|
return '√';
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'DRFEESTATUS',
|
|
|
header: Zi.LAN.DRFEESTATUS,
|
|
|
align: 'center',
|
|
|
width: 60,
|
|
|
renderer: function (value, meta) {
|
|
|
var svalue = "";
|
|
|
if (value != "") {
|
|
|
if (value == '0:') {
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
svalue = Zi.LAN.SHENHETONGGUO;
|
|
|
} else if (value == '1:') {
|
|
|
|
|
|
svalue = Zi.LAN.LURUZHUAGNTAI;
|
|
|
} else if (value == '2:') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
svalue = Zi.LAN.TIJIAOSHENHE;
|
|
|
} else if (value == '8:') {
|
|
|
meta.tdCls = 'feestatus_settlepart';
|
|
|
svalue = Zi.LAN.BUFENJIESUAN;
|
|
|
} else if (value == '9:') {
|
|
|
meta.tdCls = 'feestatus_settle';
|
|
|
svalue = Zi.LAN.JIESUANWANBI;
|
|
|
} else if (value == '') {
|
|
|
svalue = Zi.LAN.WEILURU;
|
|
|
} else if (value.indexOf("9:") > -1) {
|
|
|
meta.tdCls = 'feestatus_settlepart';
|
|
|
svalue = Zi.LAN.BUFENJIESUAN;
|
|
|
} else if (value.indexOf("0:") > -1) {
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
svalue = Zi.LAN.BUFENSHENHE;
|
|
|
} else if (value.indexOf("2:") > -1) {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
svalue = Zi.LAN.BUFENTIJIAO;
|
|
|
}
|
|
|
}
|
|
|
return svalue;
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CRFEESTATUS',
|
|
|
header: Zi.LAN.CRFEESTATUS ,
|
|
|
align: 'center',
|
|
|
width: 60,
|
|
|
renderer: function (value, meta) {
|
|
|
var svalue = "";
|
|
|
if (value != "") {
|
|
|
if (value == '0:') {
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
svalue = Zi.LAN.SHENHETONGGUO;
|
|
|
} else if (value == '1:') {
|
|
|
|
|
|
svalue = Zi.LAN.LURUZHUAGNTAI;
|
|
|
} else if (value == '2:') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
svalue = Zi.LAN.TIJIAOSHENHE;
|
|
|
} else if (value == '8:') {
|
|
|
meta.tdCls = 'feestatus_settlepart';
|
|
|
svalue = Zi.LAN.BUFENJIESUAN;
|
|
|
} else if (value == '9:') {
|
|
|
meta.tdCls = 'feestatus_settle';
|
|
|
svalue = Zi.LAN.JIESUANWANBI;
|
|
|
} else if (value == '') {
|
|
|
svalue = Zi.LAN.WEILURU;
|
|
|
} else if (value.indexOf("9:") > -1) {
|
|
|
meta.tdCls = 'feestatus_settlepart';
|
|
|
svalue = Zi.LAN.BUFENJIESUAN;
|
|
|
} else if (value.indexOf("0:") > -1) {
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
svalue = Zi.LAN.BUFENSHENHE;
|
|
|
} else if (value.indexOf("2:") > -1) {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
svalue = Zi.LAN.BUFENTIJIAO;
|
|
|
}
|
|
|
}
|
|
|
return svalue;
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
align: 'center',
|
|
|
dataIndex: 'ETDCLOSEREF',
|
|
|
header: Zi.LAN.ETDCLOSEREF,
|
|
|
width: 60,
|
|
|
renderer: function (value, cellmeta) {
|
|
|
if (value == '已锁定' || value == '锁定') {
|
|
|
return "<img src='../../../../TruckMng/Content/Images/Lock.png' />";
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
align: 'center',
|
|
|
dataIndex: 'DRCLOSEREF',
|
|
|
header: Zi.LAN.DRCLOSEREF,
|
|
|
width: 60,
|
|
|
renderer: function (value, cellmeta) {
|
|
|
if (value == '已锁定' || value == '锁定') {
|
|
|
return "<img src='../../../../TruckMng/Content/Images/Lock.png' />";
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
align: 'center',
|
|
|
dataIndex: 'CRCLOSEREF',
|
|
|
header: Zi.LAN.CRCLOSEREF,
|
|
|
width: 60,
|
|
|
renderer: function (value, cellmeta) {
|
|
|
if (value == '已锁定' || value == '锁定') {
|
|
|
return "<img src='../../../../TruckMng/Content/Images/Lock.png' />";
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
align: 'center',
|
|
|
dataIndex: 'TTLDUIDR',
|
|
|
header: Zi.LAN.TTLDUIDR ,
|
|
|
width: 60,
|
|
|
renderer: function (value, cellmeta, record) {
|
|
|
var ttldr = record.data.TTLDR;
|
|
|
if (value == 0)
|
|
|
return Zi.LAN.WEIDUIZHANG;
|
|
|
else if (value == ttldr) {
|
|
|
cellmeta.tdCls = 'feestatus_pass';
|
|
|
return Zi.LAN.YIDUIZHANG;
|
|
|
}
|
|
|
else if (value != ttldr) {
|
|
|
cellmeta.tdCls = 'feestatus_refer';
|
|
|
return Zi.LAN.BUFENDUIZHANG;
|
|
|
}
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
align: 'center',
|
|
|
dataIndex: 'TTLINVDR',
|
|
|
header: Zi.LAN.DRINVSTATUS,
|
|
|
width: 60,
|
|
|
renderer: function (value, cellmeta, record) {
|
|
|
var openSet = "height=200, width=650, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 250) / 2 + ",Left= " + (screen.width - 600) / 2
|
|
|
var openType = "_blank";
|
|
|
var openUrl = "";
|
|
|
openUrl = "../../MvcShipping/MsRptChInvTotal/BsView?handle=check&bsno=" + record.data.BSNO;
|
|
|
var winstr = "window.open(this.href,'" + openType + "','" + openSet + "')";
|
|
|
var ttldr = record.data.TTLDR;
|
|
|
if (value == 0)
|
|
|
return Zi.LAN.WEIKAIPIAO;
|
|
|
else if (value == ttldr) {
|
|
|
value = '<a href="' + openUrl + '" onclick="' + winstr + ';return false">' + Zi.LAN.YIKAIPIAO+'</a>'
|
|
|
cellmeta.tdCls = 'feestatus_pass';
|
|
|
return value;
|
|
|
}
|
|
|
else if (value != ttldr) {
|
|
|
cellmeta.tdCls = 'feestatus_refer';
|
|
|
value = '<a href="' + openUrl + '" onclick="' + winstr + ';return false">' + Zi.LAN.BOFENKAIPIAO+'</a>'
|
|
|
return value;
|
|
|
}
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'OPLBNAME',
|
|
|
header: Zi.LAN.OPLBNAME,
|
|
|
width: 70
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'BLTYPE',
|
|
|
header: Zi.LAN.BLTYPE,
|
|
|
width: 70
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'OPTYPE',
|
|
|
header: Zi.LAN.AMEND ,
|
|
|
width: 70,
|
|
|
renderer: function (value, cellmeta) {
|
|
|
if (value == '更改单') {
|
|
|
return Zi.LAN.GENGGAIDAN;
|
|
|
} if (value == '普通货') {
|
|
|
return Zi.LAN.PUTONGHUO;
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'BSTYPE',
|
|
|
header: Zi.LAN.BSTYPE,
|
|
|
width: 70,
|
|
|
renderer: function (value, cellmeta) {
|
|
|
if (value == '海运出口') {
|
|
|
return Zi.LAN.HYCK;
|
|
|
} if (value == '海运进口') {
|
|
|
return Zi.LAN.HYJK;
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'OPSTATUS',
|
|
|
header: Zi.LAN.OPSTATUS,
|
|
|
width: 60
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ACCDATE',
|
|
|
header: Zi.LAN.ACCDATE,
|
|
|
width: 86
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'OPDATE',
|
|
|
header: Zi.LAN.OPDATE ,
|
|
|
width: 86
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTOMDATE',
|
|
|
header: Zi.LAN.CUSTOMDATE,
|
|
|
width: 86
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTOMERNAME',
|
|
|
header: Zi.LAN.CUSTOMERNAME,
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTNO',
|
|
|
header: Zi.LAN.CUSTNO,
|
|
|
width: 136,
|
|
|
renderer: function (value, meta) {
|
|
|
|
|
|
meta.tdCls = 'mblno';
|
|
|
|
|
|
btnurl = getGridCopyButton(value);
|
|
|
|
|
|
return btnurl + value;
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTOMNO',
|
|
|
header: Zi.LAN.CUSTOMNO,
|
|
|
width: 136
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CONTRACTNO',
|
|
|
header: Zi.LAN.CONTRACTNO,
|
|
|
width: 136
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'SERVICECONTRACTNO',
|
|
|
header: Zi.LAN.SERVICECONTRACTNO,
|
|
|
width: 136
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ENTERP',
|
|
|
header: Zi.LAN.ENTERP,
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'MBLNO',
|
|
|
header: Zi.LAN.MBLNO,
|
|
|
width: 120,
|
|
|
renderer: function (value, meta) {
|
|
|
|
|
|
meta.tdCls = 'mblno';
|
|
|
|
|
|
btnurl = getGridCopyButton(value);
|
|
|
|
|
|
return btnurl + value;
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'HBLNO',
|
|
|
header: Zi.LAN.HBLNO,
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ORDERNO',
|
|
|
header: Zi.LAN.ORDERNO,
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'BSSOURCE',
|
|
|
header: Zi.LAN.BSSOURCE,
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'BSSOURCEDETAIL',
|
|
|
header: Zi.LAN.BSSOURCEDETAIL,
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'BSCLOSEOP',
|
|
|
header: Zi.LAN.BSCLOSEOP ,
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'BSCLOSETIME',
|
|
|
header: Zi.LAN.BSCLOSETIME,
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'FEECLOSEOP',
|
|
|
header: Zi.LAN.FEECLOSEOP ,
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'FEECLOSETIME',
|
|
|
header: Zi.LAN.FEECLOSETIME,
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'BSUNCLOSEOP',
|
|
|
header: Zi.LAN.BSUNCLOSEOP,
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'BSUNCLOSETIME',
|
|
|
header: Zi.LAN.BSUNCLOSETIME,
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'FEEUNCLOSEOP',
|
|
|
header: Zi.LAN.FEEUNCLOSEOP,
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'FEEUNCLOSETIME',
|
|
|
header: Zi.LAN.FEEUNCLOSETIME,
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ETD',
|
|
|
header: Zi.LAN.ETD,
|
|
|
width: 86
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'VESSEL',
|
|
|
header: Zi.LAN.VESSEL,
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'VOYNO',
|
|
|
header: Zi.LAN.VOYNO,
|
|
|
width: 50
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ETA',
|
|
|
header: Zi.LAN.ETA,
|
|
|
width: 86
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'SALE',
|
|
|
header: Zi.LAN.SALE ,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'OP',
|
|
|
header: Zi.LAN.OP,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'DOC',
|
|
|
header: Zi.LAN.DOC,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTSERVICE',
|
|
|
header: Zi.LAN.CUSTSERVICE,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'FRCUSTSERVICE',
|
|
|
header: Zi.LAN.FRCUSTSERVICE,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PORTLOAD',
|
|
|
header: Zi.LAN.PORTLOAD,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PORTDISCHARGE',
|
|
|
header: Zi.LAN.PORTDISCHARGE,
|
|
|
width: 150
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'DESTINATION',
|
|
|
header: Zi.LAN.DESTINATION,
|
|
|
width: 150
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CARRIER',
|
|
|
header: Zi.LAN.CARRIER,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'AGENTID',
|
|
|
header: Zi.LAN.AGENTID,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CARGOID',
|
|
|
header: Zi.LAN.CARGOID,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'DCLASS',
|
|
|
header: Zi.LAN.DCLASS,
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'TEU',
|
|
|
header: 'TEU',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'KGS',
|
|
|
header: 'KGS',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'GOODSNAME',
|
|
|
header: Zi.LAN.GOODSNAME,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'LANE',
|
|
|
header: Zi.LAN.LANE,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'SALEDEPT',
|
|
|
header: Zi.LAN.SALEDEPT,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'YARD',
|
|
|
header: Zi.LAN.YARD,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CNTRTOTAL',
|
|
|
header: Zi.LAN.CNTRTOTAL,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'SALECORP',
|
|
|
header: Zi.LAN.SALECORP,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'REASON',
|
|
|
header: Zi.LAN.REASON,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'REMARK',
|
|
|
header: Zi.LAN.REMARK,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'REMARK2',
|
|
|
header: Zi.LAN.REMARK2,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'RMBDR',
|
|
|
header: Zi.LAN.RMBDR,
|
|
|
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;
|
|
|
},
|
|
|
summaryType: 'sum',
|
|
|
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
|
|
|
value = usMoney(value, 2, '', true);
|
|
|
return value;
|
|
|
},
|
|
|
align: 'right',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'RMBCR',
|
|
|
header: Zi.LAN.RMBCR,
|
|
|
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;
|
|
|
},
|
|
|
summaryType: 'sum',
|
|
|
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
|
|
|
value = usMoney(value, 2, '', true);
|
|
|
return value;
|
|
|
},
|
|
|
align: 'right',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'RMBPROFIT',
|
|
|
header: Zi.LAN.RMBPROFIT,
|
|
|
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;
|
|
|
},
|
|
|
summaryType: 'sum',
|
|
|
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
|
|
|
value = usMoney(value, 2, '', true);
|
|
|
return value;
|
|
|
},
|
|
|
align: 'right',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'USDDR',
|
|
|
header: Zi.LAN.USDDR,
|
|
|
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;
|
|
|
},
|
|
|
summaryType: 'sum',
|
|
|
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
|
|
|
value = usMoney(value, 2, '', true);
|
|
|
return value;
|
|
|
},
|
|
|
align: 'right',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'USDCR',
|
|
|
header: Zi.LAN.USDCR,
|
|
|
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;
|
|
|
},
|
|
|
summaryType: 'sum',
|
|
|
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
|
|
|
value = usMoney(value, 2, '', true);
|
|
|
return value;
|
|
|
},
|
|
|
align: 'right',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'USDPROFIT',
|
|
|
header: Zi.LAN.USDPROFIT,
|
|
|
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;
|
|
|
},
|
|
|
summaryType: 'sum',
|
|
|
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
|
|
|
value = usMoney(value, 2, '', true);
|
|
|
return value;
|
|
|
},
|
|
|
align: 'right',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'OTDR',
|
|
|
header: Zi.LAN.OTDR ,
|
|
|
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;
|
|
|
},
|
|
|
summaryType: 'sum',
|
|
|
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
|
|
|
value = usMoney(value, 2, '', true);
|
|
|
return value;
|
|
|
},
|
|
|
align: 'right',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'OTCR',
|
|
|
header: Zi.LAN.OTCR,
|
|
|
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;
|
|
|
},
|
|
|
summaryType: 'sum',
|
|
|
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
|
|
|
value = usMoney(value, 2, '', true);
|
|
|
return value;
|
|
|
},
|
|
|
align: 'right',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'OTPROFIT',
|
|
|
header: Zi.LAN.OTPROFIT,
|
|
|
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;
|
|
|
},
|
|
|
summaryType: 'sum',
|
|
|
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
|
|
|
value = usMoney(value, 2, '', true);
|
|
|
return value;
|
|
|
},
|
|
|
align: 'right',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'TTLDR',
|
|
|
header: Zi.LAN.TTLDR,
|
|
|
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;
|
|
|
},
|
|
|
summaryType: 'sum',
|
|
|
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
|
|
|
value = usMoney(value, 2, '', true);
|
|
|
return value;
|
|
|
},
|
|
|
align: 'right',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'TTLCR',
|
|
|
header: Zi.LAN.TTLCR,
|
|
|
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;
|
|
|
},
|
|
|
summaryType: 'sum',
|
|
|
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
|
|
|
value = usMoney(value, 2, '', true);
|
|
|
return value;
|
|
|
},
|
|
|
align: 'right',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'TTLPROFIT',
|
|
|
header: Zi.LAN.TTLPROFIT,
|
|
|
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;
|
|
|
},
|
|
|
summaryType: 'sum',
|
|
|
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
|
|
|
value = usMoney(value, 2, '', true);
|
|
|
return value;
|
|
|
},
|
|
|
align: 'right',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PROFITRATE',
|
|
|
header: Zi.LAN.PROFITRATE,
|
|
|
width: 80
|
|
|
}
|
|
|
|
|
|
];
|
|
|
this.girdcolums = this.initgirdcolums;
|
|
|
|
|
|
this.GridCheckBoxModel = Ext.create('Ext.selection.CheckboxModel');
|
|
|
|
|
|
this.gridList = new Ext.grid.GridPanel({
|
|
|
store: this.storeList,
|
|
|
enableHdMenu: false,
|
|
|
region: 'center',
|
|
|
loadMask: { msg: Zi.LAN.ShuJuJiaZaiZhongQingShaoDeng },
|
|
|
trackMouseOver: true,
|
|
|
disableSelection: false,
|
|
|
selModel: this.GridCheckBoxModel,
|
|
|
columns: this.girdcolums,
|
|
|
viewConfig: {
|
|
|
enableTextSelection: true
|
|
|
},
|
|
|
features: [{
|
|
|
ftype: 'summary'//Ext.grid.feature.Summary表格汇总特性
|
|
|
}],
|
|
|
// paging bar on the bottom
|
|
|
bbar: [Ext.create('Ext.PagingToolbar', {
|
|
|
store: this.storeList,
|
|
|
displayInfo: true,
|
|
|
displayMsg: Zi.LAN.displayMsg ,
|
|
|
emptyMsg: Zi.LAN.emptyMsg
|
|
|
}), this.Pagenum]
|
|
|
});
|
|
|
|
|
|
this.gridList.addListener('itemdblclick', function (dataview, record, item, index, e, b) {
|
|
|
this.SelectedRecord = record;
|
|
|
var openSet = "height=700, width=1024, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 750) / 2 + ",Left= " + (screen.width - 1100) / 2
|
|
|
var openType = "_blank";
|
|
|
var openUrl = "/Account/Chfee_lock/Chfee_lockDetail";
|
|
|
window.open(openUrl, openType, openSet);
|
|
|
|
|
|
}, this);
|
|
|
|
|
|
this.girdcolums = DsTruck.GetGridPanel(USERID, this.formname, this.girdcolums, 1); //使用者id,表名,中间column数组,跳过一开始的几列
|
|
|
this.gridList.reconfigure(this.storeList, this.girdcolums);
|
|
|
this.gridList.columns[1] = new Ext.grid.RowNumberer();
|
|
|
|
|
|
this.gridList.addListener('sortchange', function (ct, column, direction, eOpts) {
|
|
|
this.sortfield = column.dataIndex;
|
|
|
this.sortdire = direction;
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
//#region formSearch
|
|
|
|
|
|
//#region formSearch枚举参照相关
|
|
|
|
|
|
this.StoreOpLb = Ext.create('DsExt.ux.RefEnumStore', {});
|
|
|
this.StoreOpLb.load({ params: { enumTypeId: 96005} });
|
|
|
|
|
|
this.comboxOpLb = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: Zi.LAN.OPLBNAME,
|
|
|
store: this.StoreOpLb,
|
|
|
forceSelection: true,
|
|
|
name: 'PS_OPLB',
|
|
|
valueField: 'EnumValueName',
|
|
|
displayField: 'EnumValueName',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.storeBsType = Ext.create('DsExt.ux.RefEnumStore', {});
|
|
|
this.storeBsType.load({ params: { enumTypeId: 96004} });
|
|
|
|
|
|
this.comboxBsType = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: Zi.LAN.BSTYPE,
|
|
|
store: this.storeBsType,
|
|
|
name: 'PS_BSTYPE',
|
|
|
valueField: 'EnumValueName',
|
|
|
displayField: 'EnumValueName',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.storeSalesCode = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.UserRefModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetUserRefList' }
|
|
|
});
|
|
|
|
|
|
this.storeSalesCode.load();
|
|
|
this.comboxSalesCode = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: Zi.LAN.SALE,
|
|
|
store: this.storeSalesCode,
|
|
|
forceSelection: true,
|
|
|
name: 'PS_SALE',
|
|
|
valueField: 'UserName',
|
|
|
displayField: 'CodeAndName',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.storeOpCode = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.UserRefModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetUserRefList' }
|
|
|
});
|
|
|
|
|
|
this.storeOpCode.load();
|
|
|
|
|
|
this.comboxOp = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: Zi.LAN.OP,
|
|
|
store: this.storeOpCode,
|
|
|
forceSelection: true,
|
|
|
name: 'PS_OP',
|
|
|
valueField: 'UserName',
|
|
|
displayField: 'CodeAndName',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.storeCustCode = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CustomRefModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListController' }
|
|
|
});
|
|
|
|
|
|
// this.storeCustCode.load({ params: { condition: "ISCONTROLLER='1'"} });
|
|
|
this.comboxCustCode = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: Zi.LAN.CUSTOMERNAME,
|
|
|
store: this.storeCustCode,
|
|
|
forceSelection: true,
|
|
|
matchFieldWidth: false, //下拉款自适应宽度
|
|
|
queryMode: 'remote',
|
|
|
minChars: 1,
|
|
|
queryParam: 'CODENAME',
|
|
|
name: 'PS_CUSTOMERNAME',
|
|
|
valueField: 'CustName',
|
|
|
displayField: 'CodeAndName',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
this.storeEnterpCode = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CustomerRefModel',
|
|
|
proxy: { url: '/MvcShipping/MsBaseInfo/GetCustomRefListEnterp' }
|
|
|
});
|
|
|
// this.storeEnterpCode.load({ params: { condition: "ISENTERP='1'"} });
|
|
|
|
|
|
this.comboxEnterp = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: Zi.LAN.ENTERP,
|
|
|
store: this.storeEnterpCode,
|
|
|
forceSelection: true,
|
|
|
queryMode: 'remote',
|
|
|
minChars: 0,
|
|
|
queryParam: 'CODENAME',
|
|
|
name: 'PS_ENTERP',
|
|
|
valueField: 'DESCRIPTION',
|
|
|
displayField: 'CodeAndName',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
this.StoreOpLock = Ext.create('Ext.data.Store', {
|
|
|
fields: ['OpLb', 'NAME']
|
|
|
});
|
|
|
this.StoreOpLock.add({ "OpLb": "全部", "NAME": Zi.LAN.ALL});
|
|
|
this.StoreOpLock.add({ "OpLb": "已锁定", "NAME": Zi.LAN.LOCK });
|
|
|
this.StoreOpLock.add({ "OpLb": "未锁定", "NAME": Zi.LAN.UNLOCK });
|
|
|
|
|
|
this.comboxOpLock = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: Zi.LAN.BSSTATUSREF,
|
|
|
store: this.StoreOpLock,
|
|
|
forceSelection: true,
|
|
|
//labelWidth: 60,
|
|
|
//flex: 0.5,
|
|
|
name: 'PS_OPLOCK',
|
|
|
valueField: 'OpLb',
|
|
|
displayField: 'NAME',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.StoreFeeLock = Ext.create('Ext.data.Store', {
|
|
|
fields: ['OpLb', 'NAME']
|
|
|
});
|
|
|
this.StoreFeeLock.add({ "OpLb": "全部", "NAME": Zi.LAN.ALL });
|
|
|
this.StoreFeeLock.add({ "OpLb": "已锁定", "NAME": Zi.LAN.LOCK });
|
|
|
this.StoreFeeLock.add({ "OpLb": "未锁定", "NAME": Zi.LAN.UNLOCK });
|
|
|
|
|
|
this.comboxFeeLock = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: Zi.LAN.FEESTATUSREF ,
|
|
|
store: this.StoreFeeLock,
|
|
|
forceSelection: true,
|
|
|
//flex: 0.5,
|
|
|
//labelWidth: 60,
|
|
|
name: 'PS_FEELOCK',
|
|
|
valueField: 'OpLb',
|
|
|
displayField: 'NAME',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
this.StoreIsVou = Ext.create('Ext.data.Store', {
|
|
|
fields: ['OpLb', 'NAME']
|
|
|
});
|
|
|
this.StoreIsVou.add({ "OpLb": "全部", "NAME": Zi.LAN.ALL });
|
|
|
this.StoreIsVou.add({ "OpLb": "已生成", "NAME": Zi.LAN.SHENGCHENG });
|
|
|
this.StoreIsVou.add({ "OpLb": "未生成", "NAME": Zi.LAN.WEISHENGCHENG });
|
|
|
|
|
|
this.comboxIsVou = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: Zi.LAN.ISVOU,
|
|
|
store: this.StoreIsVou,
|
|
|
forceSelection: true,
|
|
|
// flex: 0.5,
|
|
|
//labelWidth: 60,
|
|
|
name: 'PS_ISVOU',
|
|
|
valueField: 'OpLb',
|
|
|
displayField: 'NAME',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
this.storeBillFeeStatus = Ext.create('Ext.data.Store', {
|
|
|
fields: ['FSTATUS', 'NAME']
|
|
|
});
|
|
|
this.storeBillFeeStatus.add({ "FSTATUS": "", "NAME": Zi.LAN.ALL });
|
|
|
this.storeBillFeeStatus.add({ "FSTATUS": "0", "NAME": Zi.LAN.WEITIJIAO });
|
|
|
this.storeBillFeeStatus.add({ "FSTATUS": "1", "NAME": Zi.LAN.ZHENGPIAOTIJIAO});
|
|
|
this.storeBillFeeStatus.add({ "FSTATUS": "2", "NAME": Zi.LAN.SHENHETONGGUO});
|
|
|
this.storeBillFeeStatus.add({ "FSTATUS": "4", "NAME": Zi.LAN.ZHENGPIAOBOHUI});
|
|
|
|
|
|
this.comboxBillFeeStatus = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: Zi.LAN.BillFeeStatus , //是否开垫付
|
|
|
store: this.storeBillFeeStatus,
|
|
|
valueField: 'FSTATUS',
|
|
|
displayField: 'NAME',
|
|
|
forceSelection: true,
|
|
|
name: 'BillFeeStatus',
|
|
|
value: '',
|
|
|
// flex: 0.7,
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.storeFSTATUS = Ext.create('Ext.data.Store', {
|
|
|
fields: ['FSTATUS', 'NAME']
|
|
|
});
|
|
|
this.storeFSTATUS.add({ "FSTATUS": "0", "NAME": Zi.LAN.ALL });
|
|
|
this.storeFSTATUS.add({ "FSTATUS": "1", "NAME": Zi.LAN.AUDITBL});
|
|
|
this.storeFSTATUS.add({ "FSTATUS": "2", "NAME": Zi.LAN.NOAUDITBL});
|
|
|
|
|
|
this.comboxFSTATUS = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: Zi.LAN.FSTATUS,
|
|
|
store: this.storeFSTATUS,
|
|
|
valueField: 'FSTATUS',
|
|
|
displayField: 'NAME',
|
|
|
//labelWidth: 60,
|
|
|
//flex: 0.5,
|
|
|
forceSelection: true,
|
|
|
name: 'FSTATUS',
|
|
|
value: '0',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
this.storeOPTYPE = Ext.create('Ext.data.Store', {
|
|
|
fields: ['FSTATUS', 'NAME']
|
|
|
});
|
|
|
this.storeOPTYPE.add({ "FSTATUS": "", "NAME": "" });
|
|
|
this.storeOPTYPE.add({ "FSTATUS": "普通货", "NAME": Zi.LAN.PUTONGHUO });
|
|
|
this.storeOPTYPE.add({ "FSTATUS": "更改单", "NAME": Zi.LAN.GENGGAIDAN });
|
|
|
this.storeOPTYPE.add({ "FSTATUS": "普通货有更改单", "NAME": Zi.LAN.PUTONGHUOYOUGENGGAIDAN });
|
|
|
|
|
|
this.comboxOPTYPE = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: Zi.LAN.AMEND,
|
|
|
store: this.storeOPTYPE,
|
|
|
valueField: 'FSTATUS',
|
|
|
displayField: 'NAME',
|
|
|
//flex: 0.5,
|
|
|
//labelWidth: 60,
|
|
|
forceSelection: true,
|
|
|
name: 'OPTYPE',
|
|
|
value: '',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
this.CheckSaveQuery = new Ext.form.Checkbox({
|
|
|
fieldLabel: Zi.LAN.RememberQuery ,
|
|
|
checked: true,
|
|
|
width: 20
|
|
|
});
|
|
|
|
|
|
this.formSearch = Ext.widget('form', {
|
|
|
frame: true,
|
|
|
region: 'center',
|
|
|
bodyPadding: 5,
|
|
|
fieldDefaults: {
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 70,
|
|
|
msgTarget: 'qtip'
|
|
|
},
|
|
|
|
|
|
items: [
|
|
|
{//fieldset 1
|
|
|
xtype: 'container',
|
|
|
defaultType: 'textfield',
|
|
|
layout: 'anchor',
|
|
|
defaults: {
|
|
|
anchor: '100%'
|
|
|
},
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [this.comboxOpLb, {
|
|
|
fieldLabel: Zi.LAN.PS_MBLNO,
|
|
|
name: 'PS_MBLNO',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: Zi.LAN.VESSEL,
|
|
|
name: 'PS_VESSEL',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: Zi.LAN.VOYNO,
|
|
|
name: 'PS_VOYNO',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// , {
|
|
|
// fieldLabel: '品名',
|
|
|
// name: 'PS_GOODSNAME',
|
|
|
// enableKeyEvents: true,
|
|
|
// listeners: {
|
|
|
// specialkey: function (field, e) {
|
|
|
// if (e.getKey() == e.ENTER) {
|
|
|
// _this.onRefreshClick();
|
|
|
// }
|
|
|
// }
|
|
|
// }
|
|
|
// },
|
|
|
|
|
|
|
|
|
, this.comboxOp, this.comboxBillFeeStatus, this.comboxFSTATUS
|
|
|
]
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [this.comboxBsType, this.comboxSalesCode, this.comboxCustCode, {
|
|
|
fieldLabel: Zi.LAN.PS_EXPDATEBGN ,
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'PS_EXPDATEBGN',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: Zi.LAN.PS_EXPDATEEND ,
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'PS_EXPDATEEND',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, this.comboxOpLock, this.comboxFeeLock
|
|
|
]
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [this.comboxEnterp, {
|
|
|
fieldLabel: '从ETD',
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'PS_ETDDATEBGN',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: '到ETD',
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'PS_ETDDATEEND',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: '从会计期间',
|
|
|
xtype: 'monthfield',
|
|
|
name: 'PS_ACCDATEBGN',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: '到会计期间',
|
|
|
xtype: 'monthfield',
|
|
|
name: 'PS_ACCDATEEND',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, this.comboxIsVou, this.comboxOPTYPE
|
|
|
]
|
|
|
}
|
|
|
]//end items(fieldset 1)
|
|
|
}//end fieldset 1
|
|
|
]//end root items
|
|
|
|
|
|
});
|
|
|
|
|
|
//#endregion formSearch
|
|
|
|
|
|
//查询工具条
|
|
|
_this = this;
|
|
|
this.SearchBtn = new Ext.Button({
|
|
|
text: Zi.LAN.HideQuery,
|
|
|
handler: function () {
|
|
|
if (_this.SearchBtn.text == Zi.LAN.HideQuery) {
|
|
|
_this.panelSearch.hide();
|
|
|
_this.SearchBtn.setText(Zi.LAN.ShowQuery);
|
|
|
|
|
|
} else {
|
|
|
|
|
|
_this.panelSearch.show();
|
|
|
_this.SearchBtn.setText(Zi.LAN.HideQuery);
|
|
|
|
|
|
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.panelBtn = new Ext.Panel({
|
|
|
region: "north",
|
|
|
tbar: [
|
|
|
{
|
|
|
text: Zi.LAN.Refresh,
|
|
|
iconCls: "btnrefresh",
|
|
|
handler: function (button, event) {
|
|
|
|
|
|
var isvisible = true;
|
|
|
var issavevalue = false;
|
|
|
|
|
|
if (_this.SearchBtn.text == Zi.LAN.HideQuery)
|
|
|
isvisible = true
|
|
|
else
|
|
|
isvisible = false;
|
|
|
if (this.CheckSaveQuery.checked)
|
|
|
issavevalue = true
|
|
|
|
|
|
saveQuerySetting(this.formname, this.formSearch, isvisible, issavevalue);
|
|
|
this.onRefreshClick(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: Zi.LAN.btnCreateVoucher,
|
|
|
id: "btnCreateVoucher",
|
|
|
handler: function (button, event) {
|
|
|
_this.winCreateVouShow.show();
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: Zi.LAN.FEESTATUSREF,
|
|
|
id: "btnFeeLock",
|
|
|
handler: function (button, event) {
|
|
|
this.winFeeCloseShow.show();
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
text: "费用解锁",
|
|
|
id: "btnFeeUnLock",
|
|
|
handler: function (button, event) {
|
|
|
this.winFeeUnCloseShow.show();
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
text: Zi.LAN.BSSTATUSREF,
|
|
|
id: "btnBsLock",
|
|
|
handler: function (button, event) {
|
|
|
this.winBsCloseShow.show();
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
text: Zi.LAN.btnBsUnLock,
|
|
|
id: "btnBsUnLock",
|
|
|
menu: [
|
|
|
{
|
|
|
text: Zi.LAN.btnBsSelectUnLock,
|
|
|
handler: function (menu, event) {
|
|
|
_this.onSelUnLockClick(2,'1','0');
|
|
|
}
|
|
|
}, {
|
|
|
text: Zi.LAN.btnBsAllUnLock,
|
|
|
handler: function (menu, event) {
|
|
|
_this.onAllUnLockClick(2, '1','0');
|
|
|
}
|
|
|
}],
|
|
|
scope: this
|
|
|
}, {
|
|
|
text: Zi.LAN.ETDCLOSE,
|
|
|
hidden: true,
|
|
|
id: "BSCLOSE-ETDCLOSE",
|
|
|
menu: [{
|
|
|
text: Zi.LAN.ETDCLOSEDATE,
|
|
|
handler: function (menu, event) {
|
|
|
_this.winETDCLOSEDATEShow.show();
|
|
|
}
|
|
|
},{
|
|
|
text: Zi.LAN.ETDSELECTCLOSE,
|
|
|
handler: function (menu, event) {
|
|
|
_this.onSelBsLockClick('ETD');
|
|
|
}
|
|
|
}, {
|
|
|
text: Zi.LAN.ETDALLCLOSE,
|
|
|
handler: function (menu, event) {
|
|
|
_this.onAllBsLockClick('ETD');
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
text: Zi.LAN.ETDSELECTUNCLOSE,
|
|
|
handler: function (menu, event) {
|
|
|
_this.onSelBsUnLockClick('ETD');
|
|
|
}
|
|
|
}, {
|
|
|
text: Zi.LAN.ETDALLUNCLOSE,
|
|
|
handler: function (menu, event) {
|
|
|
_this.onAllBsUnLockClick('ETD');
|
|
|
}
|
|
|
}],
|
|
|
scope: this
|
|
|
}, {
|
|
|
text: Zi.LAN.DRCLOSE,
|
|
|
hidden: true,
|
|
|
id: "BSCLOSE-DRCLOSE",
|
|
|
menu: [{
|
|
|
text: Zi.LAN.DRSELECTCLOSE,
|
|
|
handler: function (menu, event) {
|
|
|
_this.onSelBsLockClick('应收');
|
|
|
}
|
|
|
}, {
|
|
|
text: Zi.LAN.DRALLCLOSE,
|
|
|
handler: function (menu, event) {
|
|
|
_this.onAllBsLockClick('应收');
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
text: Zi.LAN.DRSELECTUNCLOSE,
|
|
|
handler: function (menu, event) {
|
|
|
_this.onSelBsUnLockClick('应收');
|
|
|
}
|
|
|
}, {
|
|
|
text: Zi.LAN.DRALLUNCLOSE,
|
|
|
handler: function (menu, event) {
|
|
|
_this.onAllBsUnLockClick('应收');
|
|
|
}
|
|
|
}],
|
|
|
scope: this
|
|
|
}, {
|
|
|
text: Zi.LAN.CRCLOSE,
|
|
|
hidden: true,
|
|
|
id: "BSCLOSE-CRCLOSE",
|
|
|
menu: [{
|
|
|
text: Zi.LAN.CRSELECTCLOSE,
|
|
|
handler: function (menu, event) {
|
|
|
_this.onSelBsLockClick('应付');
|
|
|
}
|
|
|
}, {
|
|
|
text: Zi.LAN.CRALLCLOSE,
|
|
|
handler: function (menu, event) {
|
|
|
_this.onAllBsLockClick('应付');
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
text: Zi.LAN.CRSELECTUNCLOSE ,
|
|
|
handler: function (menu, event) {
|
|
|
_this.onSelBsUnLockClick('应付');
|
|
|
}
|
|
|
}, {
|
|
|
text: Zi.LAN.CRALLUNCLOSE,
|
|
|
handler: function (menu, event) {
|
|
|
_this.onAllBsUnLockClick('应付');
|
|
|
}
|
|
|
}],
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
xtype: 'button',
|
|
|
text: Zi.LAN.btnmore ,
|
|
|
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
|
|
|
}, '-',
|
|
|
{
|
|
|
text: Zi.LAN.btnprint,
|
|
|
iconCls: 'btnprint',
|
|
|
menu: [
|
|
|
{
|
|
|
text: Zi.LAN.Print,
|
|
|
handler: function (menu, event) {
|
|
|
_this.Print();
|
|
|
}
|
|
|
}, {
|
|
|
text: Zi.LAN.PrintSelect,
|
|
|
handler: function (menu, event) {
|
|
|
_this.PrintSelect();
|
|
|
}
|
|
|
}, {
|
|
|
text: Zi.LAN.ISPRINTPR,
|
|
|
handler: function (menu, event) {
|
|
|
_this.onPrintGainClick();
|
|
|
}
|
|
|
}],
|
|
|
|
|
|
|
|
|
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: Zi.LAN.btnExportExcel,
|
|
|
id: "btnExportExcel",
|
|
|
iconCls: 'btnexportexcel',
|
|
|
handler: function (button, event) {
|
|
|
this.onExportClick(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', this.SearchBtn, {
|
|
|
xtype: 'button',
|
|
|
width: 90,
|
|
|
text: Zi.LAN.btnreset,
|
|
|
iconCls: "btnreset",
|
|
|
handler: function (button, event) {
|
|
|
this.onClearSql(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: Zi.LAN.btntest,
|
|
|
id: "btntest",
|
|
|
menu: [
|
|
|
{
|
|
|
text: Zi.LAN.SaveGridPanel,
|
|
|
handler: function (button, event) {
|
|
|
this.girdcolums = DsTruck.SaveGridPanel(USERID, _this.formname, _this.gridList.columns, _this.girdcolums, 1, true);
|
|
|
}
|
|
|
}, {
|
|
|
text: Zi.LAN.SaveGridPanel2,
|
|
|
handler: function (menu, event) {
|
|
|
_this.InitGrid(_this.initgirdcolums);
|
|
|
_this.girdcolums = DsTruck.SaveGridPanel(USERID, _this.formname, _this.gridList.columns, _this.initgirdcolums, 1, true);
|
|
|
}
|
|
|
}],
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: Zi.LAN.OtherCaoZuo,
|
|
|
menu: [
|
|
|
//{
|
|
|
// text: '查看罐箱业务成本核算',
|
|
|
// handler: function (menu, event) {
|
|
|
// _this.onCheckCtnApply();
|
|
|
// }
|
|
|
//}, {
|
|
|
// text: '查看罐箱业务卡',
|
|
|
// handler: function (menu, event) {
|
|
|
// _this.onCheckCtnBsCard();
|
|
|
// }
|
|
|
//}
|
|
|
|
|
|
],
|
|
|
scope: this
|
|
|
}, '-', this.CheckSaveQuery
|
|
|
]
|
|
|
});
|
|
|
|
|
|
this.CheckAccMonth = new Ext.form.Checkbox({
|
|
|
fieldLabel: Zi.LAN.CheckAccMonth,
|
|
|
checked: false,
|
|
|
width: 100
|
|
|
});
|
|
|
|
|
|
this.CheckBsClose = new Ext.form.Checkbox({
|
|
|
fieldLabel: Zi.LAN.CheckBsClose,
|
|
|
checked: false,
|
|
|
width: 100
|
|
|
});
|
|
|
|
|
|
this.formAccMonthShow = Ext.widget('form', {
|
|
|
frame: true,
|
|
|
region: 'center',
|
|
|
bodyPadding: 5,
|
|
|
fieldDefaults: {
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 85,
|
|
|
msgTarget: 'qtip'
|
|
|
},
|
|
|
|
|
|
items: [
|
|
|
{//fieldset 1
|
|
|
xtype: 'container',
|
|
|
defaultType: 'textfield',
|
|
|
layout: 'anchor',
|
|
|
defaults: {
|
|
|
anchor: '100%'
|
|
|
},
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [this.CheckAccMonth, {
|
|
|
fieldLabel: Zi.LAN.ACCDATE,
|
|
|
xtype: 'monthfield',
|
|
|
name: 'AccDate'
|
|
|
}, this.CheckBsClose
|
|
|
]
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
xtype: 'radiogroup',
|
|
|
id: 'rLOCKTYPE',
|
|
|
defaults: {
|
|
|
flex: 1
|
|
|
},
|
|
|
layout: 'hbox',
|
|
|
items: [
|
|
|
{
|
|
|
boxLabel: Zi.LAN.Select,
|
|
|
name: 'LOCKTYPE',
|
|
|
checked: true,
|
|
|
inputValue: 'S'
|
|
|
}, {
|
|
|
boxLabel: Zi.LAN.Print,
|
|
|
name: 'LOCKTYPE',
|
|
|
inputValue: 'A'
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
]//end items(fieldset 1)
|
|
|
}//end fieldset 1
|
|
|
]//end root items
|
|
|
|
|
|
});
|
|
|
me = this;
|
|
|
|
|
|
|
|
|
this.winFeeCloseShow = Ext.create('Ext.window.Window', {
|
|
|
title: Zi.LAN.FEESTATUSREF,
|
|
|
width: 520,
|
|
|
//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.formAccMonthShow],
|
|
|
buttons: [{
|
|
|
text: Zi.LAN.QuerenFengZhang,
|
|
|
minWidth: 70,
|
|
|
handler: function () {
|
|
|
|
|
|
var form = me.formAccMonthShow.getForm();
|
|
|
var cgLOCKTYPE = Ext.getCmp('rLOCKTYPE');
|
|
|
var LOCKTYPE = cgLOCKTYPE.getValue();
|
|
|
|
|
|
|
|
|
if (me.CheckAccMonth.checked) {
|
|
|
me.AccDate = form.findField('AccDate').getRawValue();
|
|
|
if (me.AccDate == '' || me.AccDate == null || me.AccDate == undefined) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.AccdateMustBe, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
};
|
|
|
me.IsAccDate = '1';
|
|
|
|
|
|
} else me.IsAccDate = '0';
|
|
|
|
|
|
if (LOCKTYPE.LOCKTYPE == 'A') {
|
|
|
_this.onFeeLockAll()
|
|
|
} else {
|
|
|
|
|
|
_this.onSelFeeLockClick()
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|
|
|
}, {
|
|
|
text: Zi.LAN.GuanBi,
|
|
|
minWidth: 70,
|
|
|
handler: function () {
|
|
|
me.winFeeCloseShow.close();
|
|
|
}
|
|
|
}]
|
|
|
});
|
|
|
|
|
|
|
|
|
this.panelTop = new Ext.Panel({
|
|
|
layout: "border",
|
|
|
region: "north",
|
|
|
height: 29,
|
|
|
items: [this.panelBtn]
|
|
|
});
|
|
|
|
|
|
this.panelSearch = new Ext.Panel({
|
|
|
layout: "border",
|
|
|
region: "north",
|
|
|
height: 96,
|
|
|
items: [this.formSearch]
|
|
|
});
|
|
|
|
|
|
this.panelBodyChFee = new Ext.Panel({
|
|
|
title: Zi.LAN.BsDetail,
|
|
|
layout: "border",
|
|
|
region: 'center',
|
|
|
margin: '0 0',
|
|
|
frame: true,
|
|
|
items: [this.gridList]
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.tabpanel = new Ext.TabPanel
|
|
|
({
|
|
|
activeTab: 0,
|
|
|
autoWidth: true,
|
|
|
border: false,
|
|
|
frame: false,
|
|
|
region: 'center',
|
|
|
id: "TabPanelID",
|
|
|
enableTabScroll: true,
|
|
|
items:
|
|
|
[
|
|
|
this.panelBodyChFee
|
|
|
]
|
|
|
});
|
|
|
|
|
|
Ext.apply(this, {
|
|
|
items: [this.panelTop, this.panelSearch, this.tabpanel]
|
|
|
});
|
|
|
|
|
|
this.storeList.on('beforeload', function (store) {
|
|
|
var sql = this.sqlcontext;
|
|
|
Ext.apply(store.proxy.extraParams, { condition: sql, type: locktype,
|
|
|
printstr: 'false'
|
|
|
});
|
|
|
}, this);
|
|
|
|
|
|
this.GetBtnStatus();
|
|
|
|
|
|
this.gridList.reconfigure(this.storeList, this.girdcolums);
|
|
|
this.LoadPeriod();
|
|
|
LoadQueryData(this.formname, this.formSearch, this.CheckSaveQuery);
|
|
|
|
|
|
|
|
|
this.CheckISRATE = new Ext.form.Checkbox({
|
|
|
fieldLabel: Zi.LAN.CheckISRATE,
|
|
|
checked: true,
|
|
|
width: 120
|
|
|
});
|
|
|
|
|
|
|
|
|
this.storeOpCode = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.UserRefModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetUserRefList' }
|
|
|
});
|
|
|
this.storeOpCode.load();
|
|
|
//客服
|
|
|
this.comboxPREPARED = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: Zi.LAN.PREPARED,
|
|
|
store: this.storeOpCode,
|
|
|
forceSelection: true,
|
|
|
name: 'PREPARED',
|
|
|
valueField: 'UserName',
|
|
|
displayField: 'CodeAndName',
|
|
|
value: SHOWNAME
|
|
|
});
|
|
|
|
|
|
|
|
|
this.formCreateVouShow = Ext.widget('form', {
|
|
|
frame: true,
|
|
|
region: 'center',
|
|
|
bodyPadding: 5,
|
|
|
fieldDefaults: {
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 85,
|
|
|
msgTarget: 'qtip'
|
|
|
},
|
|
|
|
|
|
items: [
|
|
|
{//fieldset 1
|
|
|
xtype: 'container',
|
|
|
defaultType: 'textfield',
|
|
|
layout: 'anchor',
|
|
|
defaults: {
|
|
|
anchor: '100%'
|
|
|
},
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [this.CheckISRATE, {
|
|
|
fieldLabel: Zi.LAN.tbRATE,
|
|
|
id: 'tbRATE',
|
|
|
name: 'tbRATE'
|
|
|
}
|
|
|
]
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [this.comboxPREPARED, {
|
|
|
fieldLabel: Zi.LAN.VouDate,
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'VouDate'
|
|
|
}
|
|
|
]
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
xtype: 'radiogroup',
|
|
|
id: 'rSLTYPE',
|
|
|
defaults: {
|
|
|
flex: 1
|
|
|
},
|
|
|
layout: 'hbox',
|
|
|
items: [
|
|
|
{
|
|
|
boxLabel: Zi.LAN.Select,
|
|
|
name: 'SLTYPE',
|
|
|
checked: true,
|
|
|
inputValue: 'S'
|
|
|
}, {
|
|
|
boxLabel: Zi.LAN.All,
|
|
|
name: 'SLTYPE',
|
|
|
inputValue: 'A'
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
]//end items(fieldset 1)
|
|
|
}//end fieldset 1
|
|
|
]//end root items
|
|
|
|
|
|
});
|
|
|
me = this;
|
|
|
|
|
|
|
|
|
this.winCreateVouShow = Ext.create('Ext.window.Window', {
|
|
|
title: Zi.LAN.btnCreateVoucher,
|
|
|
width: 420,
|
|
|
//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.formCreateVouShow],
|
|
|
buttons: [{
|
|
|
text: Zi.LAN.btnCreateVoucher,
|
|
|
minWidth: 70,
|
|
|
handler: function () {
|
|
|
|
|
|
var form = me.formCreateVouShow.getForm();
|
|
|
var cgLOCKTYPE = Ext.getCmp('rSLTYPE');
|
|
|
var SLTYPE = cgLOCKTYPE.getValue();
|
|
|
me.VOUDATE = form.findField('VouDate').getRawValue();
|
|
|
if (me.VOUDATE == '') {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.VouDateMustBe, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
me.PREPARED = form.findField('PREPARED').getValue();
|
|
|
me.tbRATE = form.findField('tbRATE').getValue();
|
|
|
if (me.CheckISRATE.checked) {
|
|
|
me.ISRATE = true;
|
|
|
|
|
|
} else me.ISRATE = false;
|
|
|
|
|
|
if (SLTYPE.SLTYPE== 'A') {
|
|
|
me.onCreateVoucherAll()
|
|
|
} else {
|
|
|
|
|
|
me.onCreateVoucherSel()
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|
|
|
}, {
|
|
|
text: Zi.LAN.GuanBi,
|
|
|
minWidth: 70,
|
|
|
handler: function () {
|
|
|
me.winCreateVouShow.close();
|
|
|
}
|
|
|
}]
|
|
|
});
|
|
|
|
|
|
Ext.define('MsFeeCurr', {
|
|
|
extend: 'Ext.data.Model',
|
|
|
idProperty: 'CURR',
|
|
|
fields: [
|
|
|
{ name: 'CURR', type: 'string' },
|
|
|
{ name: 'DEFRATE', type: 'number' },
|
|
|
{ name: 'CRDEFRATE', type: 'number' }
|
|
|
]
|
|
|
});
|
|
|
|
|
|
this.StoreDateCurr = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'MsFeeCurr',
|
|
|
proxy: { url: '/MvcShipping/MsChFee/GetFeeNowCurrList' }
|
|
|
});
|
|
|
this.StoreDateCurr.load({ params: { optype: "modPayFeeSettlementLock" },
|
|
|
callback: function (r, options, success) {
|
|
|
if (success) {
|
|
|
if (r.length != 0) {
|
|
|
var records = DsStoreQueryBy(_this.StoreDateCurr, 'CURR', 'USD');
|
|
|
if (records.getCount() > 0) {
|
|
|
var ffdata = records.getAt(0).data;
|
|
|
var DEFRATE = ffdata.DEFRATE;
|
|
|
Ext.getCmp('tbRATE').setValue(DEFRATE);
|
|
|
} else {
|
|
|
Ext.getCmp('tbRATE').setValue(0);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '',
|
|
|
url: '/MvcShipping/MsBaseInfo/GetUserModuleEnable',
|
|
|
params: {
|
|
|
modulename: "modBsLockBig"
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (result.Success != true) {
|
|
|
_this.CheckBsClose.setVisible(false);
|
|
|
} else {
|
|
|
_this.CheckBsClose.setVisible(true);
|
|
|
}
|
|
|
} else {
|
|
|
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.CheckUnBsClose = new Ext.form.Checkbox({
|
|
|
fieldLabel: Zi.LAN.CheckUnBsClose,
|
|
|
checked: false,
|
|
|
width: 100
|
|
|
});
|
|
|
|
|
|
this.CheckUnFeeDrCrClose = new Ext.form.Checkbox({
|
|
|
fieldLabel: Zi.LAN.CheckUnFeeDrCrClose,
|
|
|
checked: false,
|
|
|
width: 100
|
|
|
});
|
|
|
|
|
|
this.formUnCloseShow = Ext.widget('form', {
|
|
|
frame: true,
|
|
|
region: 'center',
|
|
|
bodyPadding: 5,
|
|
|
fieldDefaults: {
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 85,
|
|
|
msgTarget: 'qtip'
|
|
|
},
|
|
|
|
|
|
items: [
|
|
|
{//fieldset 1
|
|
|
xtype: 'container',
|
|
|
defaultType: 'textfield',
|
|
|
layout: 'anchor',
|
|
|
defaults: {
|
|
|
anchor: '100%'
|
|
|
},
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [this.CheckUnBsClose, this.CheckUnFeeDrCrClose
|
|
|
]
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
xtype: 'radiogroup',
|
|
|
id: 'runLOCKTYPE',
|
|
|
defaults: {
|
|
|
flex: 1
|
|
|
},
|
|
|
layout: 'hbox',
|
|
|
items: [
|
|
|
{
|
|
|
boxLabel: Zi.LAN.Select,
|
|
|
name: 'LOCKTYPE',
|
|
|
checked: true,
|
|
|
inputValue: 'S'
|
|
|
}, {
|
|
|
boxLabel: Zi.LAN.All,
|
|
|
name: 'LOCKTYPE',
|
|
|
inputValue: 'A'
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
]//end items(fieldset 1)
|
|
|
}//end fieldset 1
|
|
|
]//end root items
|
|
|
|
|
|
});
|
|
|
me = this;
|
|
|
|
|
|
|
|
|
this.winFeeUnCloseShow = Ext.create('Ext.window.Window', {
|
|
|
title: Zi.LAN.FeeUnClose,
|
|
|
width: 520,
|
|
|
//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.formUnCloseShow ],
|
|
|
buttons: [{
|
|
|
text: Zi.LAN.QueFeeUnClose,
|
|
|
minWidth: 70,
|
|
|
handler: function () {
|
|
|
|
|
|
var form = me.formUnCloseShow.getForm();
|
|
|
var cgLOCKTYPE = Ext.getCmp('runLOCKTYPE');
|
|
|
var LOCKTYPE = cgLOCKTYPE.getValue();
|
|
|
var bsunclose = '0';
|
|
|
var feedrcrunclose = '0';
|
|
|
if (me.CheckUnBsClose.checked) bsunclose = '1';
|
|
|
if (me.CheckUnFeeDrCrClose.checked) feedrcrunclose = '1';
|
|
|
|
|
|
if (LOCKTYPE.LOCKTYPE == 'A') {
|
|
|
me.onAllUnLockClick(1, bsunclose, feedrcrunclose)
|
|
|
} else {
|
|
|
|
|
|
me.onSelUnLockClick(1, bsunclose, feedrcrunclose)
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|
|
|
}, {
|
|
|
text: Zi.LAN.GuanBi,
|
|
|
minWidth: 70,
|
|
|
handler: function () {
|
|
|
me.winFeeUnCloseShow.close();
|
|
|
}
|
|
|
}]
|
|
|
});
|
|
|
|
|
|
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '',
|
|
|
url: '/MvcShipping/MsBaseInfo/GetUserModuleEnable',
|
|
|
params: {
|
|
|
modulename: "modBsUnLock"
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (result.Success != true) {
|
|
|
_this.CheckUnBsClose.setVisible(false);
|
|
|
} else {
|
|
|
_this.CheckUnBsClose.setVisible(true);
|
|
|
}
|
|
|
} else {
|
|
|
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
this.LoadModuleEnable();
|
|
|
|
|
|
|
|
|
this.formETDCLOSEDATEShow = Ext.widget('form', {
|
|
|
frame: true,
|
|
|
region: 'center',
|
|
|
bodyPadding: 5,
|
|
|
fieldDefaults: {
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 85,
|
|
|
msgTarget: 'qtip'
|
|
|
},
|
|
|
|
|
|
items: [
|
|
|
{//fieldset 1
|
|
|
xtype: 'container',
|
|
|
defaultType: 'textfield',
|
|
|
layout: 'anchor',
|
|
|
defaults: {
|
|
|
anchor: '100%'
|
|
|
},
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: Zi.LAN.CLOSEETDDAY,
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'CLOSEETDDAY'
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
|
|
|
]//end items(fieldset 1)
|
|
|
}//end fieldset 1
|
|
|
]//end root items
|
|
|
|
|
|
});
|
|
|
me = this;
|
|
|
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiChaXunShuJu ,
|
|
|
url: '/MvcShipping/MsCompanys/GetNoPicData',
|
|
|
params: {
|
|
|
condition: " GID='" + COMPANYID+"'"
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
return;
|
|
|
}
|
|
|
data = result.data;
|
|
|
this.formETDCLOSEDATEShow.getForm().findField('CLOSEETDDAY').setValue(data.CLOSEETDDAY);
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert(Zi.LAN.ErroPlsAgain, response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
this.winETDCLOSEDATEShow = Ext.create('Ext.window.Window', {
|
|
|
title: Zi.LAN.ETDCLOSEDATE,
|
|
|
width: 320,
|
|
|
//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.formETDCLOSEDATEShow],
|
|
|
buttons: [{
|
|
|
text: Zi.LAN.QueRen,
|
|
|
minWidth: 70,
|
|
|
handler: function () {
|
|
|
|
|
|
var form = me.formETDCLOSEDATEShow.getForm();
|
|
|
var CLOSEETDDAY = form.findField('CLOSEETDDAY').getRawValue();
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiChaXunShuJu,
|
|
|
url: '/MvcShipping/MsCompanys/SaveEtdCloseDay',
|
|
|
params: {
|
|
|
companyid: COMPANYID,
|
|
|
CLOSEETDDAY: CLOSEETDDAY
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({
|
|
|
title: Zi.LAN.TiShi,
|
|
|
msg: result.Message,
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
buttons: Ext.Msg.OK
|
|
|
});
|
|
|
return;
|
|
|
} else {
|
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert(Zi.LAN.ErroPlsAgain, response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
|
|
|
}
|
|
|
}, {
|
|
|
text: Zi.LAN.GuanBi,
|
|
|
minWidth: 70,
|
|
|
handler: function () {
|
|
|
me.winETDCLOSEDATEShow.close();
|
|
|
}
|
|
|
}]
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
this.CheckBsAccMonth = new Ext.form.Checkbox({
|
|
|
fieldLabel: Zi.LAN.CheckAccMonth,
|
|
|
checked: false,
|
|
|
width: 100
|
|
|
});
|
|
|
|
|
|
this.formBsAccMonthShow = Ext.widget('form', {
|
|
|
frame: true,
|
|
|
region: 'center',
|
|
|
bodyPadding: 5,
|
|
|
fieldDefaults: {
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 85,
|
|
|
msgTarget: 'qtip'
|
|
|
},
|
|
|
|
|
|
items: [
|
|
|
{//fieldset 1
|
|
|
xtype: 'container',
|
|
|
defaultType: 'textfield',
|
|
|
layout: 'anchor',
|
|
|
defaults: {
|
|
|
anchor: '100%'
|
|
|
},
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [this.CheckBsAccMonth, {
|
|
|
fieldLabel: Zi.LAN.ACCDATE,
|
|
|
xtype: 'monthfield',
|
|
|
name: 'AccDate'
|
|
|
}
|
|
|
]
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
xtype: 'radiogroup',
|
|
|
id: 'rBsLOCKTYPE',
|
|
|
defaults: {
|
|
|
flex: 1
|
|
|
},
|
|
|
layout: 'hbox',
|
|
|
items: [
|
|
|
{
|
|
|
boxLabel: Zi.LAN.Select,
|
|
|
name: 'LOCKTYPE',
|
|
|
checked: true,
|
|
|
inputValue: 'S'
|
|
|
}, {
|
|
|
boxLabel: Zi.LAN.All,
|
|
|
name: 'LOCKTYPE',
|
|
|
inputValue: 'A'
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
]//end items(fieldset 1)
|
|
|
}//end fieldset 1
|
|
|
]//end root items
|
|
|
|
|
|
});
|
|
|
me = this;
|
|
|
|
|
|
|
|
|
this.winBsCloseShow = Ext.create('Ext.window.Window', {
|
|
|
title: Zi.LAN.BsClose,
|
|
|
width: 520,
|
|
|
//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.formBsAccMonthShow],
|
|
|
buttons: [{
|
|
|
text: Zi.LAN.QueRen,
|
|
|
minWidth: 70,
|
|
|
handler: function () {
|
|
|
|
|
|
var form = me.formBsAccMonthShow.getForm();
|
|
|
var cgLOCKTYPE = Ext.getCmp('rBsLOCKTYPE');
|
|
|
var LOCKTYPE = cgLOCKTYPE.getValue();
|
|
|
|
|
|
|
|
|
if (me.CheckBsAccMonth.checked) {
|
|
|
me.AccDate = form.findField('AccDate').getRawValue();
|
|
|
if (me.AccDate == '' || me.AccDate == null || me.AccDate == undefined) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.AccdateMustBe, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
};
|
|
|
me.IsAccDate = '1';
|
|
|
|
|
|
} else me.IsAccDate = '0';
|
|
|
|
|
|
if (LOCKTYPE.LOCKTYPE == 'A') {
|
|
|
_this.onAllLockClick(2);
|
|
|
} else {
|
|
|
|
|
|
_this.onSelLockClick(2)
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|
|
|
}, {
|
|
|
text: Zi.LAN.GuanBi,
|
|
|
minWidth: 70,
|
|
|
handler: function () {
|
|
|
me.winBsCloseShow.close();
|
|
|
}
|
|
|
}]
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
}, //end initUIComponents
|
|
|
|
|
|
|
|
|
LoadPeriod: function () {
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiChaXunShuJu,
|
|
|
url: '/Account/ChMonthClose/GetNowPeriod',
|
|
|
params: {
|
|
|
condition: ''
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
return;
|
|
|
}
|
|
|
data = result.data;
|
|
|
this.MsPeriod = data;
|
|
|
this.formAccMonthShow.getForm().findField('AccDate').setMinValue(this.MsPeriod.PERIOD);
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert(Zi.LAN.ErroPlsAgain, response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
},
|
|
|
|
|
|
onSelLockClick: function (type) {
|
|
|
//判断是否具有解锁权限
|
|
|
var autype = type == 2 ? 4 : 3;
|
|
|
_this = this;
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiHuoQuQuanXian,
|
|
|
url: '/Account/Chfee_lock/CheckAuthority',
|
|
|
params: {
|
|
|
autype: autype
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (result.Success) {
|
|
|
var GidStr = '';
|
|
|
var records = _this.GridCheckBoxModel.selected.items;
|
|
|
if (records.length == 0) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.PlsSelect, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
var bodyAddDatas = [];
|
|
|
for (var i = 0; i < records.length; i++) {
|
|
|
var rec = records[i];
|
|
|
var Gid = rec.data.BSNO;
|
|
|
var status = rec.data.BSSTATUS;
|
|
|
if (type == 2)
|
|
|
status = rec.data.BSSTATUS
|
|
|
else status = rec.data.FEESTATUS
|
|
|
|
|
|
if (status != true) {
|
|
|
bodyAddDatas.push(rec);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
if (bodyAddDatas.length == 0) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.MeiYouCaoZouShuJu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
|
|
|
url: '/Account/Chfee_lock/SelLock',
|
|
|
timeout: 120000,
|
|
|
params: {
|
|
|
data: jsonbodyAddDatas,
|
|
|
type: type,
|
|
|
isAccDate: _this.IsAccDate,
|
|
|
AccDate: _this.AccDate
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({
|
|
|
title: Zi.LAN.TiShi,
|
|
|
msg: result.Message,
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
buttons: Ext.Msg.OK
|
|
|
});
|
|
|
return;
|
|
|
} else {
|
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
_this.onDsQuery();
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert(Zi.LAN.ErroPlsAgain, response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
}
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.MeiYouQuanXian});
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
onSelFeeLockClick: function (menu, event, type) {
|
|
|
|
|
|
_this = this;
|
|
|
var autype = 3;
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiHuoQuQuanXian,
|
|
|
url: '/Account/Chfee_lock/CheckAuthority',
|
|
|
params: {
|
|
|
autype: autype
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (result.Success) {
|
|
|
var GidStr = '';
|
|
|
var records = _this.GridCheckBoxModel.selected.items;
|
|
|
if (records.length == 0) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.PlsSelect, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if (_this.CheckAccMonth.checked) {
|
|
|
_this.IsAccDate = '1'
|
|
|
} else _this.IsAccDate = '0'
|
|
|
|
|
|
if (_this.CheckBsClose.checked) {
|
|
|
_this.isbslock = '1'
|
|
|
} else _this.isbslock = '0'
|
|
|
|
|
|
var bodyAddDatas = [];
|
|
|
for (var i = 0; i < records.length; i++) {
|
|
|
var rec = records[i];
|
|
|
var Gid = rec.data.BSNO;
|
|
|
var status = rec.data.FEESTATUS
|
|
|
|
|
|
if (status != true) {
|
|
|
bodyAddDatas.push(rec);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
//_this = this;
|
|
|
if (bodyAddDatas.length == 0) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.MeiYouCaoZouShuJu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
|
|
|
} else {
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
|
|
|
url: '/Account/Chfee_lock/SelFeeLock',
|
|
|
timeout: 120000,
|
|
|
params: {
|
|
|
data: jsonbodyAddDatas,
|
|
|
isAccDate: _this.IsAccDate,
|
|
|
AccDate: _this.AccDate,
|
|
|
isbslock: _this.isbslock
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({
|
|
|
title: Zi.LAN.TiShi,
|
|
|
msg: result.Message,
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
buttons: Ext.Msg.OK
|
|
|
});
|
|
|
return;
|
|
|
} else {
|
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
_this.onDsQuery();
|
|
|
_this.winFeeCloseShow.close();
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert(Zi.LAN.ErroPlsAgain, response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
}
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.MeiYouQuanXian });
|
|
|
}
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: '数据访问失败!' });
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
onAllLockClick: function (type) {
|
|
|
|
|
|
if (this.storeList.getCount() == 0) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.MeiYouCaoZouShuJu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
|
|
|
_this = this;
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
|
|
|
url: '/Account/Chfee_lock/AllLock',
|
|
|
timeout: 120000,
|
|
|
params: {
|
|
|
billsql: _this.sqlcontext,
|
|
|
type: type,
|
|
|
isAccDate: _this.IsAccDate,
|
|
|
AccDate: _this.AccDate
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({
|
|
|
title: Zi.LAN.TiShi,
|
|
|
msg: result.Message,
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
buttons: Ext.Msg.OK
|
|
|
});
|
|
|
return;
|
|
|
} else {
|
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
_this.onDsQuery();
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert(Zi.LAN.ErroPlsAgain, response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
onFeeLockAll: function () {
|
|
|
|
|
|
if (this.storeList.getCount() == 0) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.MeiYouCaoZouShuJu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if (this.CheckAccMonth.checked) {
|
|
|
this.IsAccDate = '1'
|
|
|
} else this.IsAccDate = '0'
|
|
|
|
|
|
if (this.CheckBsClose.checked) {
|
|
|
this.isbslock = '1'
|
|
|
} else this.isbslock = '0'
|
|
|
|
|
|
|
|
|
_this = this;
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
|
|
|
url: '/Account/Chfee_lock/onFeeLockAll',
|
|
|
timeout: 120000,
|
|
|
params: {
|
|
|
billsql: _this.sqlcontext,
|
|
|
isAccDate: _this.IsAccDate,
|
|
|
AccDate: _this.AccDate,
|
|
|
isbslock: _this.isbslock
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({
|
|
|
title: Zi.LAN.TiShi,
|
|
|
msg: result.Message,
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
buttons: Ext.Msg.OK
|
|
|
});
|
|
|
return;
|
|
|
} else {
|
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
_this.onDsQuery();
|
|
|
_this.winFeeCloseShow.close();
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert(Zi.LAN.ErroPlsAgain, response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
onSelUnLockClick: function (type, bsunclose, feedrcrunclose) {
|
|
|
//判断是否具有解锁权限
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiHuoQuQuanXian,
|
|
|
url: '/Account/Chfee_lock/CheckAuthority',
|
|
|
params: {
|
|
|
autype: type
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (result.Success) {
|
|
|
var records = this.GridCheckBoxModel.selected.items;
|
|
|
if (records.length == 0) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.PlsSelect, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
//
|
|
|
var strGids = "";
|
|
|
var bodyAddDatas = [];
|
|
|
for (var i = 0; i < records.length; i++) {
|
|
|
var rec = records[i];
|
|
|
var Gid = rec.data.BSNO;
|
|
|
var status = rec.data.BSSTATUS;
|
|
|
if (type == 2) {
|
|
|
status = rec.data.BSSTATUS
|
|
|
|
|
|
if (status = true) {
|
|
|
bodyAddDatas.push(rec);
|
|
|
strGids += "," + Gid;
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
status = rec.data.FEESTATUS;
|
|
|
var ACCDATE = rec.data.ACCDATE;
|
|
|
var oDate1 = new Date(ACCDATE + '-01');
|
|
|
var oDate2 = new Date(this.MsPeriod.PERIOD + '-01');
|
|
|
if (oDate1.getTime() < oDate2.getTime()) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.BenYueYiJIeZhang , icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
} else {
|
|
|
|
|
|
if (status = true) {
|
|
|
bodyAddDatas.push(rec);
|
|
|
strGids += "," + Gid;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
//
|
|
|
if (bodyAddDatas.length == 0) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.MeiYouCaoZouShuJu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
} else {
|
|
|
if (strGids != "") {
|
|
|
strGids = strGids.toString().substr(1);
|
|
|
}
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
|
|
|
url: '/Account/Chfee_lock/isSelUnLock',
|
|
|
params: {
|
|
|
strGids: strGids
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (result.Success) {
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
|
|
|
url: '/Account/Chfee_lock/SelUnLock',
|
|
|
params: {
|
|
|
data: jsonbodyAddDatas,
|
|
|
type: type,
|
|
|
bsunclose: bsunclose,
|
|
|
feedrcrunclose: feedrcrunclose
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.MessageBox.ERROR, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.JiechuSuodingSuccess, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
_this.onDsQuery();
|
|
|
_this.winFeeUnCloseShow.close();
|
|
|
}
|
|
|
} else {
|
|
|
Ext.MessageBox.alert(Zi.LAN.ErroPlsAgain, response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
} else {
|
|
|
Ext.MessageBox.alert(Zi.LAN.ErroPlsAgain, response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
}
|
|
|
} else {
|
|
|
Ext.MessageBox.alert(Zi.LAN.TiShi, Zi.LAN.MeiYouQuanXian);
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
|
|
|
Ext.MessageBox.alert(Zi.LAN.WanluoQingQueShiBai);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
onAllUnLockClick: function (type, bsunclose, feedrcrunclose) {
|
|
|
//判断是否具有解锁权限
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiHuoQuQuanXian,
|
|
|
url: '/Account/Chfee_lock/CheckAuthority',
|
|
|
params: {
|
|
|
autype: type
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (result.Success) {
|
|
|
if (_this.storeList.getCount() == 0) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.MeiYouCaoZouShuJu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
|
|
|
url: '/Account/Chfee_lock/isAllUnLock',
|
|
|
params: {
|
|
|
billsql: _this.sqlcontext,
|
|
|
type: type
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (result.Success) {
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
|
|
|
url: '/Account/Chfee_lock/AllUnLock',
|
|
|
params: {
|
|
|
billsql: _this.sqlcontext,
|
|
|
type: type,
|
|
|
bsunclose: bsunclose,
|
|
|
feedrcrunclose: feedrcrunclose
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.MessageBox.ERROR, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
} else {
|
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.JiechuSuodingSuccess, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
_this.onDsQuery();
|
|
|
_this.winFeeUnCloseShow.close();
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert(Zi.LAN.ErroPlsAgain, response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
} else {
|
|
|
Ext.MessageBox.alert(Zi.LAN.ErroPlsAgain, response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
} else {
|
|
|
Ext.MessageBox.alert(Zi.LAN.TiShi, Zi.LAN.MeiYouQuanXian);
|
|
|
}
|
|
|
} else {
|
|
|
Ext.MessageBox.alert(Zi.LAN.WanluoQingQueShiBai);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
onSelBsLockClick: function (type) {
|
|
|
var records = this.GridCheckBoxModel.selected.items;
|
|
|
if (records.length == 0) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.PlsSelect, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
//
|
|
|
var strGids = "";
|
|
|
var bodyAddDatas = [];
|
|
|
for (var i = 0; i < records.length; i++) {
|
|
|
var rec = records[i];
|
|
|
var Gid = rec.data.BSNO;
|
|
|
var status = '';
|
|
|
if (type=='ETD')
|
|
|
status = rec.data.ETDCLOSEREF;
|
|
|
else if (type == '应收')
|
|
|
status = rec.data.DRCLOSEREF;
|
|
|
else if (type == '应付')
|
|
|
status = rec.data.CRCLOSEREF;
|
|
|
if (status!='锁定')
|
|
|
bodyAddDatas.push(rec);
|
|
|
}
|
|
|
//
|
|
|
if (bodyAddDatas.length == 0) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.MeiYouCaoZouShuJu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
} else {
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
|
|
|
url: '/Account/Chfee_lock/SelBsLock',
|
|
|
params: {
|
|
|
data: jsonbodyAddDatas,
|
|
|
type: type,
|
|
|
isAccDate: _this.IsAccDate,
|
|
|
AccDate: _this.AccDate
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.MessageBox.ERROR, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.SuodingSuccess, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
_this.onDsQuery();
|
|
|
}
|
|
|
} else {
|
|
|
Ext.MessageBox.alert(Zi.LAN.ErroPlsAgain, response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
onAllBsLockClick: function (type) {
|
|
|
if (this.storeList.getCount() == 0) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.MeiYouCaoZouShuJu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
|
|
|
_this = this;
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
|
|
|
url: '/Account/Chfee_lock/BsLockAll',
|
|
|
params: {
|
|
|
billsql: _this.sqlcontext,
|
|
|
type: type,
|
|
|
isAccDate: _this.IsAccDate,
|
|
|
AccDate: _this.AccDate
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({
|
|
|
title: Zi.LAN.TiShi,
|
|
|
msg: result.Message,
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
buttons: Ext.Msg.OK
|
|
|
});
|
|
|
return;
|
|
|
} else {
|
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
_this.onDsQuery();
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert(Zi.LAN.ErroPlsAgain, response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
onSelBsUnLockClick: function (type) {
|
|
|
var records = this.GridCheckBoxModel.selected.items;
|
|
|
if (records.length == 0) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.PlsSelect, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
//
|
|
|
var strGids = "";
|
|
|
var bodyAddDatas = [];
|
|
|
for (var i = 0; i < records.length; i++) {
|
|
|
var rec = records[i];
|
|
|
var Gid = rec.data.BSNO;
|
|
|
var status = '';
|
|
|
if (type == 'ETD')
|
|
|
status = rec.data.ETDCLOSEREF;
|
|
|
else if (type == '应收')
|
|
|
status = rec.data.DRCLOSEREF;
|
|
|
else if (type == '应付')
|
|
|
status = rec.data.CRCLOSEREF;
|
|
|
if (status == '已锁定')
|
|
|
bodyAddDatas.push(rec);
|
|
|
}
|
|
|
//
|
|
|
if (bodyAddDatas.length == 0) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.MeiYouCaoZouShuJu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
} else {
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
|
|
|
url: '/Account/Chfee_lock/SelBsUnLock',
|
|
|
params: {
|
|
|
data: jsonbodyAddDatas,
|
|
|
type: type
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.MessageBox.ERROR, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.JiechuSuodingSuccess, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
_this.onDsQuery();
|
|
|
}
|
|
|
} else {
|
|
|
Ext.MessageBox.alert(Zi.LAN.ErroPlsAgain, response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
onAllBsUnLockClick: function (type) {
|
|
|
if (this.storeList.getCount() == 0) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.MeiYouCaoZouShuJu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
|
|
|
_this = this;
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
|
|
|
url: '/Account/Chfee_lock/BsLockUnAll',
|
|
|
params: {
|
|
|
billsql: _this.sqlcontext,
|
|
|
type: type
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({
|
|
|
title: Zi.LAN.TiShi,
|
|
|
msg: result.Message,
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
buttons: Ext.Msg.OK
|
|
|
});
|
|
|
return;
|
|
|
} else {
|
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
_this.onDsQuery();
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert(Zi.LAN.ErroPlsAgain, response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
onCreateVoucherSel: function () {
|
|
|
|
|
|
var records = _this.GridCheckBoxModel.selected.items;
|
|
|
if (records.length == 0) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.PlsSelect, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var bodyAddDatas = [];
|
|
|
for (var i = 0; i < records.length; i++) {
|
|
|
var rec = records[i];
|
|
|
var ISVOU = rec.data.ISVOU;
|
|
|
if (ISVOU == 'true') {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.YiShengChengPingZheng, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
} else {
|
|
|
bodyAddDatas.push(rec);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//_this = this;
|
|
|
if (bodyAddDatas.length == 0) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.MeiYouCaoZouShuJu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
|
|
|
} else {
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
|
|
|
Ext.Msg.wait(Zi.LAN.ZhengZaiCaoZuoShuJu);
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
|
|
|
url: '/Account/Chfee_lock/CreateVouSel',
|
|
|
params: {
|
|
|
data: jsonbodyAddDatas,
|
|
|
ISRATE: _this.ISRATE,
|
|
|
tbRATE: _this.tbRATE,
|
|
|
strVOUDATE: _this.VOUDATE,
|
|
|
strPREPARED: _this.PREPARED
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({
|
|
|
title: Zi.LAN.TiShi,
|
|
|
msg: result.Message,
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
buttons: Ext.Msg.OK
|
|
|
});
|
|
|
return;
|
|
|
} else {
|
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
_this.onDsQuery();
|
|
|
_this.winCreateVouShow.close();
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert(Zi.LAN.ErroPlsAgain, response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
onCreateVoucherAll: function () {
|
|
|
|
|
|
if (this.storeList.getCount() == 0) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.MeiYouCaoZouShuJu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
_this = this;
|
|
|
Ext.Msg.wait(Zi.LAN.ZhengZaiCaoZuoShuJu);
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
|
|
|
url: '/Account/Chfee_lock/CreateVouAll',
|
|
|
params: {
|
|
|
billsql: _this.sqlcontext,
|
|
|
ISRATE: _this.ISRATE,
|
|
|
tbRATE: _this.tbRATE,
|
|
|
strVOUDATE: _this.VOUDATE,
|
|
|
strPREPARED: _this.PREPARED
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({
|
|
|
title: Zi.LAN.TiShi,
|
|
|
msg: result.Message,
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
buttons: Ext.Msg.OK
|
|
|
});
|
|
|
return;
|
|
|
} else {
|
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
_this.onDsQuery();
|
|
|
_this.winCreateVouShow.close();
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert(Zi.LAN.ErroPlsAgain, response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
onCreateVoucher: function (button, event) {
|
|
|
var records = this.GridCheckBoxModel.selected.items;
|
|
|
if (records.length == 0) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.PlsSelect, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
var strGids = "";
|
|
|
for (var i = 0; i < records.length; i++) {
|
|
|
var rec = records[i];
|
|
|
var Gid = rec.data.BSNO;
|
|
|
status = rec.data.FEESTATUS;
|
|
|
var ISVOU = rec.data.ISVOU;
|
|
|
if (ISVOU == 'true') {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.YiShengChengPingZheng, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
} else {
|
|
|
|
|
|
if (status = true) {
|
|
|
strGids += "," + Gid;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
if (strGids != '') {
|
|
|
var feature = "height=200, width=350, toolbar=no, menubar=no,scrollbars=no, resizable=0,location=no, status=no,Top= " + (screen.height / 2 - 100) + ",Left= " + (screen.width / 2 - 200);
|
|
|
var URLs = "../../CW/CwVouchersAdding.aspx?handle=v_op_bill&gids=" + strGids;
|
|
|
window.open(URLs, "生成凭证信息", feature);
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
onRefreshClick: function (button, event) {
|
|
|
if (!this.checkSearchCondition())
|
|
|
return;
|
|
|
|
|
|
this.PageSize = this.Pagenum.getValue();
|
|
|
|
|
|
var sql = this.getCondition();
|
|
|
|
|
|
this.sqlcontext = sql;
|
|
|
this.storeList.pageSize = this.PageSize;
|
|
|
this.storeList.load({
|
|
|
params: { start: 0, limit: this.PageSize, condition: sql, type: locktype },
|
|
|
waitMsg: Zi.LAN.ZhengZaiChaXunShuJu,
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
},
|
|
|
onDsQuery: function (button, event) {
|
|
|
|
|
|
this.PageSize = this.Pagenum.getValue();
|
|
|
|
|
|
var sql = this.sqlcontext;
|
|
|
this.storeList.pageSize = this.PageSize;
|
|
|
this.storeList.load({
|
|
|
params: { start: 0, limit: this.PageSize, condition: sql, type: locktype },
|
|
|
waitMsg: Zi.LAN.ZhengZaiChaXunShuJu,
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
},
|
|
|
getCondition: function () {
|
|
|
var form = this.formSearch.getForm();
|
|
|
var sql = '';
|
|
|
/*
|
|
|
var sqldata = form.getValues();
|
|
|
sql = Ext.JSON.encode(sqldata);
|
|
|
*/
|
|
|
|
|
|
if (locktype == 'BSVOUCHER') {
|
|
|
sql = ' B.FEESTATUS=1 ';
|
|
|
}
|
|
|
|
|
|
var mblNo = form.findField('PS_MBLNO').getValue();
|
|
|
sql = sql + getAndConSql(sql, mblNo, " (B.CUSTNO like '%" + mblNo + "%' or B.MBLNO like '%" + mblNo + "%' or B.HBLNO like '%" + mblNo + "%' or B.CUSTOMNO like '%" + mblNo + "%' or B.ORDERNO like '%" + mblNo + "%')");
|
|
|
|
|
|
|
|
|
var expDate_Min = form.findField('PS_EXPDATEBGN').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, expDate_Min, " B.OPDATE>='" + expDate_Min + "'");
|
|
|
|
|
|
var expDate_Max = form.findField('PS_EXPDATEEND').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, expDate_Max, " B.OPDATE<='" + expDate_Max + " 23:59:59'");
|
|
|
|
|
|
var etdDate_Min = form.findField('PS_ETDDATEBGN').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, etdDate_Min, " B.ETD>='" + etdDate_Min + "'");
|
|
|
|
|
|
var etdDate_Max = form.findField('PS_ETDDATEEND').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, etdDate_Max, " B.ETD<='" + etdDate_Max + " 23:59:59'");
|
|
|
|
|
|
var accDate_Min = form.findField('PS_ACCDATEBGN').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, accDate_Min, " B.ACCDATE>='" + accDate_Min + "'");
|
|
|
|
|
|
var accDate_Max = form.findField('PS_ACCDATEEND').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, accDate_Max, " B.ACCDATE<='" + accDate_Max + "'");
|
|
|
|
|
|
var ENTERP = form.findField('PS_ENTERP').getValue();
|
|
|
sql = sql + getAndConSql(sql, ENTERP, "B.ENTERP='" + ENTERP + "'");
|
|
|
|
|
|
var CUSTOMERNAME = form.findField('PS_CUSTOMERNAME').getValue();
|
|
|
sql = sql + getAndConSql(sql, CUSTOMERNAME, "B.CUSTOMERNAME='" + CUSTOMERNAME + "'");
|
|
|
|
|
|
var SALE = form.findField('PS_SALE').getValue();
|
|
|
sql = sql + getAndConSql(sql, SALE, "B.SALE='" + SALE + "'");
|
|
|
|
|
|
var OP = form.findField('PS_OP').getValue();
|
|
|
sql = sql + getAndConSql(sql, OP, "B.OP='" + OP + "'");
|
|
|
|
|
|
var BSTYPE = form.findField('PS_BSTYPE').getValue();
|
|
|
sql = sql + getAndConSql(sql, BSTYPE, "B.BSTYPE='" + BSTYPE + "'");
|
|
|
|
|
|
var OPLB = form.findField('PS_OPLB').getValue();
|
|
|
sql = sql + getAndConSql(sql, OPLB, "B.OPLBNAME='" + OPLB + "'");
|
|
|
|
|
|
var VESSEL = form.findField('PS_VESSEL').getValue();
|
|
|
sql = sql + getAndConSql(sql, VESSEL, "B.VESSEL like '%" + VESSEL + "%'");
|
|
|
|
|
|
var VOYNO = form.findField('PS_VOYNO').getValue();
|
|
|
sql = sql + getAndConSql(sql, VOYNO, "B.VOYNO like '%" + VOYNO + "%'");
|
|
|
|
|
|
// var GOODSNAME = form.findField('PS_GOODSNAME').getValue();
|
|
|
// sql = sql + getAndConSql(sql, GOODSNAME, "B.GOODSNAME like '%" + GOODSNAME + "%'");
|
|
|
|
|
|
var PS_OPLOCK = form.findField('PS_OPLOCK').getValue();
|
|
|
if (PS_OPLOCK == '已锁定')
|
|
|
sql = sql + getAndConSql(sql, PS_OPLOCK, "B.BSSTATUS=1");
|
|
|
else if (PS_OPLOCK == '未锁定')
|
|
|
sql = sql + getAndConSql(sql, PS_OPLOCK, "B.BSSTATUS=0");
|
|
|
|
|
|
var PS_FEELOCK = form.findField('PS_FEELOCK').getValue();
|
|
|
if (PS_FEELOCK == '已锁定')
|
|
|
sql = sql + getAndConSql(sql, PS_FEELOCK, "B.FEESTATUS=1");
|
|
|
else if (PS_FEELOCK == '未锁定')
|
|
|
sql = sql + getAndConSql(sql, PS_FEELOCK, "B.FEESTATUS=0");
|
|
|
|
|
|
|
|
|
|
|
|
var PS_ISVOU = form.findField('PS_ISVOU').getValue();
|
|
|
if (PS_ISVOU == '已生成')
|
|
|
sql = sql + getAndConSql(sql, PS_ISVOU, "B.ISVOU=1");
|
|
|
else if (PS_ISVOU == '未生成')
|
|
|
sql = sql + getAndConSql(sql, PS_ISVOU, " ISNULL(B.ISVOU,0)=0");
|
|
|
|
|
|
|
|
|
var BillFeeStatus = form.findField('BillFeeStatus').getValue();
|
|
|
sql = sql + getAndConSql(sql, BillFeeStatus, "BillFeeStatus='" + BillFeeStatus + "'");
|
|
|
|
|
|
var OPTYPE = form.findField('OPTYPE').getValue();
|
|
|
if (OPTYPE == '普通货' || OPTYPE == '更改单') {
|
|
|
sql = sql + getAndConSql(sql, OPTYPE, " B.OPTYPE='" + OPTYPE + "' ");
|
|
|
} else if (OPTYPE == '普通货有更改单') {
|
|
|
sql = sql + getAndConSql(sql, OPTYPE, " EXISTS (select 1 from OP_AMEND WHERE PARENTID=B.BSNO) ");
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var FSTATUS = form.findField('FSTATUS').getValue();
|
|
|
|
|
|
if (FSTATUS == '' || FSTATUS == null || FSTATUS == undefined || FSTATUS == 0) {
|
|
|
|
|
|
}
|
|
|
else {
|
|
|
|
|
|
if (sql == '') {
|
|
|
if (FSTATUS == 1) {
|
|
|
sql = ' EXISTS (select 1 from CH_FEE WHERE B.BSNO=CH_FEE.BSNO AND (CH_FEE.FEESTATUS=0 or CH_FEE.FEESTATUS=8 or CH_FEE.FEESTATUS=9) AND CH_FEE.FEESTATUS<>1 AND CH_FEE.FEESTATUS<>2) '
|
|
|
} else if (FSTATUS == 2) {
|
|
|
sql = ' EXISTS (select 1 from CH_FEE WHERE B.BSNO=CH_FEE.BSNO AND (CH_FEE.FEESTATUS!=0 AND CH_FEE.FEESTATUS!=8 AND CH_FEE.FEESTATUS!=9) AND (CH_FEE.FEESTATUS=1 OR CH_FEE.FEESTATUS=2)) '
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
if (FSTATUS == 1) {
|
|
|
sql = sql + ' AND EXISTS (select 1 from CH_FEE WHERE B.BSNO=CH_FEE.BSNO AND (CH_FEE.FEESTATUS=0 or CH_FEE.FEESTATUS=8 or CH_FEE.FEESTATUS=9) AND CH_FEE.FEESTATUS<>1 AND CH_FEE.FEESTATUS<>2) '
|
|
|
} else if (FSTATUS == 2) {
|
|
|
sql = sql + ' AND EXISTS (select 1 from CH_FEE WHERE B.BSNO=CH_FEE.BSNO AND (CH_FEE.FEESTATUS!=0 AND CH_FEE.FEESTATUS!=8 AND CH_FEE.FEESTATUS!=9) AND (CH_FEE.FEESTATUS=1 OR CH_FEE.FEESTATUS=2)) '
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
return sql;
|
|
|
},
|
|
|
checkSearchCondition: function () {
|
|
|
var form = this.formSearch.getForm();
|
|
|
if (!form.isValid()) {
|
|
|
Ext.Msg.alert(Zi.LAN.TiShi, Zi.LAN.ChuoWu);
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
return true;
|
|
|
},
|
|
|
|
|
|
onClearSql: function () {
|
|
|
var form = this.formSearch.getForm();
|
|
|
form.reset();
|
|
|
},
|
|
|
OprationSwap: function () {
|
|
|
var ret = new Array();
|
|
|
ret[0] = this.OprationStatus;
|
|
|
ret[1] = this.storeList;
|
|
|
ret[2] = this.SelectedRecord;
|
|
|
ret[3] = this.SelectedRecord.data.BSNO;
|
|
|
ret[4] = "chfee_lock";
|
|
|
ret[5] = locktype;
|
|
|
return ret;
|
|
|
},
|
|
|
|
|
|
onExportClick: function (button, event) {
|
|
|
GridExportExcelPage(this.gridList);
|
|
|
},
|
|
|
|
|
|
|
|
|
onExportClick: function (button, event) {
|
|
|
|
|
|
GridExportExcelPage(this.gridList);
|
|
|
},
|
|
|
|
|
|
|
|
|
LoadModuleEnable: function () {
|
|
|
this.storeModuleEnable.load({
|
|
|
params: { condition: "sys_module.[NAME] like 'BSCLOSE-%'" },
|
|
|
callback: function (r, options, success) {
|
|
|
if (success) {
|
|
|
if (this.storeModuleEnable.getCount() > 0) {
|
|
|
for (var j = 0; j < this.storeModuleEnable.getCount(); j += 1) {
|
|
|
var member = this.storeModuleEnable.getAt(j);
|
|
|
var btnEdit = Ext.getCmp(member.data.NAME);
|
|
|
btnEdit.setVisible(true);
|
|
|
};
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
GetBtnStatus: function () {
|
|
|
var btnFeeLock = Ext.getCmp('btnFeeLock');
|
|
|
var btnFeeUnLock = Ext.getCmp('btnFeeUnLock');
|
|
|
var btnBsLock = Ext.getCmp('btnBsLock');
|
|
|
var btnBsUnLock = Ext.getCmp('btnBsUnLock');
|
|
|
var btnCreateVoucher = Ext.getCmp('btnCreateVoucher');
|
|
|
|
|
|
if (locktype == 'BS') {
|
|
|
btnBsLock.setVisible(true);
|
|
|
btnBsUnLock.setVisible(true);
|
|
|
btnFeeLock.setVisible(false);
|
|
|
btnFeeUnLock.setVisible(false);
|
|
|
btnCreateVoucher.setVisible(false);
|
|
|
|
|
|
} else if (locktype == 'FEE') {
|
|
|
btnBsLock.setVisible(false);
|
|
|
btnBsUnLock.setVisible(false);
|
|
|
btnFeeLock.setVisible(true);
|
|
|
btnFeeUnLock.setVisible(true);
|
|
|
btnCreateVoucher.setVisible(false);
|
|
|
|
|
|
} else if (locktype == 'BSVOUCHER') {
|
|
|
btnBsLock.setVisible(false);
|
|
|
btnBsUnLock.setVisible(false);
|
|
|
btnFeeLock.setVisible(false);
|
|
|
btnFeeUnLock.setVisible(false);
|
|
|
btnCreateVoucher.setVisible(true);
|
|
|
var form = this.formSearch.getForm();
|
|
|
form.findField('PS_ISVOU').setValue('未生成');
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
Print: function () {
|
|
|
|
|
|
_this = this;
|
|
|
|
|
|
if (this.storeList.getCount() == 0) {
|
|
|
return;
|
|
|
}
|
|
|
var sortstr = '';
|
|
|
if (this.sortfield != '' && this.sortdire != '') {
|
|
|
|
|
|
sortstr = this.sortfield + ' ' + this.sortdire;
|
|
|
}
|
|
|
|
|
|
Ext.Msg.wait(Zi.LAN.ZhengZaiCaoZuoShuJu);
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
|
|
|
url: '/Account/Chfee_lock/BsListData',
|
|
|
scope: this,
|
|
|
params: {
|
|
|
start: 0, limit: this.PageSize,
|
|
|
condition: _this.sqlcontext,
|
|
|
type: locktype,
|
|
|
printstr: 'true',
|
|
|
sort: sortstr
|
|
|
},
|
|
|
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 = 'MSLOCKLIST';
|
|
|
var sql1 = returnstr;
|
|
|
var sql2 = "select SUBSTRING(CONVERT(char(15),ETD,111),1,7) AS 月份,OP,max(UNCLOSEOP) UNCLOSEOP,SUM(CASE WHEN UNCLOSECOUNT=1 THEN 1 ELSE 0 END) 一次解锁票数 ";
|
|
|
sql2 = sql2 + ",SUM(CASE WHEN UNCLOSECOUNT>=2 THEN 1 ELSE 0 END) 二次解锁票数 from v_op_unclose B"
|
|
|
if (this.sqlcontext != '')
|
|
|
sql2 = sql2 + " where B.CORPID='" + COMPANYID + "' and " + this.sqlcontext;
|
|
|
sql2 = sql2 + " GROUP BY SUBSTRING(CONVERT(char(15),ETD,111),1,7),OP";
|
|
|
var sql3 = "";
|
|
|
var sql4 = "";
|
|
|
var sql5 = "";
|
|
|
var sql6 = "";
|
|
|
|
|
|
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
|
|
|
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: Zi.LAN.ChuoWu, 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
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
PrintSelect: function () {
|
|
|
|
|
|
_this = this;
|
|
|
if (this.storeList.getCount() == 0) {
|
|
|
return;
|
|
|
}
|
|
|
var selectedRecords = [];
|
|
|
var storeadd = null;
|
|
|
selectedRecords = this.GridCheckBoxModel.selected.items;
|
|
|
|
|
|
|
|
|
if (selectedRecords.length == 0) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.PlsSelect, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var sortstr = ' CUSTNO desc ';
|
|
|
|
|
|
if (this.sortfield != '' && this.sortdire != '') {
|
|
|
|
|
|
sortstr = this.sortfield + ' ' + this.sortdire;
|
|
|
}
|
|
|
|
|
|
var feeGidSql = '';
|
|
|
for (var i = 0; i < selectedRecords.length; i++) {
|
|
|
var record = selectedRecords[i];
|
|
|
var feeGId = "'" + record.get('BSNO') + "'";
|
|
|
if (feeGidSql == '') {
|
|
|
feeGidSql = feeGId;
|
|
|
} else {
|
|
|
feeGidSql = feeGidSql + "," + feeGId;
|
|
|
}
|
|
|
};
|
|
|
|
|
|
var bsno = '11111';
|
|
|
var selections = this.gridList.getSelectionModel().getSelection();
|
|
|
if (selections.length != 0) {
|
|
|
var record = selections[0];
|
|
|
bsno = record.data.BSNO;
|
|
|
}
|
|
|
|
|
|
var printType = 'MSLOCKLISTSELECT';
|
|
|
var sql1 = "select * from V_OP_BILL WHERE BSNO IN (" + feeGidSql + ") order by " + sortstr;
|
|
|
var sql2 = "select *from V_OP_BILL where BSNO='" + bsno + "'";
|
|
|
var sql3 = "";
|
|
|
var sql4 = "";
|
|
|
var sql5 = "";
|
|
|
var sql6 = "";
|
|
|
|
|
|
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
|
|
|
},
|
|
|
|
|
|
onPrintGainClick: function (button, event) {
|
|
|
|
|
|
var selections = this.gridList.getSelectionModel().getSelection();
|
|
|
if (selections.length == 0) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.PlsSelect, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var record = selections[0];
|
|
|
var strbsno = record.data.BSNO;
|
|
|
var stroplb = record.data.OPLB;
|
|
|
var stroptype = record.data.OPTYPE;
|
|
|
var opstr = " BSNO='" + strbsno + "'"
|
|
|
if (stroptype == '更改单') {
|
|
|
opstr = " BSNO IN (SELECT PARENTID FROM OP_AMEND WHERE BSNO='" + strbsno + "')"
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
_this = this;
|
|
|
Ext.Msg.wait(Zi.LAN.ZhengZaiCaoZuoShuJu);
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
|
|
|
url: '/MvcShipping/MsChFee/GetGainPrint',
|
|
|
scope: this,
|
|
|
params: {
|
|
|
bsno: strbsno,
|
|
|
oplb: stroplb
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
Ext.MessageBox.hide();
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
if (stroplb == 'op_seae') {
|
|
|
var printType = 'SEAEGAIN';
|
|
|
var sql1 = "SET LANGUAGE 'us_english' "
|
|
|
+ " select * from op_seae WHERE " + opstr;
|
|
|
} else if (stroplb == 'op_apply') {
|
|
|
var printType = 'APPLYGAIN';
|
|
|
var sql1 = "SET LANGUAGE 'us_english' "
|
|
|
+ " select * from op_apply WHERE " + opstr;
|
|
|
} else if (stroplb == 'op_seai') {
|
|
|
var printType = 'SEAIGAIN';
|
|
|
var sql1 = "SET LANGUAGE 'us_english' "
|
|
|
+ " select * from op_seai WHERE " + opstr;
|
|
|
} else if (stroplb == 'op_bulk') {
|
|
|
var printType = 'BULKGAIN';
|
|
|
var sql1 = "SET LANGUAGE 'us_english' "
|
|
|
+ " select * from op_bulk WHERE " + opstr;
|
|
|
} else if (stroplb == 'op_other') {
|
|
|
var printType = 'OTHERGAIN';
|
|
|
var sql1 = "SET LANGUAGE 'us_english' "
|
|
|
+ " select * from op_other WHERE " + opstr;
|
|
|
} else if (stroplb == 'op_railway') {
|
|
|
var printType = 'RAILWAYGAIN';
|
|
|
var sql1 = "SET LANGUAGE 'us_english' "
|
|
|
+ " select * from op_railway WHERE " + opstr;
|
|
|
} else if (stroplb == 'op_aire') {
|
|
|
var printType = 'AIREGAIN';
|
|
|
var sql1 = "SET LANGUAGE 'us_english' "
|
|
|
+ " select * from op_aire WHERE " + opstr;
|
|
|
} else if (stroplb == 'op_airi') {
|
|
|
var printType = 'AIRIGAIN';
|
|
|
var sql1 = "SET LANGUAGE 'us_english' "
|
|
|
+ " select * from op_airi WHERE " + opstr;
|
|
|
};
|
|
|
// sql3 = sql3 + " Select c.*,(select showname from [user] where gid=c.enteroperator) as 录入人 from ch_fee c where c.Gid in (" + feeGidSql + ") order by sort,LineNum ";
|
|
|
|
|
|
var sql2 = "SET LANGUAGE 'us_english' Select c.*,(select showname from [user] where gid=c.enteroperator) as 录入人 from ch_fee c where c.BSNO='" + strbsno + "' and c.FEETYPE=1 order by sort,LineNum ";
|
|
|
|
|
|
var sql3 = "SET LANGUAGE 'us_english' Select c.*,(select showname from [user] where gid=c.enteroperator) as 录入人 from ch_fee c where c.BSNO='" + strbsno + "' and c.FEETYPE=2 order by sort,LineNum ";
|
|
|
//全部费用利润 或 海运费利润 或 仓储利润
|
|
|
var sql4 = "SELECT BSNO"
|
|
|
+ ",SUM(RMBDR) as RMBDR,SUM(RMBCR) as RMBCR,SUM(USDDR) as USDDR,SUM(USDCR) as USDCR"
|
|
|
+ ",SUM(RMBDR+USDTORMBDR) as DRTTL"
|
|
|
+ ",SUM(RMBCR+USDTORMBCR) as CRTTL"
|
|
|
+ ",(SUM(RMBDR)-SUM(RMBCR)) AS RMBPROFIT"
|
|
|
+ ",(SUM(USDDR)-SUM(USDCR)) AS USDPROFIT"
|
|
|
+ ",SUM(RMBDR+USDTORMBDR)- SUM(RMBCR+USDTORMBCR) as TTLPROFIT"
|
|
|
//+ ",(CAST(CAST(CASE WHEN SUM(RMBCR+USDTORMBCR) = 0 THEN 100 ELSE (ROUND((case when SUM(RMBDR+USDTORMBDR)=0 then 0 else (SUM(RMBDR+USDTORMBDR)- SUM(RMBCR+USDTORMBCR))/SUM(RMBDR+USDTORMBDR) END),4))*100 END as decimal(18,2)) as varchar(20))+'%') AS PROFITRATE"
|
|
|
+ ",(CAST(CAST(CASE WHEN SUM(RMBCR+USDTORMBCR) = 0 THEN 100 ELSE (ROUND(((SUM(RMBDR+USDTORMBDR)- SUM(RMBCR+USDTORMBCR))/SUM(RMBCR+USDTORMBCR)),4))*100 END as decimal(18,2)) as varchar(20))+'%') AS PROFITRATE"
|
|
|
+ ",'" + SHOWNAME + "' as CREATEUSER,GETDATE() as CREATETIME "
|
|
|
+ " FROM ("
|
|
|
+ "SELECT BSNO,CURRENCY,FEETYPE"
|
|
|
+ ",SUM(CASE WHEN CURRENCY='RMB' AND FEETYPE = 1 THEN AMOUNT ELSE 0 END) as RMBDR"
|
|
|
+ ",SUM(CASE WHEN CURRENCY='RMB' AND FEETYPE = 2 THEN AMOUNT ELSE 0 END) as RMBCR"
|
|
|
+ ",SUM(CASE WHEN CURRENCY='USD' AND FEETYPE = 1 THEN AMOUNT ELSE 0 END) as USDDR"
|
|
|
+ ",SUM(CASE WHEN CURRENCY='USD' AND FEETYPE = 2 THEN AMOUNT ELSE 0 END) as USDCR"
|
|
|
+ ",SUM(CASE WHEN CURRENCY='USD' AND FEETYPE = 1 THEN AMOUNT*EXCHANGERATE ELSE 0 END) as USDTORMBDR"
|
|
|
+ ",SUM(CASE WHEN CURRENCY='USD' AND FEETYPE = 2 THEN AMOUNT*EXCHANGERATE ELSE 0 END) as USDTORMBCR "
|
|
|
+ " FROM ch_fee WHERE 1=1 and BSNO='" + strbsno + "'"
|
|
|
+ " GROUP BY BSNO,CURRENCY,EXCHANGERATE,FEETYPE "
|
|
|
+ " ) AS C GROUP BY BSNO ";
|
|
|
var sql5 = "exec GetPrintData '" + strbsno + "'";
|
|
|
var sql6 = "";
|
|
|
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
|
|
|
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: Zi.LAN.ChuoWu, 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 打开业务卡费用审批
|
|
|
, getselectrecord: function () {
|
|
|
var selections = this.GridCheckBoxModel.selected.items;
|
|
|
if (selections.length == 0) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.PlsSelect, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
return selections[0];
|
|
|
}
|
|
|
, onCheckCtnApply: function () {
|
|
|
//恒成 费用锁定中,点击放箱号(或者单独有个按钮也可以)可以跳出业务卡费用审批模块(已自动搜索出该放箱号对应的结果)
|
|
|
///MvcContainer/MsOpCtnApply / CostEdit
|
|
|
|
|
|
rec = this.getselectrecord();
|
|
|
BSNO = rec.data.BSNO;
|
|
|
//condition = "(select APPLYNO from v_op_bs where BSNO='" + BSNO + "')";
|
|
|
DsOpenMultiEditWin('/MvcContainer/MsOpCtnBsCard/ChFeeAudit?opener=HENGCHENG&BSNO=' + BSNO);
|
|
|
}
|
|
|
, onCheckCtnBsCard: function () {
|
|
|
//恒成 费用锁定中,点击放箱号(或者单独有个按钮也可以)可以跳出业务卡费用审批模块(已自动搜索出该放箱号对应的结果)
|
|
|
///MvcContainer/MsOpCtnApply / CostEdit
|
|
|
|
|
|
rec = this.getselectrecord();
|
|
|
BSNO = rec.data.BSNO;
|
|
|
//condition = "(select APPLYNO from v_op_bs where BSNO='" + BSNO + "')";
|
|
|
DsOpenMultiEditWin('/MvcContainer/MsOpCtnBsCard/CtnStatusIndex?opener=HENGCHENG&BSNO=' + BSNO);
|
|
|
}
|
|
|
//#endregion
|
|
|
});
|
|
|
|
|
|
|