|
|
Ext.namespace('Shipping');
|
|
|
|
|
|
Shipping.MsOpCtnApplySaleModifyAuditIndex = function (config) {
|
|
|
Ext.applyIf(this, config);
|
|
|
this.initUIComponents();
|
|
|
window.Shipping.MsOpCtnApplySaleModifyAuditIndex.superclass.constructor.call(this);
|
|
|
};
|
|
|
|
|
|
Ext.extend(Shipping.MsOpCtnApplySaleModifyAuditIndex, Ext.Panel, {
|
|
|
|
|
|
OprationStatus: null, //仅当弹出界面时使用
|
|
|
SelectedRecord: null,
|
|
|
sqlcontext: '',
|
|
|
PageSize: 100,
|
|
|
sortfield: '',
|
|
|
sortdire: '',
|
|
|
|
|
|
initUIComponents: function () {
|
|
|
|
|
|
this.formname = "MsOpCtnApplySaleModifyAuditIndex"; //页面名称
|
|
|
|
|
|
|
|
|
|
|
|
this.initgirdcolums = [{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: '',
|
|
|
header: '',
|
|
|
width: 0
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'GID',
|
|
|
header: 'GID',
|
|
|
hidden: true,
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'COMPANYID',
|
|
|
header: 'COMPANYID',
|
|
|
hidden: true,
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PRICETYPE',
|
|
|
header: 'PRICETYPE',
|
|
|
hidden: true,
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'BSNO',
|
|
|
header: '申请单号',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'BSDATE',
|
|
|
header: '申请日期',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'BSSTATUS',
|
|
|
header: '申请状态',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'SALE',
|
|
|
header: '揽货人',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'OP',
|
|
|
header: '操作员',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'GOODSNAME',
|
|
|
header: '品名',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'GOODSNAMEREF',
|
|
|
header: '货物名称(含英文简称)',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'GOODTYPE',
|
|
|
header: '产品类别',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PORTLOAD',
|
|
|
header: '起运港',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PORTDISCHARGE',
|
|
|
header: '目的港',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CTNALL',
|
|
|
header: '箱型',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CTNNUM',
|
|
|
header: '箱量',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTOMERNAME',
|
|
|
header: '委托单位',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'FACTORYNAME',
|
|
|
header: '工厂名称',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PREGOODSNAME',
|
|
|
header: '前装品名',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CURGOODSNAME',
|
|
|
header: '后装品名',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'AUDITSTATUS',
|
|
|
header: '适货审核状态',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'AUDITBYREF',
|
|
|
header: '适货审核人',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'AUDITTIME',
|
|
|
header: '适货审核时间',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'AUDITRESULT',
|
|
|
header: '适货审核结果',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'AGENTINPUTBY',
|
|
|
header: '代理维护人',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'AGENTNAME',
|
|
|
header: '目的港代理',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CYCLEDAYS',
|
|
|
header: '周期',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'COSTAUDITSTATUS',
|
|
|
header: '成本审核状态',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'COSTSUBMITBYREF',
|
|
|
header: '提交人',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'COSTSUBMITTIME',
|
|
|
header: '提交时间',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'COSTAUDITBYREF',
|
|
|
header: '成本审核人',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'COSTAUDITTIME',
|
|
|
header: '成本审核时间',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'COSTAUDITRESULT',
|
|
|
header: '成本审核结果',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'MNGAUDITSTATUS',
|
|
|
header: '总经理审核状态',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CHANGERATE',
|
|
|
header: '超期箱使费佣金比例',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'FULL_CTN_FREE_STORAGE_DAY',
|
|
|
header: '重箱免堆天数',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CTN_PRICE',
|
|
|
header: '罐箱价格',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CURRENCY',
|
|
|
header: '币别',
|
|
|
width: 50
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CTN_INCOME',
|
|
|
header: '内部租金收入',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'REMARKS',
|
|
|
header: '备注',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'INPUTBYREF',
|
|
|
header: '录入人',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'INPUTTIME',
|
|
|
header: '录入时间',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'COSTSUBMITBYREF',
|
|
|
header: '提交人',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'COSTSUBMITTIME',
|
|
|
header: '提交时间',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'SERVICE',
|
|
|
header: '运输条款',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'NEEDBEHEATED',
|
|
|
header: '是否加热',
|
|
|
renderer: function (value, meta) {
|
|
|
if (isFalse(value)) {
|
|
|
return "";
|
|
|
} else {
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
return "是";
|
|
|
}
|
|
|
},
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'EMPTYCTNALLOCATION',
|
|
|
header: '空箱调拨',
|
|
|
renderer: function (value, meta) {
|
|
|
if (isFalse(value)) {
|
|
|
return "";
|
|
|
} else {
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
return "是";
|
|
|
}
|
|
|
},
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
align: 'right',
|
|
|
dataIndex: 'WEIGHT',
|
|
|
header: '重量(KGS)',
|
|
|
width: 100,
|
|
|
renderer: function (value) {
|
|
|
return Ext.util.Format.number(value, '0.000');
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PREI_ETD',
|
|
|
header: '预计开船日期',
|
|
|
width: 100
|
|
|
}
|
|
|
];
|
|
|
|
|
|
this.girdcolums = this.initgirdcolums;
|
|
|
|
|
|
|
|
|
_this = this;
|
|
|
|
|
|
|
|
|
|
|
|
//定义数据集
|
|
|
this.storeList = Ext.create('Ext.data.Store', {
|
|
|
pageSize: this.PageSize,
|
|
|
model: 'MsOpCtnApply',
|
|
|
remoteSort: true,
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
url: '/MvcContainer/MsOpCtnApply/GetDataList',
|
|
|
reader: {
|
|
|
root: 'data',
|
|
|
totalProperty: 'totalCount'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
Ext.grid.RowNumberer = Ext.extend(Ext.grid.RowNumberer, {
|
|
|
width: 30
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.GridCheckBoxModel = Ext.create('Ext.selection.CheckboxModel');
|
|
|
_this = this;
|
|
|
//定义Grid
|
|
|
this.gridList = new Ext.grid.GridPanel({
|
|
|
store: this.storeList,
|
|
|
enableHdMenu: false,
|
|
|
region: 'center',
|
|
|
loadMask: { msg: "数据加载中,请稍等..." },
|
|
|
trackMouseOver: true,
|
|
|
disableSelection: false,
|
|
|
selModel: this.GridCheckBoxModel,
|
|
|
columns: this.girdcolums
|
|
|
,
|
|
|
viewConfig: {
|
|
|
enableTextSelection: true
|
|
|
},
|
|
|
// paging bar on the bottom
|
|
|
bbar: Ext.create('Ext.PagingToolbar', {
|
|
|
store: this.storeList,
|
|
|
displayInfo: true,
|
|
|
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
|
|
|
emptyMsg: "没有数据"
|
|
|
})
|
|
|
});
|
|
|
|
|
|
this.girdcolums = DsTruck.GetGridPanel(USERID, this.formname, this.girdcolums, 1); //使用者id,表名,中间column数组,跳过一开始的几列
|
|
|
this.girdcolums.unshift(new Ext.grid.RowNumberer());
|
|
|
// this.InitGrid(this.girdcolums, '');
|
|
|
this.gridList.addListener('itemdblclick', function (dataview, record, item, index, e, b) {
|
|
|
this.OpenEditWin(record);
|
|
|
|
|
|
}, this);
|
|
|
|
|
|
this.gridList.addListener('sortchange', function (ct, column, direction, eOpts) {
|
|
|
this.sortfield = column.dataIndex;
|
|
|
this.sortdire = direction;
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
|
|
|
//#region formSearch 查询面板
|
|
|
|
|
|
//#region 下拉菜单内容
|
|
|
this.storeCodeDisport = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CodeDisportModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCodeDisportList' }
|
|
|
});
|
|
|
this.storeCodeDisport.load();
|
|
|
|
|
|
|
|
|
this.comboxPORTDISCHARGE = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '目的港',
|
|
|
store: this.storeCodeDisport,
|
|
|
name: 'PORTDISCHARGE',
|
|
|
valueField: 'PORT',
|
|
|
queryMode: 'local',
|
|
|
displayField: 'PORT',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.comboxPORTLOAD = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '起运港',
|
|
|
store: this.storeCodeDisport,
|
|
|
name: 'PORTLOAD',
|
|
|
valueField: 'PORT',
|
|
|
queryMode: 'local',
|
|
|
displayField: 'PORT',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: 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/GetCustomRefList' }
|
|
|
});
|
|
|
this.storeCustCode.load({ params: { condition: "ISCONTROLLER='1'"} });
|
|
|
//委托单位
|
|
|
_this = this;
|
|
|
this.comboxCustCode = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '委托单位',
|
|
|
store: this.storeCustCode,
|
|
|
forceSelection: true,
|
|
|
name: 'CUSTOMERNAME',
|
|
|
valueField: 'CustName',
|
|
|
displayField: 'CodeAndName',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
//运输条款
|
|
|
this.storeSERVICE = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'CODE_SERVICE',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCodeServiceList' }
|
|
|
});
|
|
|
this.storeSERVICE.load({ params: { condition: "" } });
|
|
|
|
|
|
this.comboxSERVICE = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '运输条款',
|
|
|
flex: 1,
|
|
|
store: this.storeSERVICE,
|
|
|
forceSelection: true,
|
|
|
name: 'SERVICE',
|
|
|
valueField: 'SERVICE',
|
|
|
displayField: 'SERVICE'
|
|
|
});
|
|
|
//#endregion
|
|
|
|
|
|
_this = this;
|
|
|
this.formSearch = Ext.widget('form', {
|
|
|
frame: true,
|
|
|
region: 'center',
|
|
|
bodyPadding: 5,
|
|
|
fieldDefaults: {
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 90,
|
|
|
msgTarget: 'qtip'
|
|
|
},
|
|
|
|
|
|
|
|
|
items: [{//fieldset 1
|
|
|
xtype: 'container',
|
|
|
defaultType: 'textfield',
|
|
|
layout: 'anchor',
|
|
|
defaults: {
|
|
|
anchor: '100%'
|
|
|
},
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '编号',
|
|
|
name: 'MblNo',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, this.comboxCustCode, {
|
|
|
fieldLabel: '录入日期',
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'ETDbgn',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: '到',
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'ETDend',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
width: 90,
|
|
|
text: "执行查询",
|
|
|
iconCls: "btnrefresh",
|
|
|
handler: function (button, event) {
|
|
|
this.onRefreshClick(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
width: 90,
|
|
|
text: "高级查询",
|
|
|
iconCls: "btnmore",
|
|
|
handler: function (button, event) {
|
|
|
var sql = this.getCondition();
|
|
|
var winAccess = new Shipping.DsQuery({
|
|
|
|
|
|
});
|
|
|
winAccess.StoreList = this.storeList;
|
|
|
winAccess.formname = this.formname;
|
|
|
winAccess.condition = sql;
|
|
|
winAccess.show();
|
|
|
return;
|
|
|
},
|
|
|
scope: this
|
|
|
}]
|
|
|
}
|
|
|
|
|
|
]//end items(fieldset 1)
|
|
|
}]//end root items
|
|
|
});
|
|
|
//#endregion formSearch
|
|
|
|
|
|
//查询工具条
|
|
|
this.panelBtn = new Ext.Panel({
|
|
|
region: "north",
|
|
|
tbar: [
|
|
|
{
|
|
|
text: "执行查询",
|
|
|
iconCls: "btnrefresh",
|
|
|
handler: function (button, event) {
|
|
|
this.onRefreshClick(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
},
|
|
|
{
|
|
|
text: "重置条件",
|
|
|
iconCls: "btnreset",
|
|
|
handler: function (button, event) {
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: "审核通过",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnAuditPass',
|
|
|
hidden: false,
|
|
|
handler: function (button, event) {
|
|
|
this.onAuditPassClick('1');
|
|
|
},
|
|
|
scope: this
|
|
|
|
|
|
},
|
|
|
'-',
|
|
|
{
|
|
|
text: "驳回提交",
|
|
|
iconCls: "btndelete",
|
|
|
hidden: false,
|
|
|
id: 'btnAuditBack',
|
|
|
handler: function (button, event) {
|
|
|
this.onAuditBackClick('0');
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-',
|
|
|
{
|
|
|
text: "打印",
|
|
|
iconCls: 'btnprint',
|
|
|
menu: [
|
|
|
{ text: "全部",
|
|
|
handler: function (menu, event) {
|
|
|
_this.Print();
|
|
|
}
|
|
|
}, { text: "选择打印",
|
|
|
handler: function (menu, event) {
|
|
|
_this.PrintSelect();
|
|
|
}
|
|
|
}],
|
|
|
|
|
|
scope: this
|
|
|
}, '-',
|
|
|
{
|
|
|
text: "打开",
|
|
|
iconCls: "btnright", id: "OPEN",
|
|
|
handler: function (button, event) {
|
|
|
this.onOpenClick(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: "保存列表样式",
|
|
|
menu: [
|
|
|
{ text: "保存",
|
|
|
handler: function (button, event) {
|
|
|
this.girdcolums = DsTruck.SaveGridPanel(USERID, _this.formname, _this.gridList.columns, _this.girdcolums, 1, true);
|
|
|
}
|
|
|
}, { text: "初始化",
|
|
|
handler: function (menu, event) {
|
|
|
_this.InitGrid(_this.initgirdcolums);
|
|
|
_this.girdcolums = DsTruck.SaveGridPanel(USERID, _this.formname, _this.gridList.columns, _this.initgirdcolums, 1, true);
|
|
|
}
|
|
|
}],
|
|
|
scope: this
|
|
|
}
|
|
|
]
|
|
|
});
|
|
|
|
|
|
this.panelTop = new Ext.Panel({
|
|
|
layout: "border",
|
|
|
region: "north",
|
|
|
height: 75,
|
|
|
items: [this.formSearch, this.panelBtn]
|
|
|
});
|
|
|
|
|
|
//#region 申请修改
|
|
|
|
|
|
|
|
|
|
|
|
this.formEdit = Ext.widget('form', {
|
|
|
region: 'north',
|
|
|
frame: true,
|
|
|
bodyPadding: 5,
|
|
|
title: '修改旧值',
|
|
|
height: 195,
|
|
|
// autoScroll: true,
|
|
|
trackResetOnLoad: true,
|
|
|
fieldDefaults: {
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 90,
|
|
|
msgTarget: 'qtip'
|
|
|
},
|
|
|
|
|
|
items: [
|
|
|
{//fieldset 1
|
|
|
xtype: 'container',
|
|
|
defaultType: 'textfield',
|
|
|
layout: 'anchor',
|
|
|
defaults: {
|
|
|
anchor: '100%'
|
|
|
},
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: 'GID',
|
|
|
name: 'GID', flex: 0, hidden: true, margins: '0'
|
|
|
}, {
|
|
|
fieldLabel: 'COMPANYID',
|
|
|
name: 'COMPANYID', flex: 0, hidden: true, margins: '0'
|
|
|
}, {
|
|
|
fieldLabel: 'INPUTBY',
|
|
|
name: 'INPUTBY', flex: 0, hidden: true, margins: '0'
|
|
|
}, {
|
|
|
fieldLabel: 'PH',
|
|
|
hidden: true,
|
|
|
name: 'PH'
|
|
|
}, {
|
|
|
fieldLabel: 'DENSITY',
|
|
|
hidden: true,
|
|
|
name: 'DENSITY'
|
|
|
}, {
|
|
|
fieldLabel: 'UNNO',
|
|
|
hidden: true,
|
|
|
name: 'UNNO'
|
|
|
}, {
|
|
|
fieldLabel: 'DCLASS',
|
|
|
hidden: true,
|
|
|
name: 'DCLASS'
|
|
|
}, {
|
|
|
fieldLabel: 'SDCLASS',
|
|
|
hidden: true,
|
|
|
name: 'SDCLASS'
|
|
|
}, {
|
|
|
fieldLabel: 'PACKINGGROUP',
|
|
|
hidden: true,
|
|
|
name: 'PACKINGGROUP'
|
|
|
}, {
|
|
|
fieldLabel: 'ISPOLLUTEOCEAN',
|
|
|
hidden: true,
|
|
|
name: 'ISPOLLUTEOCEAN'
|
|
|
}, {
|
|
|
fieldLabel: 'MELTINGPOINT',
|
|
|
hidden: true,
|
|
|
name: 'MELTINGPOINT'
|
|
|
}, {
|
|
|
fieldLabel: 'BOILINGPOINT',
|
|
|
hidden: true,
|
|
|
name: 'BOILINGPOINT'
|
|
|
}, {
|
|
|
fieldLabel: 'FLASHPOINT',
|
|
|
hidden: true,
|
|
|
name: 'FLASHPOINT'
|
|
|
}, {
|
|
|
fieldLabel: 'IMDG',
|
|
|
hidden: true,
|
|
|
name: 'IMDG'
|
|
|
}, {
|
|
|
fieldLabel: '申请编号',
|
|
|
labelWidth: 70,
|
|
|
readOnly: true,
|
|
|
allowBlank: true,
|
|
|
name: 'BSNO'
|
|
|
}, {
|
|
|
fieldLabel: '申请日期',
|
|
|
readOnly: true,
|
|
|
name: 'BSDATE'
|
|
|
}, {
|
|
|
fieldLabel: '揽货人',
|
|
|
readOnly: true,
|
|
|
name: 'SALE'
|
|
|
}, {
|
|
|
fieldLabel: '操作',
|
|
|
readOnly: true,
|
|
|
name: 'OP'
|
|
|
}, {
|
|
|
fieldLabel: '委托单位',
|
|
|
readOnly: true,
|
|
|
name: 'CUSTOMERNAME'
|
|
|
}]
|
|
|
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '品名',
|
|
|
readOnly: true,
|
|
|
name: 'GOODSNAME',
|
|
|
listeners: {
|
|
|
'render': function (_field, eOpts) {//自定义函数,定义双击事件
|
|
|
var _this = this;
|
|
|
_field.getEl().on('dblclick', function (e, t, eOpts) {
|
|
|
var openSet = "height=700, width=1224, 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 = "";
|
|
|
openUrl = "../MsCodeMSDS/MsdsView?handle=check&goodsname=" + t.value;
|
|
|
window.open(openUrl, openType, openSet);
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: '货物类别',
|
|
|
readOnly: true,
|
|
|
name: 'GOODTYPE'
|
|
|
}, {
|
|
|
fieldLabel: '起运港',
|
|
|
readOnly: true,
|
|
|
name: 'PORTLOAD'
|
|
|
}, {
|
|
|
fieldLabel: '目的港',
|
|
|
readOnly: true,
|
|
|
name: 'PORTDISCHARGE'
|
|
|
}, {
|
|
|
fieldLabel: '是否我司订舱',
|
|
|
inputValue: true,
|
|
|
readOnly: true,
|
|
|
xtype: 'checkboxfield',
|
|
|
name: 'ISOWNERBOOKING'
|
|
|
}
|
|
|
]
|
|
|
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '箱型',
|
|
|
readOnly: true,
|
|
|
name: 'CTNALL'
|
|
|
}, {
|
|
|
fieldLabel: '箱量',
|
|
|
readOnly: true,
|
|
|
name: 'CTNNUM'
|
|
|
}, {
|
|
|
fieldLabel: '计划用箱日期',
|
|
|
format: 'Y-m-d',
|
|
|
readOnly: true,
|
|
|
flex: 1,
|
|
|
xtype: 'datefield',
|
|
|
name: 'PLANCTNDATE'
|
|
|
}, {
|
|
|
fieldLabel: '工厂名称',
|
|
|
readOnly: true,
|
|
|
name: 'FACTORYNAME'
|
|
|
}, {
|
|
|
fieldLabel: '工厂地址',
|
|
|
readOnly: true,
|
|
|
name: 'FACTORYADDR'
|
|
|
}]
|
|
|
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
flex: 1,
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '起运港免箱使天数',
|
|
|
labelWidth: 110, name: 'SLOAD_FREE_USECTNE_DAY'
|
|
|
}, {
|
|
|
fieldLabel: '起运港超期箱使费',
|
|
|
labelWidth: 110, name: 'SLOAD_OVER_USECTNE_RATE'
|
|
|
}, {
|
|
|
fieldLabel: '目的港免箱使天数',
|
|
|
labelWidth: 110, name: 'SDEST_FREE_USECTNE_DAY'
|
|
|
}, {
|
|
|
fieldLabel: '目的港超期箱使费',
|
|
|
labelWidth: 110, name: 'SDEST_OVER_USECTNE_RATE'
|
|
|
}, {
|
|
|
fieldLabel: '目的港代理',
|
|
|
readOnly: true,
|
|
|
name: 'AGENTNAME'
|
|
|
}]
|
|
|
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '运输条款',
|
|
|
flex: 1, readOnly: true,
|
|
|
name: 'SERVICE'
|
|
|
}, {
|
|
|
fieldLabel: '是否加热',
|
|
|
flex: 1, readOnly: true,
|
|
|
inputValue: true,
|
|
|
xtype: 'checkboxfield',
|
|
|
name: 'NEEDBEHEATED'
|
|
|
}, {
|
|
|
fieldLabel: '重量',
|
|
|
flex: 1, readOnly: true,
|
|
|
xtype: 'numberfield',
|
|
|
allowDecimals: true, //允许输入小数
|
|
|
decimalPrecision: 3,
|
|
|
name: 'WEIGHT'
|
|
|
}, {
|
|
|
fieldLabel: '预计开船日期',
|
|
|
format: 'Y-m-d',
|
|
|
allowBlank: true,
|
|
|
flex: 1, readOnly: true,
|
|
|
xtype: 'datefield',
|
|
|
name: 'PREI_ETD'
|
|
|
}, {
|
|
|
fieldLabel: '空箱调拨',
|
|
|
flex: 1, readOnly: true,
|
|
|
inputValue: true,
|
|
|
xtype: 'checkboxfield',
|
|
|
name: 'EMPTYCTNALLOCATION'
|
|
|
}]
|
|
|
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '按进港日计算超期箱使',
|
|
|
inputValue: true,
|
|
|
labelWidth: 140,
|
|
|
xtype: 'checkboxfield',
|
|
|
name: 'ISPORTLOADDATE'
|
|
|
}, {
|
|
|
fieldLabel: '备注',
|
|
|
flex: 2,
|
|
|
name: 'REMARKS'
|
|
|
}]
|
|
|
|
|
|
}
|
|
|
]//end items(fieldset 1)
|
|
|
}//end fieldset 1
|
|
|
]//end root items
|
|
|
}); //end this.formEdit
|
|
|
|
|
|
|
|
|
this.formMDEdit = Ext.widget('form', {
|
|
|
region: 'center',
|
|
|
frame: true,
|
|
|
bodyPadding: 5,
|
|
|
title: '修改新值',
|
|
|
// autoScroll: true,
|
|
|
trackResetOnLoad: true,
|
|
|
fieldDefaults: {
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 90,
|
|
|
msgTarget: 'qtip'
|
|
|
},
|
|
|
|
|
|
items: [
|
|
|
{//fieldset 1
|
|
|
xtype: 'container',//fieldset
|
|
|
defaultType: 'textfield',
|
|
|
layout: 'anchor',
|
|
|
defaults: {
|
|
|
anchor: '100%'
|
|
|
},
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: 'GID',
|
|
|
name: 'GID', flex: 0, hidden: true, margins: '0'
|
|
|
}, {
|
|
|
fieldLabel: 'APPLYID',
|
|
|
name: 'APPLYID', flex: 0, hidden: true, margins: '0'
|
|
|
}, {
|
|
|
fieldLabel: 'MODIFYTYPE',
|
|
|
name: 'MODIFYTYPE', flex: 0, hidden: true, margins: '0'
|
|
|
}, {
|
|
|
fieldLabel: 'COMPANYID',
|
|
|
name: 'COMPANYID', flex: 0, hidden: true, margins: '0'
|
|
|
}, {
|
|
|
fieldLabel: 'INPUTBY',
|
|
|
name: 'INPUTBY', flex: 0, hidden: true, margins: '0'
|
|
|
}, {
|
|
|
fieldLabel: 'PH',
|
|
|
hidden: true,
|
|
|
name: 'PH'
|
|
|
}, {
|
|
|
fieldLabel: 'DENSITY',
|
|
|
hidden: true,
|
|
|
name: 'DENSITY'
|
|
|
}, {
|
|
|
fieldLabel: 'UNNO',
|
|
|
hidden: true,
|
|
|
name: 'UNNO'
|
|
|
}, {
|
|
|
fieldLabel: 'DCLASS',
|
|
|
hidden: true,
|
|
|
name: 'DCLASS'
|
|
|
}, {
|
|
|
fieldLabel: 'SDCLASS',
|
|
|
hidden: true,
|
|
|
name: 'SDCLASS'
|
|
|
}, {
|
|
|
fieldLabel: 'PACKINGGROUP',
|
|
|
hidden: true,
|
|
|
name: 'PACKINGGROUP'
|
|
|
}, {
|
|
|
fieldLabel: 'ISPOLLUTEOCEAN',
|
|
|
hidden: true,
|
|
|
name: 'ISPOLLUTEOCEAN'
|
|
|
}, {
|
|
|
fieldLabel: 'MELTINGPOINT',
|
|
|
hidden: true,
|
|
|
name: 'MELTINGPOINT'
|
|
|
}, {
|
|
|
fieldLabel: 'BOILINGPOINT',
|
|
|
hidden: true,
|
|
|
name: 'BOILINGPOINT'
|
|
|
}, {
|
|
|
fieldLabel: 'FLASHPOINT',
|
|
|
hidden: true,
|
|
|
name: 'FLASHPOINT'
|
|
|
}, {
|
|
|
fieldLabel: 'IMDG',
|
|
|
hidden: true,
|
|
|
name: 'IMDG'
|
|
|
}, {
|
|
|
fieldLabel: '申请编号',
|
|
|
labelWidth: 70,
|
|
|
readOnly: true,
|
|
|
allowBlank: true,
|
|
|
name: 'BSNO'
|
|
|
}, {
|
|
|
fieldLabel: '申请日期',
|
|
|
readOnly: true,
|
|
|
name: 'BSDATE'
|
|
|
}, {
|
|
|
fieldLabel: '揽货人',
|
|
|
readOnly: true,
|
|
|
name: 'SALE'
|
|
|
}, {
|
|
|
fieldLabel: '操作',
|
|
|
readOnly: true,
|
|
|
name: 'OP'
|
|
|
}, {
|
|
|
fieldLabel: '委托单位',
|
|
|
readOnly: true,
|
|
|
name: 'CUSTOMERNAME'
|
|
|
}]
|
|
|
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '品名',
|
|
|
readOnly: true,
|
|
|
name: 'GOODSNAME',
|
|
|
listeners: {
|
|
|
'render': function (_field, eOpts) {//自定义函数,定义双击事件
|
|
|
var _this = this;
|
|
|
_field.getEl().on('dblclick', function (e, t, eOpts) {
|
|
|
var openSet = "height=700, width=1224, 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 = "";
|
|
|
openUrl = "../MsCodeMSDS/MsdsView?handle=check&goodsname=" + t.value;
|
|
|
window.open(openUrl, openType, openSet);
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: '货物类别',
|
|
|
readOnly: true,
|
|
|
name: 'GOODTYPE'
|
|
|
}, {
|
|
|
fieldLabel: '起运港',
|
|
|
readOnly: true,
|
|
|
name: 'PORTLOAD'
|
|
|
}, {
|
|
|
fieldLabel: '目的港',
|
|
|
readOnly: true,
|
|
|
name: 'PORTDISCHARGE'
|
|
|
}, {
|
|
|
fieldLabel: '是否我司订舱',
|
|
|
inputValue: true,
|
|
|
readOnly: true,
|
|
|
xtype: 'checkboxfield',
|
|
|
name: 'ISOWNERBOOKING'
|
|
|
}
|
|
|
]
|
|
|
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '箱型',
|
|
|
readOnly: true,
|
|
|
name: 'CTNALL'
|
|
|
}, {
|
|
|
fieldLabel: '箱量',
|
|
|
readOnly: true,
|
|
|
name: 'CTNNUM'
|
|
|
}, {
|
|
|
fieldLabel: '计划用箱日期',
|
|
|
format: 'Y-m-d',
|
|
|
readOnly: true,
|
|
|
flex: 1,
|
|
|
xtype: 'datefield',
|
|
|
name: 'PLANCTNDATE'
|
|
|
}, {
|
|
|
fieldLabel: '工厂名称',
|
|
|
readOnly: true,
|
|
|
name: 'FACTORYNAME'
|
|
|
}, {
|
|
|
fieldLabel: '工厂地址',
|
|
|
readOnly: true,
|
|
|
name: 'FACTORYADDR'
|
|
|
}]
|
|
|
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
flex: 1,
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '起运港免箱使天数',
|
|
|
labelWidth: 110, name: 'SLOAD_FREE_USECTNE_DAY'
|
|
|
}, {
|
|
|
fieldLabel: '起运港超期箱使费',
|
|
|
labelWidth: 110, name: 'SLOAD_OVER_USECTNE_RATE'
|
|
|
}, {
|
|
|
fieldLabel: '目的港免箱使天数',
|
|
|
labelWidth: 110, name: 'SDEST_FREE_USECTNE_DAY'
|
|
|
}, {
|
|
|
fieldLabel: '目的港超期箱使费',
|
|
|
labelWidth: 110, name: 'SDEST_OVER_USECTNE_RATE'
|
|
|
}, {
|
|
|
fieldLabel: '目的港代理',
|
|
|
readOnly: true,
|
|
|
name: 'AGENTNAME'
|
|
|
}]
|
|
|
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [this.comboxSERVICE, {
|
|
|
fieldLabel: '是否加热',
|
|
|
flex: 1,
|
|
|
inputValue: true,
|
|
|
xtype: 'checkboxfield',
|
|
|
name: 'NEEDBEHEATED'
|
|
|
}, {
|
|
|
fieldLabel: '重量',
|
|
|
flex: 1,
|
|
|
xtype: 'numberfield',
|
|
|
allowDecimals: true, //允许输入小数
|
|
|
decimalPrecision: 3,
|
|
|
name: 'WEIGHT'
|
|
|
}, {
|
|
|
fieldLabel: '预计开船日期',
|
|
|
format: 'Y-m-d',
|
|
|
allowBlank: true,
|
|
|
flex: 1,
|
|
|
xtype: 'datefield',
|
|
|
name: 'PREI_ETD'
|
|
|
}, {
|
|
|
fieldLabel: '空箱调拨',
|
|
|
flex: 1,
|
|
|
inputValue: true,
|
|
|
xtype: 'checkboxfield',
|
|
|
name: 'EMPTYCTNALLOCATION'
|
|
|
}]
|
|
|
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '按进港日计算超期箱使',
|
|
|
inputValue: true,
|
|
|
labelWidth: 140,
|
|
|
xtype: 'checkboxfield',
|
|
|
name: 'ISPORTLOADDATE'
|
|
|
}, {
|
|
|
fieldLabel: '备注',
|
|
|
flex: 4,
|
|
|
name: 'REMARKS'
|
|
|
}, {
|
|
|
fieldLabel: '申请人',
|
|
|
readOnly: true,
|
|
|
labelWidth: 60, name: 'INPUTBYREF'
|
|
|
}, {
|
|
|
fieldLabel: '申请时间',
|
|
|
readOnly: true,
|
|
|
labelWidth: 60, name: 'INPUTTIME'
|
|
|
}]
|
|
|
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '申请修改原因',
|
|
|
flex: 4,
|
|
|
name: 'REASON'
|
|
|
}]
|
|
|
|
|
|
}
|
|
|
]//end items(fieldset 1)
|
|
|
}//end fieldset 1
|
|
|
]//end root items
|
|
|
}); //end this.formEdit
|
|
|
|
|
|
|
|
|
this.panelgridListModify = new Ext.Panel({
|
|
|
region: 'south',
|
|
|
layout: "border",
|
|
|
height: 415,
|
|
|
hidden: true,
|
|
|
animate: true,
|
|
|
autoScroll: false,
|
|
|
// containerScroll: true,
|
|
|
frame: false,
|
|
|
items: [this.formEdit, this.formMDEdit]
|
|
|
});
|
|
|
|
|
|
|
|
|
this.formMDDel = Ext.widget('form', {
|
|
|
region: 'south',
|
|
|
frame: true,
|
|
|
height: 200,
|
|
|
hidden: true,
|
|
|
bodyPadding: 5,
|
|
|
title: '申请删除原因',
|
|
|
// autoScroll: true,
|
|
|
trackResetOnLoad: true,
|
|
|
fieldDefaults: {
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 90,
|
|
|
msgTarget: 'qtip'
|
|
|
},
|
|
|
|
|
|
items: [
|
|
|
{//fieldset 1
|
|
|
xtype: 'fieldset',
|
|
|
defaultType: 'textfield',
|
|
|
layout: 'anchor',
|
|
|
defaults: {
|
|
|
anchor: '100%'
|
|
|
},
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: 'GID',
|
|
|
name: 'GID', flex: 0, hidden: true, margins: '0'
|
|
|
}, {
|
|
|
fieldLabel: 'APPLYID',
|
|
|
name: 'APPLYID', flex: 0, hidden: true, margins: '0'
|
|
|
}, {
|
|
|
fieldLabel: 'MODIFYTYPE',
|
|
|
name: 'MODIFYTYPE', flex: 0, hidden: true, margins: '0'
|
|
|
}, {
|
|
|
fieldLabel: 'COMPANYID',
|
|
|
name: 'COMPANYID', flex: 0, hidden: true, margins: '0'
|
|
|
}, {
|
|
|
fieldLabel: 'INPUTBY',
|
|
|
name: 'INPUTBY', flex: 0, hidden: true, margins: '0'
|
|
|
}, {
|
|
|
fieldLabel: 'PH',
|
|
|
hidden: true,
|
|
|
name: 'PH'
|
|
|
}, {
|
|
|
fieldLabel: 'DENSITY',
|
|
|
hidden: true,
|
|
|
name: 'DENSITY'
|
|
|
}, {
|
|
|
fieldLabel: 'UNNO',
|
|
|
hidden: true,
|
|
|
name: 'UNNO'
|
|
|
}, {
|
|
|
fieldLabel: 'DCLASS',
|
|
|
hidden: true,
|
|
|
name: 'DCLASS'
|
|
|
}, {
|
|
|
fieldLabel: 'SDCLASS',
|
|
|
hidden: true,
|
|
|
name: 'SDCLASS'
|
|
|
}, {
|
|
|
fieldLabel: 'PACKINGGROUP',
|
|
|
hidden: true,
|
|
|
name: 'PACKINGGROUP'
|
|
|
}, {
|
|
|
fieldLabel: 'ISPOLLUTEOCEAN',
|
|
|
hidden: true,
|
|
|
name: 'ISPOLLUTEOCEAN'
|
|
|
}, {
|
|
|
fieldLabel: 'MELTINGPOINT',
|
|
|
hidden: true,
|
|
|
name: 'MELTINGPOINT'
|
|
|
}, {
|
|
|
fieldLabel: 'BOILINGPOINT',
|
|
|
hidden: true,
|
|
|
name: 'BOILINGPOINT'
|
|
|
}, {
|
|
|
fieldLabel: 'FLASHPOINT',
|
|
|
hidden: true,
|
|
|
name: 'FLASHPOINT'
|
|
|
}, {
|
|
|
fieldLabel: 'IMDG',
|
|
|
hidden: true,
|
|
|
name: 'IMDG'
|
|
|
}, {
|
|
|
fieldLabel: '申请编号',
|
|
|
labelWidth: 70,
|
|
|
readOnly: true,
|
|
|
hidden: true,
|
|
|
allowBlank: true,
|
|
|
name: 'BSNO'
|
|
|
}, {
|
|
|
fieldLabel: '申请日期',
|
|
|
readOnly: true,
|
|
|
hidden: true,
|
|
|
name: 'BSDATE'
|
|
|
}]
|
|
|
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '删除原因',
|
|
|
flex: 4,
|
|
|
name: 'REMARKS'
|
|
|
}]
|
|
|
|
|
|
}
|
|
|
]//end items(fieldset 1)
|
|
|
}//end fieldset 1
|
|
|
]//end root items
|
|
|
}); //end this.formEdit
|
|
|
|
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
Ext.apply(this, {
|
|
|
items: [this.panelTop, this.gridList, this.panelgridListModify, this.formMDDel]
|
|
|
});
|
|
|
|
|
|
this.storeList.on('beforeload', function (store) {
|
|
|
Ext.apply(store.proxy.extraParams, { condition: _this.sqlcontext });
|
|
|
}, this);
|
|
|
|
|
|
var isloadfee = true;
|
|
|
this.gridList.getSelectionModel().on('select', function (model, record, index) {
|
|
|
var AUDITSTATUS = record.data.AUDITSTATUS;
|
|
|
var GID = record.data.GID;
|
|
|
if (AUDITSTATUS == '申请修改') {
|
|
|
this.formEdit.getForm().loadRecord(record);
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在查询主表数据...',
|
|
|
url: '/MvcContainer/MsOpCtnApply/GetModifyData',
|
|
|
params: {
|
|
|
handle: 'edit',
|
|
|
condition: "APPLYID='" + GID + "' AND MDSTATUS='1' AND MODIFYTYPE='1' "
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({
|
|
|
title: '提示',
|
|
|
msg: result.Message,
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
buttons: Ext.Msg.OK
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var data = result.data;
|
|
|
|
|
|
this.formMDEdit.getForm().reset();
|
|
|
this.formMDEdit.getForm().setValues(data);
|
|
|
if (record.data.OP != data.OP)
|
|
|
this.formMDEdit.getForm().findField('OP').setFieldStyle({ background: '#FF4500' });
|
|
|
else
|
|
|
this.formMDEdit.getForm().findField('OP').setFieldStyle({ background: '#FFFFFF' });
|
|
|
|
|
|
if (record.data.CUSTOMERNAME != data.CUSTOMERNAME)
|
|
|
this.formMDEdit.getForm().findField('CUSTOMERNAME').setFieldStyle({ background: '#FF4500' });
|
|
|
else
|
|
|
this.formMDEdit.getForm().findField('CUSTOMERNAME').setFieldStyle({ background: '#FFFFFF' });
|
|
|
|
|
|
if (record.data.GOODSNAME != data.GOODSNAME)
|
|
|
this.formMDEdit.getForm().findField('GOODSNAME').setFieldStyle({ background: '#FF4500' });
|
|
|
else
|
|
|
this.formMDEdit.getForm().findField('GOODSNAME').setFieldStyle({ background: '#FFFFFF' });
|
|
|
|
|
|
if (record.data.GOODTYPE != data.GOODTYPE)
|
|
|
this.formMDEdit.getForm().findField('GOODTYPE').setFieldStyle({ background: '#FF4500' });
|
|
|
else
|
|
|
this.formMDEdit.getForm().findField('GOODTYPE').setFieldStyle({ background: '#FFFFFF' });
|
|
|
|
|
|
if (record.data.PORTLOAD != data.PORTLOAD)
|
|
|
this.formMDEdit.getForm().findField('PORTLOAD').setFieldStyle({ background: '#FF4500' });
|
|
|
else
|
|
|
this.formMDEdit.getForm().findField('PORTLOAD').setFieldStyle({ background: '#FFFFFF' });
|
|
|
|
|
|
if (record.data.PORTDISCHARGE != data.PORTDISCHARGE)
|
|
|
this.formMDEdit.getForm().findField('PORTDISCHARGE').setFieldStyle({ background: '#FF4500' });
|
|
|
else
|
|
|
this.formMDEdit.getForm().findField('PORTDISCHARGE').setFieldStyle({ background: '#FFFFFF' });
|
|
|
|
|
|
if (record.data.ISOWNERBOOKING != data.ISOWNERBOOKING)
|
|
|
this.formMDEdit.getForm().findField('ISOWNERBOOKING').setFieldStyle({ background: '#FF4500' });
|
|
|
else
|
|
|
this.formMDEdit.getForm().findField('ISOWNERBOOKING').setFieldStyle({ background: '#FFFFFF' });
|
|
|
|
|
|
if (record.data.CTNALL != data.CTNALL)
|
|
|
this.formMDEdit.getForm().findField('CTNALL').setFieldStyle({ background: '#FF4500' });
|
|
|
else
|
|
|
this.formMDEdit.getForm().findField('CTNALL').setFieldStyle({ background: '#FFFFFF' });
|
|
|
|
|
|
if (record.data.CTNNUM != data.CTNNUM)
|
|
|
this.formMDEdit.getForm().findField('CTNNUM').setFieldStyle({ background: '#FF4500' });
|
|
|
else this.formMDEdit.getForm().findField('CTNNUM').setFieldStyle({ background: '#FFFFFF' });
|
|
|
|
|
|
if (record.data.PLANCTNDATE != data.PLANCTNDATE)
|
|
|
this.formMDEdit.getForm().findField('PLANCTNDATE').setFieldStyle({ background: '#FF4500' });
|
|
|
else
|
|
|
this.formMDEdit.getForm().findField('PLANCTNDATE').setFieldStyle({ background: '#FFFFFF' });
|
|
|
|
|
|
if (record.data.FACTORYNAME != data.FACTORYNAME)
|
|
|
this.formMDEdit.getForm().findField('FACTORYNAME').setFieldStyle({ background: '#FF4500' });
|
|
|
else
|
|
|
this.formMDEdit.getForm().findField('FACTORYNAME').setFieldStyle({ background: '#FFFFFF' });
|
|
|
|
|
|
if (record.data.FACTORYADDR != data.FACTORYADDR)
|
|
|
this.formMDEdit.getForm().findField('FACTORYADDR').setFieldStyle({ background: '#FF4500' });
|
|
|
else
|
|
|
this.formMDEdit.getForm().findField('FACTORYADDR').setFieldStyle({ background: '#FFFFFF' });
|
|
|
|
|
|
if (record.data.SLOAD_FREE_USECTNE_DAY != data.SLOAD_FREE_USECTNE_DAY)
|
|
|
this.formMDEdit.getForm().findField('SLOAD_FREE_USECTNE_DAY').setFieldStyle({ background: '#FF4500' });
|
|
|
else
|
|
|
this.formMDEdit.getForm().findField('SLOAD_FREE_USECTNE_DAY').setFieldStyle({ background: '#FFFFFF' });
|
|
|
|
|
|
if (record.data.SLOAD_OVER_USECTNE_RATE != data.SLOAD_OVER_USECTNE_RATE)
|
|
|
this.formMDEdit.getForm().findField('SLOAD_OVER_USECTNE_RATE').setFieldStyle({ background: '#FF4500' });
|
|
|
else
|
|
|
this.formMDEdit.getForm().findField('SLOAD_OVER_USECTNE_RATE').setFieldStyle({ background: '#FFFFFF' });
|
|
|
|
|
|
if (record.data.SDEST_FREE_USECTNE_DAY != data.SDEST_FREE_USECTNE_DAY)
|
|
|
this.formMDEdit.getForm().findField('SDEST_FREE_USECTNE_DAY').setFieldStyle({ background: '#FF4500' });
|
|
|
else
|
|
|
this.formMDEdit.getForm().findField('SDEST_FREE_USECTNE_DAY').setFieldStyle({ background: '#FFFFFF' });
|
|
|
|
|
|
if (record.data.SDEST_OVER_USECTNE_RATE != data.SDEST_OVER_USECTNE_RATE)
|
|
|
this.formMDEdit.getForm().findField('SDEST_OVER_USECTNE_RATE').setFieldStyle({ background: '#FF4500' });
|
|
|
else
|
|
|
this.formMDEdit.getForm().findField('SDEST_OVER_USECTNE_RATE').setFieldStyle({ background: '#FFFFFF' });
|
|
|
|
|
|
if (record.data.ISPORTLOADDATE != data.ISPORTLOADDATE)
|
|
|
this.formMDEdit.getForm().findField('ISPORTLOADDATE').setFieldStyle({ background: '#FF4500' });
|
|
|
else
|
|
|
this.formMDEdit.getForm().findField('ISPORTLOADDATE').setFieldStyle({ background: '#FFFFFF' });
|
|
|
|
|
|
if (record.data.REMARKS != data.REMARKS)
|
|
|
this.formMDEdit.getForm().findField('REMARKS').setFieldStyle({ background: '#FF4500' });
|
|
|
else
|
|
|
this.formMDEdit.getForm().findField('REMARKS').setFieldStyle({ background: '#FFFFFF' });
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
this.panelgridListModify.setVisible(true);
|
|
|
} else {
|
|
|
this.panelgridListModify.setVisible(false);
|
|
|
|
|
|
}
|
|
|
if (AUDITSTATUS == '申请删除') {
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在查询主表数据...',
|
|
|
url: '/MvcContainer/MsOpCtnApply/GetModifyData',
|
|
|
params: {
|
|
|
handle: 'edit',
|
|
|
condition: "APPLYID='" + GID + "' AND MDSTATUS='1' AND MODIFYTYPE='4' "
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({
|
|
|
title: '提示',
|
|
|
msg: result.Message,
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
buttons: Ext.Msg.OK
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var data = result.data;
|
|
|
|
|
|
this.formMDDel.getForm().reset();
|
|
|
this.formMDDel.getForm().setValues(data);
|
|
|
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
this.formMDDel.setVisible(true);
|
|
|
} else {
|
|
|
this.formMDDel.setVisible(false);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
}, this);
|
|
|
|
|
|
_this = this;
|
|
|
this.gridList.on({
|
|
|
selectionchange: function (sm, selections) {
|
|
|
if (selections.length == 0) {
|
|
|
_this.panelgridListModify.setVisible(false);
|
|
|
_this.formMDDel.setVisible(false);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
this.sqlcontext = '';
|
|
|
|
|
|
this.gridList.reconfigure(this.storeList, this.girdcolums);
|
|
|
|
|
|
this.onRefreshClick();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// this.InitGrid(this.girdcolums,this.sqlcontext);
|
|
|
|
|
|
}, //end initUIComponents
|
|
|
|
|
|
onRefreshClick: function (button, event) {
|
|
|
var sql = this.getCondition();
|
|
|
this.sqlcontext = sql;
|
|
|
this.storeList.load({
|
|
|
params: { start: 0, limit: this.PageSize, sort: '', condition: _this.sqlcontext },
|
|
|
waitMsg: "正在查询数据...",
|
|
|
scope: this
|
|
|
});
|
|
|
},
|
|
|
|
|
|
onDsQuery: function () {
|
|
|
var sql = this.sqlcontext;
|
|
|
this.storeList.load({
|
|
|
params: { start: 0, limit: this.PageSize, sort: '', condition: sql },
|
|
|
waitMsg: "正在查询数据...",
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
onAuditPassClick: function (type) {
|
|
|
var selections = this.gridList.getSelectionModel().getSelection();
|
|
|
if (selections.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '请先选择单据!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var record = selections[0];
|
|
|
Ext.MessageBox.confirm('提示', '确定审核通过该记录吗?', function (btn) {
|
|
|
if (btn == 'yes') {
|
|
|
|
|
|
var bodyAddDatas = [];
|
|
|
for (var i = 0; i < selections.length; i++) {
|
|
|
var rec = selections[i];
|
|
|
bodyAddDatas.push(rec);
|
|
|
}
|
|
|
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
|
|
|
|
|
|
Ext.Msg.wait('正在处理数据...');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在处理数据...',
|
|
|
url: '/MvcContainer/MsOpCtnApply/ShenModifyAudit',
|
|
|
params: {
|
|
|
data: jsonbodyAddDatas,
|
|
|
type: type
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
this.onRefreshClick();
|
|
|
Ext.Msg.show({ title: '提示', msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
else {
|
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
failure: function (response, options) {
|
|
|
Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
},
|
|
|
success: function (response, options) {
|
|
|
},
|
|
|
scope: this
|
|
|
}); //end Ext.Ajax.request
|
|
|
}
|
|
|
}, this);
|
|
|
}, //onDeleteClick
|
|
|
|
|
|
onAuditBackClick: function (type) {
|
|
|
var selections = this.gridList.getSelectionModel().getSelection();
|
|
|
if (selections.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '请先选择单据!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
_this = this;
|
|
|
var record = selections[0];
|
|
|
Ext.MessageBox.confirm('提示', '确定驳回该记录吗?', function (btn) {
|
|
|
if (btn == 'yes') {
|
|
|
|
|
|
var bodyAddDatas = [];
|
|
|
for (var i = 0; i < selections.length; i++) {
|
|
|
var rec = selections[i];
|
|
|
bodyAddDatas.push(rec);
|
|
|
}
|
|
|
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
|
|
|
|
|
|
Ext.MessageBox.show({
|
|
|
title: '确认驳回',
|
|
|
msg: '请输入驳回原因:',
|
|
|
width: 300,
|
|
|
buttons: Ext.MessageBox.OKCANCEL,
|
|
|
multiline: true,
|
|
|
fn: function (btn, text) {
|
|
|
if (btn == "ok") {
|
|
|
Ext.Msg.wait('正在处理数据...');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在处理数据...',
|
|
|
url: '/MvcContainer/MsOpCtnApply/ShenModifyAudit',
|
|
|
params: {
|
|
|
data: jsonbodyAddDatas,
|
|
|
type: type,
|
|
|
reasean: text
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
_this.onRefreshClick();
|
|
|
Ext.Msg.show({ title: '提示', msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
else {
|
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
failure: function (response, options) {
|
|
|
Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
},
|
|
|
success: function (response, options) {
|
|
|
},
|
|
|
scope: this
|
|
|
}); //end Ext.Ajax.request
|
|
|
}
|
|
|
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
}, this);
|
|
|
}, //onDeleteClick
|
|
|
|
|
|
|
|
|
onDeleteClick: function (button, event) {
|
|
|
var selections = this.gridList.getSelectionModel().getSelection();
|
|
|
if (selections.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '请先选择单据!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var record = selections[0];
|
|
|
Ext.MessageBox.confirm('提示', '确定删除该记录吗?', function (btn) {
|
|
|
if (btn == 'yes') {
|
|
|
|
|
|
var bodyAddDatas = [];
|
|
|
for (var i = 0; i < selections.length; i++) {
|
|
|
var rec = selections[i];
|
|
|
bodyAddDatas.push(rec);
|
|
|
}
|
|
|
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
|
|
|
|
|
|
Ext.Msg.wait('正在删除数据...');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在删除数据...',
|
|
|
url: '/MvcContainer/MsOpCtnApply/Delete',
|
|
|
params: {
|
|
|
data: jsonbodyAddDatas
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
this.onRefreshClick();
|
|
|
Ext.Msg.show({ title: '提示', msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
else {
|
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
failure: function (response, options) {
|
|
|
Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
},
|
|
|
success: function (response, options) {
|
|
|
},
|
|
|
scope: this
|
|
|
}); //end Ext.Ajax.request
|
|
|
}
|
|
|
}, this);
|
|
|
}, //onDeleteClick
|
|
|
|
|
|
|
|
|
getCondition: function () {
|
|
|
var form = this.formSearch.getForm();
|
|
|
if (!form.isValid()) {
|
|
|
Ext.Msg.alert('提示', '查询条件赋值错误,请检查。');
|
|
|
return '';
|
|
|
}
|
|
|
|
|
|
var sql = " (b.BSSTATUS='销售申请修改' or b.BSSTATUS='销售申请删除') ";
|
|
|
|
|
|
var MblNo = form.findField('MblNo').getValue();
|
|
|
sql = sql + getAndConSql(sql, MblNo, "b.BsNo like '%" + MblNo + "%' ");
|
|
|
|
|
|
|
|
|
var CUSTOMERNAME = form.findField('CUSTOMERNAME').getValue();
|
|
|
sql = sql + getAndConSql(sql, CUSTOMERNAME, "b.CUSTOMERNAME='" + CUSTOMERNAME + "'");
|
|
|
|
|
|
var expDateBgn = form.findField('ETDbgn').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, expDateBgn, "b.INPUTTIME >='" + expDateBgn + "'");
|
|
|
|
|
|
var expDateEnd = form.findField('ETDend').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, expDateEnd, "b.INPUTTIME <='" + expDateEnd + " 23:59:59'");
|
|
|
|
|
|
return sql;
|
|
|
},
|
|
|
OprationSwap: function () {
|
|
|
var ret = new Array();
|
|
|
ret[0] = this.OprationStatus;
|
|
|
ret[1] = this.storeList;
|
|
|
ret[2] = this.SelectedRecord;
|
|
|
|
|
|
return ret;
|
|
|
},
|
|
|
|
|
|
|
|
|
Print: function () {
|
|
|
|
|
|
_this = this;
|
|
|
if (this.storeList.getCount() == 0) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var bsno = '11111';
|
|
|
var selections = this.gridList.getSelectionModel().getSelection();
|
|
|
if (selections.length != 0) {
|
|
|
var record = selections[0];
|
|
|
bsno = record.data.GID;
|
|
|
}
|
|
|
|
|
|
|
|
|
var sortstr = '';
|
|
|
|
|
|
if (this.sortfield != '' && this.sortdire != '') {
|
|
|
|
|
|
sortstr = this.sortfield + ' ' + this.sortdire;
|
|
|
}
|
|
|
|
|
|
Ext.Msg.wait('正在组织数据, 请稍侯..');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在组织数据...',
|
|
|
url: '/MvcContainer/MsOpCtnApply/GetDataListStr',
|
|
|
scope: this,
|
|
|
params: {
|
|
|
condition: _this.sqlcontext,
|
|
|
printstr: 'true',
|
|
|
pricetype: PRICETYPE,
|
|
|
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 = 'MSOPCTNAPPLY';
|
|
|
var sql1 = returnstr;
|
|
|
var sql2 = "select * from op_ctnapply where GID='" + bsno + "'";
|
|
|
var sql3 = "";
|
|
|
var sql4 = "";
|
|
|
var sql5 = "";
|
|
|
var sql6 = "";
|
|
|
|
|
|
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
|
|
|
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: '请重试',
|
|
|
msg: '服务器响应出错',
|
|
|
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
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: '提示', msg: '请先选择要打印的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var sortstr = 'BSNO';
|
|
|
|
|
|
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('GID') + "'";
|
|
|
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.GID;
|
|
|
}
|
|
|
|
|
|
var printType = 'MSOPCTNAPPLYCOSTINDEX';
|
|
|
var sql1 = " select bs.GID,bs.BSNO 业务编号,bs.BSDATE 业务日期 ,bs.SALE 揽货人 ,bs.OP 操作员,bs.CUSTOMERNAME 委托单位,bs.GOODSNAME 品名,bs.GOODTYPE 货物类别,bs.PORTLOAD 装货港 ";
|
|
|
var sql1 = sql1 + ",bs.PORTDISCHARGE 目的港,bs.ISOWNERBOOKING 是否我司订舱,bs.CTNALL 箱型, bs.CTNNUM 箱量,bs.PLANCTNDATE 计划用箱日期";
|
|
|
var sql1 = sql1 + ",bs.FACTORYNAME 工厂名称,bs.FACTORYADDR 工厂地址,bs.BSSTATUS 申请状态";
|
|
|
var sql1 = sql1 + ",bs.LOAD_FREE_USECTNE_DAY 起运港免箱使天数 ,bs.LOAD_OVER_USECTNE_RATE 起运港超期箱使费,bs.DEST_FREE_USECTNE_DAY 目的港免箱使天数,bs.DEST_OVER_USECTNE_RATE 目的港超期箱使费";
|
|
|
var sql1 = sql1 + ",bs.INPUTTIME 录入日期,bs.REMARKS 备注";
|
|
|
var sql1 = sql1 + ",bs.ISGOODSNAMESAME 货物是否与MSDS一致,bs.PRODUCTGOODSNAME 工厂其他产品";
|
|
|
var sql1 = sql1 + ",msds.PH,msds.DENSITY 密度,msds.UNNO,msds.MELTINGPOINTB 熔点低,msds.MELTINGPOINTE 熔点高,msds.BOILINGPOINTB 沸点低,msds.BOILINGPOINTE 沸点高,msds.FLASHPOINTB 闪点低,msds.FLASHPOINTE 闪点高,msds.ISPOLLUTEOCEAN 是否海洋污染物";
|
|
|
var sql1 = sql1 + ",bs.AUDITSTATUS 适货审核状态 ,bs.AUDITTIME 适货审核时间";
|
|
|
var sql1 = sql1 + ",bs.AGENTINPUTBY 代理维护人 ,bs.CYCLEDAYS 周期,bs.CHANGERATE 超期箱使费佣金比例";
|
|
|
var sql1 = sql1 + ",bs.FULL_CTN_FREE_STORAGE_DAY 重箱免堆天数, FULL_CTN_OVER_STORAGE_RATE 重箱超期堆存费";
|
|
|
var sql1 = sql1 + ",bs.CLEAR_CTN_FREE_STORAGE_DAY 清洗免堆天数, CLEAR_CTN_OVER_STORAGE_RATE 清洗超期堆存费";
|
|
|
var sql1 = sql1 + ",bs.NO_CLEAR_CTN_FREE_STORAGE_DAY 不清洗免堆天数, NO_CLEAR_CTN_OVER_STORAGE_RATE 不清洗超期堆存费";
|
|
|
var sql1 = sql1 + ",bs.COSTAUDITSTATUS 成本审核状态,bs.COSTAUDITTIME 成本审核时间";
|
|
|
var sql1 = sql1 + ",bs.CTN_INCOME 内部租金收入 ,bs.LOAD_FREE_USECTNE_DAY 起运港免箱使天数,bs.LOAD_OVER_USECTNE_RATE 起运港超期箱使费";
|
|
|
var sql1 = sql1 + ",(select ShowName from [user] where GID=bs.INPUTBY) as 录入人";
|
|
|
var sql1 = sql1 + ",(select ShowName from [user] where GID=bs.AUDITBY) as 适货审核人";
|
|
|
var sql1 = sql1 + ",(select ShowName from [user] where GID=bs.COSTAUDITBY) as 成本审核人";
|
|
|
var sql1 = sql1 + " from op_ctnapply bs ";
|
|
|
var sql1 = sql1 + " Left join code_msds msds on bs.GOODSNAME=msds.CHEMICALCGOODSNAME ";
|
|
|
var sql1 = sql1 + " WHERE bs.GID IN (" + feeGidSql + ") order by " + sortstr;
|
|
|
var sql2 = "select * from op_ctnapply where GID='" + bsno + "'";
|
|
|
var sql3 = "";
|
|
|
var sql4 = "";
|
|
|
var sql5 = "";
|
|
|
var sql6 = "";
|
|
|
|
|
|
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
|
|
|
}
|
|
|
,
|
|
|
onOpenClick: function (button, event) {
|
|
|
var selections = this.gridList.getSelectionModel().getSelection();
|
|
|
if (selections.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '请先选择单据!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
record = selections[0];
|
|
|
|
|
|
this.OpenEditWin(record);
|
|
|
}
|
|
|
, OpenEditWin: function (record) {
|
|
|
this.SelectedRecord = record;
|
|
|
this.OprationStatus = 'edit';
|
|
|
|
|
|
var openSet = "height=650, width=1024, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 500) / 2 + ",Left= " + (screen.width - 600) / 2;
|
|
|
var openType = record.data.GID;
|
|
|
var openUrl = "/MvcContainer/MsOpCtnApply/GoodsAuditEdit";
|
|
|
if (PRICETYPE == "2")
|
|
|
openUrl = "/MvcContainer/MsOpCtnApply/GoodsAuditEdit";
|
|
|
window.open(openUrl, openType, openSet);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|