|
|
Ext.namespace('Shipping');
|
|
|
|
|
|
Shipping.MsOpTruckBulkPcIndex = function (config) {
|
|
|
Ext.applyIf(this, config);
|
|
|
this.initUIComponents();
|
|
|
window.Shipping.MsOpTruckBulkPcIndex.superclass.constructor.call(this);
|
|
|
};
|
|
|
|
|
|
Ext.extend(Shipping.MsOpTruckBulkPcIndex, Ext.Panel, {
|
|
|
PageSize: 30,
|
|
|
PageSize2: 30,
|
|
|
OprationStatus: null, //仅当弹出界面时使用
|
|
|
SelectedRecord: null,
|
|
|
sqlcontext: '',
|
|
|
selectbsno: '',
|
|
|
sortfield: '',
|
|
|
sortdire: '',
|
|
|
sortfield2: '',
|
|
|
sortdire2: '',
|
|
|
|
|
|
initUIComponents: function () {
|
|
|
this.formname = "MsOpTruckBulkPcIndex"; //页面名称
|
|
|
//定义数据集
|
|
|
this.worksql = getUrlParam('worksql');
|
|
|
this.worktype = getUrlParam('worktype');
|
|
|
this.selectbodydatas = [];
|
|
|
this.sqlcontext2 = "";
|
|
|
this.storePLList = Ext.create('Ext.data.Store', {
|
|
|
model: 'MsOpTruckBulkPc'
|
|
|
});
|
|
|
|
|
|
this.storeList = Ext.create('Ext.data.Store', {
|
|
|
pageSize: this.PageSize,
|
|
|
model: 'MsOpTruckBulkPc',
|
|
|
remoteSort: true,
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
url: '/TruckMng/MsOpTruckBulkPc/GetDataList',
|
|
|
reader: {
|
|
|
id: 'BSNO',
|
|
|
root: 'data',
|
|
|
totalProperty: 'totalCount'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
Ext.grid.RowNumberer = Ext.extend(Ext.grid.RowNumberer, {
|
|
|
width: 50
|
|
|
});
|
|
|
|
|
|
_this = this;
|
|
|
|
|
|
this.Pagenum = Ext.create('Ext.form.field.Number', {
|
|
|
name: 'bottles',
|
|
|
fieldLabel: '每页记录数',
|
|
|
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: '业务编号',
|
|
|
hidden: true,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CORPID',
|
|
|
header: 'CORPID',
|
|
|
hidden: true,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'TRANSSTATUS',
|
|
|
header: '派车单状态',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'BSSTATUSREF',
|
|
|
header: '业务锁定',
|
|
|
align: 'center',
|
|
|
width: 60,
|
|
|
renderer: function (value, cellmeta) {
|
|
|
if (value == '锁定') {
|
|
|
return "<img src='../../../../TruckMng/Content/Images/Lock.png' />";
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'FEESTATUSREF',
|
|
|
header: '费用锁定',
|
|
|
align: 'center',
|
|
|
width: 60,
|
|
|
renderer: function (value, cellmeta) {
|
|
|
if (value == '锁定') {
|
|
|
return "<img src='../../../../TruckMng/Content/Images/Lock.png' />";
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'DRFEESTATUS',
|
|
|
header: '应收费用',
|
|
|
align: 'center',
|
|
|
width: 60,
|
|
|
renderer: function (value, meta) {
|
|
|
|
|
|
if (value == '审核通过') {
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
} else if (value == '录入状态') {
|
|
|
|
|
|
} else if (value == '提交审核') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
} else if (value == '部分结算') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
} else if (value == '结算完毕') {
|
|
|
meta.tdCls = 'feestatus_settle';
|
|
|
} else if (value == '未录入') {
|
|
|
} else if (value == '部分结算') {
|
|
|
meta.tdCls = 'feestatus_settle';
|
|
|
} else if (value == '部分审核') {
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
} else if (value == '部分提交') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
}
|
|
|
return value;
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CRFEESTATUS',
|
|
|
header: '应付费用',
|
|
|
align: 'center',
|
|
|
width: 60,
|
|
|
renderer: function (value, meta) {
|
|
|
|
|
|
if (value == '审核通过') {
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
} else if (value == '录入状态') {
|
|
|
|
|
|
} else if (value == '提交审核') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
} else if (value == '部分结算') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
} else if (value == '结算完毕') {
|
|
|
meta.tdCls = 'feestatus_settle';
|
|
|
} else if (value == '未录入') {
|
|
|
} else if (value == '部分结算') {
|
|
|
meta.tdCls = 'feestatus_settle';
|
|
|
} else if (value == '部分审核') {
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
} else if (value == '部分提交') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
}
|
|
|
return value;
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'DRINVSTATUS',
|
|
|
header: '应收开票',
|
|
|
align: 'center',
|
|
|
width: 60,
|
|
|
renderer: function (value, meta) {
|
|
|
|
|
|
if (value == '已开票') {
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
} else if (value == '部分开票') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
}
|
|
|
return value;
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'BillFeeStatus',
|
|
|
header: '整票状态', //'整票状态',
|
|
|
width: 60,
|
|
|
renderer: function (value, meta) {
|
|
|
if (value == '0') {
|
|
|
return "未提交";
|
|
|
} else if (value == '1') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
return "整票提交";
|
|
|
} else if (value == '2') {
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
return "审核通过";
|
|
|
} else {
|
|
|
return "";
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTOMERNAMEREF',
|
|
|
header: '委托单位',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTNO',
|
|
|
header: '派车单号',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'TRUCKERREF',
|
|
|
header: '承运商',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ORDERNO',
|
|
|
header: '客户订单号',
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'DRIVER',
|
|
|
header: '司机',
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'DRIVERTEL',
|
|
|
header: '司机电话',
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'TRUCKNO',
|
|
|
header: '车号',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'FREIGHT',
|
|
|
header: '应付税前运费',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'TAXRATE',
|
|
|
header: '税率',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'TTLFREIGHT',
|
|
|
header: '应付税后运费',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'BSDATE',
|
|
|
header: '接单日期',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ACCDATE',
|
|
|
header: '会计期间',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ETD',
|
|
|
header: '实际装货日期',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ETA',
|
|
|
header: '实际到货日期',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'OP',
|
|
|
header: '操作',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'DDOP',
|
|
|
header: '操作',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTATTN',
|
|
|
header: '客户联系人',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTTEL',
|
|
|
header: '客户联系人电话',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CONSIGNEENAME',
|
|
|
header: '收货方',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CONSIGNEEATTN',
|
|
|
header: '收货联系人',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CONSIGNEETEL',
|
|
|
header: '收货联系人电话',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CONSIGNEEADDR',
|
|
|
header: '收货地址',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PORTLOAD',
|
|
|
header: '起运地',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PORTDISCHARGE',
|
|
|
header: '目的地',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'GOODSNAME',
|
|
|
header: '品名',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'KGS',
|
|
|
header: '毛重',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CBM',
|
|
|
header: '尺码',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PKGS',
|
|
|
header: '数量',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'NETWEIGHT',
|
|
|
header: '净重',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'VOUNO',
|
|
|
header: '凭证号',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CREATEUSER',
|
|
|
header: '创建人',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CREATETIME',
|
|
|
header: '创建日期',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'MODIFIEDUSER',
|
|
|
header: '修改人',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'MODIFIEDTIME',
|
|
|
header: '修改日期',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'REMARK',
|
|
|
header: '备注',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISPRINTPR',
|
|
|
header: '打印核算单',
|
|
|
width: 100,
|
|
|
renderer: function (value, meta, record) {
|
|
|
if (value == '1')
|
|
|
return '√';
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISAUTOFEE',
|
|
|
header: '自定义费用',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'TTLOTDR',
|
|
|
header: '应付杂费',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'TTLDR',
|
|
|
header: '应付合计',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ARRIVEDATE',
|
|
|
header: '实际到货时间',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ARRIVEREMARK',
|
|
|
header: '异常信息',
|
|
|
width: 80
|
|
|
}];
|
|
|
|
|
|
this.girdcolums = this.initgirdcolums;
|
|
|
|
|
|
//定义Grid
|
|
|
this.GridCheckBoxModel = Ext.create('Ext.selection.CheckboxModel');
|
|
|
|
|
|
_this = this;
|
|
|
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, //允许复制数据
|
|
|
autoFill: true
|
|
|
},
|
|
|
// paging bar on the bottom
|
|
|
bbar: [Ext.create('Ext.PagingToolbar', {
|
|
|
store: this.storeList,
|
|
|
displayInfo: true,
|
|
|
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
|
|
|
emptyMsg: "没有数据"
|
|
|
}), this.Pagenum]
|
|
|
});
|
|
|
|
|
|
/////////////以下部分为获取存储的gridpanel显示样式
|
|
|
this.girdcolums = DsTruck.GetGridPanel(USERID, this.formname, this.girdcolums, 1); //使用者id,表名,中间column数组,跳过一开始的几列
|
|
|
this.girdcolums.unshift(new Ext.grid.RowNumberer());
|
|
|
this.gridList.reconfigure(this.storeList, this.girdcolums);
|
|
|
// this.gridList.columns[1] = new Ext.grid.RowNumberer();
|
|
|
////////////////////////////
|
|
|
|
|
|
this.gridList.addListener('itemdblclick', function (dataview, record, item, index, e, b) {
|
|
|
this.SelectedRecord = record;
|
|
|
this.OprationStatus = 'edit';
|
|
|
DsOpenEditWin('/TruckMng/MsOpTruckBulkPc/Edit');
|
|
|
}, this);
|
|
|
|
|
|
this.gridList.addListener('sortchange', function (ct, column, direction, eOpts) {
|
|
|
this.sortfield = column.dataIndex;
|
|
|
this.sortdire = direction;
|
|
|
}, this);
|
|
|
|
|
|
//#region formSearch 查询条件
|
|
|
|
|
|
_this = this;
|
|
|
this.StoreOpRange = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'MsOP',
|
|
|
proxy: { url: '/MvcShipping/MsBaseInfo/GetOpRang' }
|
|
|
});
|
|
|
this.StoreOpRange.load({ params: { optype: "modOpTruckBulkPcList"} });
|
|
|
//
|
|
|
|
|
|
//状态_业务状态
|
|
|
Ext.define('BSSTATUSModel', {
|
|
|
extend: 'Ext.data.Model',
|
|
|
fields: [
|
|
|
{ name: 'Name', type: 'string' }
|
|
|
]
|
|
|
});
|
|
|
var dataBSSTATUS = [{ "Name": "未锁定" }, { "Name": "锁定" }, { "Name": ""}];
|
|
|
var storeBSSTATUS = Ext.create('Ext.data.Store', {
|
|
|
model: 'BSSTATUSModel',
|
|
|
data: dataBSSTATUS
|
|
|
});
|
|
|
//业务状态
|
|
|
this.comboxBSSTATUS = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '业务锁定',
|
|
|
forceSelection: true,
|
|
|
store: storeBSSTATUS,
|
|
|
name: 'BSSTATUS',
|
|
|
valueField: 'Name',
|
|
|
displayField: 'Name'
|
|
|
});
|
|
|
//费用状态
|
|
|
this.comboxFEESTATUS = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '费用锁定',
|
|
|
forceSelection: true,
|
|
|
store: storeBSSTATUS,
|
|
|
name: 'FEESTATUS',
|
|
|
valueField: 'Name',
|
|
|
displayField: 'Name'
|
|
|
});
|
|
|
|
|
|
//人员信息加载
|
|
|
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: '操 作',
|
|
|
store: this.storeOpCode,
|
|
|
forceSelection: true,
|
|
|
name: '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();
|
|
|
//委托单位
|
|
|
this.comboxCustCode = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '委托单位',
|
|
|
store: this.storeCustCode,
|
|
|
queryMode: 'remote',
|
|
|
minChars: 0,
|
|
|
queryParam: 'CODENAME',
|
|
|
forceSelection: true,
|
|
|
name: 'CUSTOMERNAME',
|
|
|
valueField: 'CustName',
|
|
|
displayField: 'CodeAndName',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
//specialkey: function (field, e) {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.storeTransStatus = Ext.create('Ext.data.Store', {
|
|
|
fields: ['DC', 'NAME']
|
|
|
});
|
|
|
this.storeTransStatus.add({ "DC": "新建", "NAME": "新建" });
|
|
|
this.storeTransStatus.add({ "DC": "提交审核", "NAME": "提交审核" });
|
|
|
this.storeTransStatus.add({ "DC": "审核通过", "NAME": "审核通过" });
|
|
|
this.storeTransStatus.add({ "DC": "驳回提交", "NAME": "驳回提交" });
|
|
|
this.storeTransStatus.add({ "DC": "在途", "NAME": "在途" });
|
|
|
this.storeTransStatus.add({ "DC": "已到货", "NAME": "已到货" });
|
|
|
this.storeTransStatus.add({ "DC": "已回单", "NAME": "已回单" });
|
|
|
|
|
|
this.comboxTransStatus = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '派车单状态', //'费用类型',
|
|
|
store: this.storeTransStatus,
|
|
|
valueField: 'DC',
|
|
|
displayField: 'NAME',
|
|
|
forceSelection: true,
|
|
|
name: 'TRANSSTATUS'
|
|
|
});
|
|
|
|
|
|
//客户加载_车队
|
|
|
this.storeTRUCKER = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CustomRefModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListTRUCK' }
|
|
|
});
|
|
|
|
|
|
//车队
|
|
|
this.comboxTRUCKER = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '承运商', //'车队',
|
|
|
store: this.storeTRUCKER,
|
|
|
forceSelection: true,
|
|
|
queryMode: 'remote',
|
|
|
minChars: 0,
|
|
|
queryParam: 'CODENAME',
|
|
|
name: 'TRUCKER',
|
|
|
valueField: 'CustName',
|
|
|
displayField: 'CodeAndName'
|
|
|
});
|
|
|
|
|
|
//品名
|
|
|
this.storeCodeGoodsList = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CodeGoodsModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCodeGoodsListRm' }
|
|
|
});
|
|
|
this.storeCodeGoodsList.load();
|
|
|
this.comboxGOODSNAME = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '品名',
|
|
|
store: this.storeCodeGoodsList,
|
|
|
queryMode: 'remote',
|
|
|
minChars: 0,
|
|
|
queryParam: 'CODENAME',
|
|
|
name: 'GOODSNAME',
|
|
|
valueField: 'GOODNAME',
|
|
|
displayField: 'CodeAndName',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
this.storeListTruckLoadPort = Ext.create('Ext.data.Store', {
|
|
|
fields: [
|
|
|
{ name: 'PORTID', type: 'string' },
|
|
|
{ name: 'PORTCODE', type: 'string' },
|
|
|
{ name: 'PORT', type: 'string' },
|
|
|
{ name: 'CODEANDNAME', type: 'string' },
|
|
|
{ name: 'PROVINCE', type: 'string' }
|
|
|
|
|
|
],
|
|
|
pageSize: 5000,
|
|
|
remoteSort: true,
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
url: '/TruckMng/MsCodeTruckPort/GetDataListRm',
|
|
|
reader: {
|
|
|
id: '',
|
|
|
root: 'data',
|
|
|
totalProperty: 'totalCount'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
this.storeListTruckLoadPort.load();
|
|
|
this.comboxLoadPort = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '起运地', //'费用类型',
|
|
|
store: this.storeListTruckLoadPort,
|
|
|
valueField: 'PORT',
|
|
|
displayField: 'CODEANDNAME',
|
|
|
queryMode: 'remote',
|
|
|
minChars: 0,
|
|
|
queryParam: 'CODENAME',
|
|
|
labelWidth: 60,
|
|
|
forceSelection: true,
|
|
|
name: 'PORTLOAD',
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefresh2Click();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.storeListTruckDistPort = Ext.create('Ext.data.Store', {
|
|
|
fields: [
|
|
|
{ name: 'PORTID', type: 'string' },
|
|
|
{ name: 'PORTCODE', type: 'string' },
|
|
|
{ name: 'PORT', type: 'string' },
|
|
|
{ name: 'CODEANDNAME', type: 'string' },
|
|
|
{ name: 'PROVINCE', type: 'string' }
|
|
|
|
|
|
],
|
|
|
pageSize: 5000,
|
|
|
remoteSort: true,
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
url: '/TruckMng/MsCodeTruckPort/GetDataListRm',
|
|
|
reader: {
|
|
|
id: '',
|
|
|
root: 'data',
|
|
|
totalProperty: 'totalCount'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.storeListTruckDistPort.load();
|
|
|
|
|
|
this.comboxDistPort = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '目的地', //'费用类型',
|
|
|
store: this.storeListTruckDistPort,
|
|
|
valueField: 'PORT',
|
|
|
displayField: 'CODEANDNAME',
|
|
|
queryMode: 'remote',
|
|
|
labelWidth: 60,
|
|
|
minChars: 0,
|
|
|
queryParam: 'CODENAME',
|
|
|
forceSelection: true,
|
|
|
name: 'PORTDISCHARGE',
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefresh2Click();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
//人员信息加载
|
|
|
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: '操 作',
|
|
|
store: this.storeOpCode,
|
|
|
forceSelection: true,
|
|
|
name: 'OP',
|
|
|
valueField: 'UserName',
|
|
|
displayField: 'CodeAndName'
|
|
|
});
|
|
|
|
|
|
|
|
|
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: [{
|
|
|
xtype: 'container',
|
|
|
defaultType: 'textfield',
|
|
|
layout: 'anchor',
|
|
|
defaults: {
|
|
|
anchor: '100%'
|
|
|
},
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [this.comboxCustCode, {
|
|
|
fieldLabel: '客户订单号',
|
|
|
name: 'ORDERNO',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, this.comboxTRUCKER, {
|
|
|
fieldLabel: '车号',
|
|
|
//labelWidth: 30,
|
|
|
//flex: 0.8,
|
|
|
name: 'TRUCKNO',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, this.comboxLoadPort, this.comboxDistPort, {
|
|
|
fieldLabel: '派车单号',
|
|
|
name: 'CUSTNO',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
},{
|
|
|
xtype: 'button',
|
|
|
width: 100,
|
|
|
text: "执行查询",
|
|
|
iconCls: "btnrefresh",
|
|
|
handler: function (button, event) {
|
|
|
this.onRefreshClick(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}]
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [this.comboxTransStatus,{
|
|
|
fieldLabel: '实际装货日期',
|
|
|
labelWidth: 90,
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'ETDBgn',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: '-',
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
labelSeparator: '',
|
|
|
//labelWidth: 30,
|
|
|
//flex: 0.8,
|
|
|
|
|
|
// labelWidth: 15,
|
|
|
name: 'ETDEnd',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: '接单日期',
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'BSDATEBgn',
|
|
|
//labelWidth: 78,
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: '-',
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'BSDATEEnd',
|
|
|
labelSeparator: '',
|
|
|
//labelWidth: 15,
|
|
|
//flex: 0.8,
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, this.comboxOP, { xtype: 'hiddenfield' },{
|
|
|
text: "重置",
|
|
|
width: 50,
|
|
|
xtype: 'button',
|
|
|
iconCls: "btnreset",
|
|
|
handler: function (button, event) {
|
|
|
this.onClearSql(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
width: 50,
|
|
|
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
|
|
|
}]
|
|
|
}]
|
|
|
}]
|
|
|
});
|
|
|
//#endregion formSearch
|
|
|
|
|
|
//查询工具条
|
|
|
this.panelBtn = new Ext.Panel({
|
|
|
region: "north",
|
|
|
tbar: [{
|
|
|
text: "新建",
|
|
|
iconCls: "btnadd",
|
|
|
handler: function (button, event) {
|
|
|
this.OprationStatus = 'add';
|
|
|
DsOpenEditWin('/TruckMng/MsOpTruckBulkPc/Edit');
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
text: "删除",
|
|
|
iconCls: "btndelete",
|
|
|
handler: function (button, event) {
|
|
|
this.onDeleteClick(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
id: 'btnSubmitAudit',
|
|
|
text: '提交审核',
|
|
|
tooltip: '提交审核',
|
|
|
handler: function (button, event) {
|
|
|
this.onSubmitAuditClick();
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
id: 'btnSubmitAuditBack',
|
|
|
text: '撤销提交',
|
|
|
tooltip: '撤销提交',
|
|
|
handler: function (button, event) {
|
|
|
this.onSubmitAuditBackClick();
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: "保存列表样式",
|
|
|
id: "btntest",
|
|
|
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.gridList.reconfigure(_this.storeList, _this.initgirdcolums);
|
|
|
_this.girdcolums = DsTruck.SaveGridPanel(USERID, _this.formname, _this.gridList.columns, _this.initgirdcolums, 1, true);
|
|
|
}
|
|
|
}],
|
|
|
scope: this
|
|
|
}, '-',
|
|
|
{
|
|
|
text: "打印",
|
|
|
iconCls: 'btnprint',
|
|
|
menu: [
|
|
|
{ text: "全部",
|
|
|
handler: function (menu, event) {
|
|
|
_this.Print();
|
|
|
}
|
|
|
}, { text: "选择打印",
|
|
|
handler: function (menu, event) {
|
|
|
_this.PrintSelect();
|
|
|
}
|
|
|
}],
|
|
|
|
|
|
scope: this
|
|
|
}, {
|
|
|
text: "导出Excel",
|
|
|
id: "btnExportExcel",
|
|
|
iconCls: 'btnexportexcel',
|
|
|
handler: function (button, event) {
|
|
|
this.onExportClick(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: "状态更新",
|
|
|
menu: [
|
|
|
{
|
|
|
text: "配载完成",
|
|
|
handler: function (menu, event) {
|
|
|
_this.onUpTransStatusClick('在途');
|
|
|
}
|
|
|
}, {
|
|
|
text: "已到货",
|
|
|
handler: function (menu, event) {
|
|
|
_this.onUpTransStatusClick('已到货');
|
|
|
}
|
|
|
}, {
|
|
|
text: "已回单",
|
|
|
handler: function (menu, event) {
|
|
|
_this.onUpTransStatusClick('已回单');
|
|
|
}
|
|
|
}, {
|
|
|
text: "审核通过",
|
|
|
handler: function (menu, event) {
|
|
|
_this.onUpTransStatusClick('审核通过');
|
|
|
}
|
|
|
}],
|
|
|
scope: this
|
|
|
}]
|
|
|
});
|
|
|
|
|
|
//#region 合计列表
|
|
|
|
|
|
this.SumField = [
|
|
|
{ name: 'NOBILL', type: 'number' }
|
|
|
];
|
|
|
|
|
|
this.storeSumList = Ext.create('Ext.data.Store', {
|
|
|
pageSize: this.PageSize,
|
|
|
fields: this.SumField,
|
|
|
remoteSort: true,
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
url: '/TruckMng/MsOpTruckBulk/GetDataListSum',
|
|
|
reader: {
|
|
|
id: '',
|
|
|
root: 'data',
|
|
|
totalProperty: 'totalCount'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.girdcolumsSum = [{
|
|
|
sortable: true,
|
|
|
dataIndex: 'NOBILL',
|
|
|
header: '票数',
|
|
|
align: 'right',
|
|
|
width: 80
|
|
|
}
|
|
|
|
|
|
];
|
|
|
|
|
|
this.gridListSum = new Ext.grid.GridPanel({
|
|
|
store: this.storeSumList,
|
|
|
enableHdMenu: false,
|
|
|
region: 'center',
|
|
|
loadMask: { msg: "数据加载中,请稍等..." },
|
|
|
trackMouseOver: true,
|
|
|
disableSelection: false,
|
|
|
columns: this.girdcolumsSum
|
|
|
});
|
|
|
|
|
|
this.panelSum = new Ext.Panel({
|
|
|
// title: '合 计',
|
|
|
layout: "border",
|
|
|
height: 70,
|
|
|
region: 'south',
|
|
|
margin: '0 0',
|
|
|
frame: true,
|
|
|
items: [this.gridListSum]
|
|
|
});
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
this.panelTop = new Ext.Panel({
|
|
|
layout: "border",
|
|
|
region: "north",
|
|
|
height: 100,
|
|
|
items: [this.formSearch, this.panelBtn]
|
|
|
});
|
|
|
|
|
|
|
|
|
this.panelTruckBulkPc = new Ext.Panel({
|
|
|
title: '派车单列表',
|
|
|
id: 'pnlmodOpTruckBulkPcList', //pnlmodOpOtherOpwt
|
|
|
layout: "border",
|
|
|
region: 'center',
|
|
|
animate: true,
|
|
|
autoScroll: true,
|
|
|
frame: false,
|
|
|
items: [this.panelTop, this.gridList]
|
|
|
});
|
|
|
|
|
|
//#region 待派车列表
|
|
|
this.storeList2 = Ext.create('Ext.data.Store', {
|
|
|
pageSize: this.PageSize2,
|
|
|
model: 'MsOpTruckBulk',
|
|
|
remoteSort: true,
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
url: '/TruckMng/MsOpTruckBulk/GetDataList',
|
|
|
reader: {
|
|
|
id: 'BSNO',
|
|
|
root: 'data',
|
|
|
totalProperty: 'totalCount'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.Pagenum2 = Ext.create('Ext.form.field.Number', {
|
|
|
name: 'bottles',
|
|
|
fieldLabel: '每页记录数',
|
|
|
labelAlign: 'right',
|
|
|
value: this.PageSize2,
|
|
|
maxValue: 100000,
|
|
|
width: 180,
|
|
|
minValue: 0,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshOrderClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
this.initgirdcolums2 = [{
|
|
|
sortable: true,
|
|
|
dataIndex: 'BSNO',
|
|
|
header: '业务编号',
|
|
|
hidden: true,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CORPID',
|
|
|
header: 'CORPID',
|
|
|
hidden: true,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'TRANSSTATUS',
|
|
|
header: '订单状态',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'BSSTATUSREF',
|
|
|
header: '业务锁定',
|
|
|
align: 'center',
|
|
|
width: 60,
|
|
|
renderer: function (value, cellmeta) {
|
|
|
if (value == '锁定') {
|
|
|
return "<img src='../../../../TruckMng/Content/Images/Lock.png' />";
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'FEESTATUSREF',
|
|
|
header: '费用锁定',
|
|
|
align: 'center',
|
|
|
width: 60,
|
|
|
renderer: function (value, cellmeta) {
|
|
|
if (value == '锁定') {
|
|
|
return "<img src='../../../../TruckMng/Content/Images/Lock.png' />";
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'DRFEESTATUS',
|
|
|
header: '应收费用',
|
|
|
align: 'center',
|
|
|
width: 60,
|
|
|
renderer: function (value, meta) {
|
|
|
|
|
|
if (value == '审核通过') {
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
} else if (value == '录入状态') {
|
|
|
|
|
|
} else if (value == '提交审核') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
} else if (value == '部分结算') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
} else if (value == '结算完毕') {
|
|
|
meta.tdCls = 'feestatus_settle';
|
|
|
} else if (value == '未录入') {
|
|
|
} else if (value == '部分结算') {
|
|
|
meta.tdCls = 'feestatus_settle';
|
|
|
} else if (value == '部分审核') {
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
} else if (value == '部分提交') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
}
|
|
|
return value;
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CRFEESTATUS',
|
|
|
header: '应付费用',
|
|
|
align: 'center',
|
|
|
width: 60,
|
|
|
renderer: function (value, meta) {
|
|
|
|
|
|
if (value == '审核通过') {
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
} else if (value == '录入状态') {
|
|
|
|
|
|
} else if (value == '提交审核') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
} else if (value == '部分结算') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
} else if (value == '结算完毕') {
|
|
|
meta.tdCls = 'feestatus_settle';
|
|
|
} else if (value == '未录入') {
|
|
|
} else if (value == '部分结算') {
|
|
|
meta.tdCls = 'feestatus_settle';
|
|
|
} else if (value == '部分审核') {
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
} else if (value == '部分提交') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
}
|
|
|
return value;
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'DRINVSTATUS',
|
|
|
header: '应收开票',
|
|
|
align: 'center',
|
|
|
width: 60,
|
|
|
renderer: function (value, meta) {
|
|
|
|
|
|
if (value == '已开票') {
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
} else if (value == '部分开票') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
}
|
|
|
return value;
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'BillFeeStatus',
|
|
|
header: '整票状态', //'整票状态',
|
|
|
width: 60,
|
|
|
renderer: function (value, meta) {
|
|
|
if (value == '0') {
|
|
|
return "未提交";
|
|
|
} else if (value == '1') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
return "整票提交";
|
|
|
} else if (value == '2') {
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
return "审核通过";
|
|
|
} else {
|
|
|
return "";
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTOMERNAMEREF',
|
|
|
header: '委托单位',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ORDERNO',
|
|
|
header: '客户订单号',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTNO',
|
|
|
header: '订单编号',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CONTRACTNO',
|
|
|
header: '合同号',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'BSDATE',
|
|
|
header: '接单日期',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ACCDATE',
|
|
|
header: '会计期间',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ETD',
|
|
|
header: '起运日期',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ETA',
|
|
|
header: '到达日期',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'OP',
|
|
|
header: '操作',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'SALE',
|
|
|
header: '客户经理',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTSERVICE',
|
|
|
header: '运营经理',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTATTN',
|
|
|
header: '客户联系人',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTTEL',
|
|
|
header: '客户联系人电话',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CONSIGNEENAME',
|
|
|
header: '收货方',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CONSIGNEEATTN',
|
|
|
header: '收货联系人',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CONSIGNEETEL',
|
|
|
header: '收货联系人电话',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CONSIGNEEADDR',
|
|
|
header: '收货地址',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PORTLOAD',
|
|
|
header: '起运地',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PORTDISCHARGE',
|
|
|
header: '目的地',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'GOODSNAME',
|
|
|
header: '品名',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'NOPCKGS',
|
|
|
header: '待派车毛重',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'NETWEIGHT',
|
|
|
header: '净重',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'NOPCCBM',
|
|
|
header: '待派车尺码',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'NOPCPKGS',
|
|
|
header: '待派车数量',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'KINDPKGS',
|
|
|
header: '包装',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'VOUNO',
|
|
|
header: '凭证号',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CREATEUSER',
|
|
|
header: '创建人',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CREATETIME',
|
|
|
header: '创建日期',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'MODIFIEDUSER',
|
|
|
header: '修改人',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'MODIFIEDTIME',
|
|
|
header: '修改日期',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'REMARK',
|
|
|
header: '备注',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISPRINTPR',
|
|
|
header: '打印核算单',
|
|
|
width: 100,
|
|
|
renderer: function (value, meta, record) {
|
|
|
if (value == '1')
|
|
|
return '√';
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
}];
|
|
|
|
|
|
this.girdcolums2 = this.initgirdcolums2;
|
|
|
|
|
|
//定义Grid
|
|
|
this.GridCheckBoxModel2 = Ext.create('Ext.selection.CheckboxModel');
|
|
|
|
|
|
_this = this;
|
|
|
this.gridList2 = new Ext.grid.GridPanel({
|
|
|
store: this.storeList2,
|
|
|
enableHdMenu: false,
|
|
|
region: 'center',
|
|
|
loadMask: { msg: "数据加载中,请稍等..." },
|
|
|
trackMouseOver: true,
|
|
|
disableSelection: false,
|
|
|
selModel: this.GridCheckBoxModel2,
|
|
|
columns: this.girdcolums2,
|
|
|
viewConfig: {
|
|
|
enableTextSelection: true, //允许复制数据
|
|
|
autoFill: true
|
|
|
},
|
|
|
// paging bar on the bottom
|
|
|
bbar: [Ext.create('Ext.PagingToolbar', {
|
|
|
store: this.storeList2,
|
|
|
displayInfo: true,
|
|
|
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
|
|
|
emptyMsg: "没有数据"
|
|
|
}), this.Pagenum2]
|
|
|
});
|
|
|
|
|
|
/////////////以下部分为获取存储的gridpanel显示样式
|
|
|
this.girdcolums2 = DsTruck.GetGridPanel(USERID, this.formname + "2", this.girdcolums2, 1); //使用者id,表名,中间column数组,跳过一开始的几列
|
|
|
this.girdcolums2.unshift(new Ext.grid.RowNumberer());
|
|
|
|
|
|
this.gridList2.reconfigure(this.storeList2, this.girdcolums2);
|
|
|
// this.gridList2.columns[1] = new Ext.grid.RowNumberer();
|
|
|
////////////////////////////
|
|
|
|
|
|
this.gridList2.addListener('itemdblclick', function (dataview, record, item, index, e, b) {
|
|
|
this.SelectedRecord = record;
|
|
|
this.OprationStatus = 'edit';
|
|
|
DsOpenEditWin('/TruckMng/MsOpTruckBulk/Edit');
|
|
|
}, this);
|
|
|
|
|
|
this.gridList2.addListener('sortchange', function (ct, column, direction, eOpts) {
|
|
|
this.sortfield2 = column.dataIndex;
|
|
|
this.sortdire2 = direction;
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
|
|
|
//客户加载_委托单位
|
|
|
this.storeCustCode2 = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CustomRefModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListController' }
|
|
|
});
|
|
|
this.storeCustCode2.load({ params: { condition: "ISCONTROLLER='1'" } });
|
|
|
//委托单位
|
|
|
this.comboxCustCode2 = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '委托单位',
|
|
|
store: this.storeCustCode2,
|
|
|
queryMode: 'remote',
|
|
|
minChars: 0,
|
|
|
queryParam: 'CODENAME',
|
|
|
forceSelection: true,
|
|
|
name: 'CUSTOMERNAME',
|
|
|
valueField: 'CustName',
|
|
|
displayField: 'CodeAndName',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
//specialkey: function (field, e) {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
this.storeTransStatus2 = Ext.create('Ext.data.Store', {
|
|
|
fields: ['DC', 'NAME']
|
|
|
});
|
|
|
this.storeTransStatus2.add({ "DC": "新建", "NAME": "新建" });
|
|
|
this.storeTransStatus2.add({ "DC": "提交审核", "NAME": "提交审核" });
|
|
|
this.storeTransStatus2.add({ "DC": "审核通过", "NAME": "审核通过" });
|
|
|
this.storeTransStatus2.add({ "DC": "驳回提交", "NAME": "驳回提交" });
|
|
|
this.storeTransStatus2.add({ "DC": "配载", "NAME": "配载" });
|
|
|
this.storeTransStatus2.add({ "DC": "完成", "NAME": "完成" });
|
|
|
|
|
|
this.comboxTransStatus2 = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '订单状态', //'费用类型',
|
|
|
store: this.storeTransStatus2,
|
|
|
valueField: 'DC',
|
|
|
displayField: 'NAME',
|
|
|
value: '审核通过',
|
|
|
readOnly:true,
|
|
|
forceSelection: true,
|
|
|
name: 'TRANSSTATUS'
|
|
|
});
|
|
|
|
|
|
this.storeListTruckLoadPort2 = Ext.create('Ext.data.Store', {
|
|
|
fields: [
|
|
|
{ name: 'PORTID', type: 'string' },
|
|
|
{ name: 'PORTCODE', type: 'string' },
|
|
|
{ name: 'PORT', type: 'string' },
|
|
|
{ name: 'CODEANDNAME', type: 'string' },
|
|
|
{ name: 'PROVINCE', type: 'string' }
|
|
|
|
|
|
],
|
|
|
pageSize: 5000,
|
|
|
remoteSort: true,
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
url: '/TruckMng/MsCodeTruckPort/GetDataListRm',
|
|
|
reader: {
|
|
|
id: '',
|
|
|
root: 'data',
|
|
|
totalProperty: 'totalCount'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
this.storeListTruckLoadPort2.load();
|
|
|
this.comboxLoadPort2 = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '起运地', //'费用类型',
|
|
|
store: this.storeListTruckLoadPort2,
|
|
|
valueField: 'PORT',
|
|
|
displayField: 'CODEANDNAME',
|
|
|
queryMode: 'remote',
|
|
|
minChars: 0,
|
|
|
queryParam: 'CODENAME',
|
|
|
forceSelection: true,
|
|
|
name: 'PORTLOAD',
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefresh2Click();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.storeListTruckDistPort2 = Ext.create('Ext.data.Store', {
|
|
|
fields: [
|
|
|
{ name: 'PORTID', type: 'string' },
|
|
|
{ name: 'PORTCODE', type: 'string' },
|
|
|
{ name: 'PORT', type: 'string' },
|
|
|
{ name: 'CODEANDNAME', type: 'string' },
|
|
|
{ name: 'PROVINCE', type: 'string' }
|
|
|
|
|
|
],
|
|
|
pageSize: 5000,
|
|
|
remoteSort: true,
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
url: '/TruckMng/MsCodeTruckPort/GetDataListRm',
|
|
|
reader: {
|
|
|
id: '',
|
|
|
root: 'data',
|
|
|
totalProperty: 'totalCount'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.storeListTruckDistPort2.load();
|
|
|
|
|
|
this.comboxDistPort2 = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '目的地', //'费用类型',
|
|
|
store: this.storeListTruckDistPort2,
|
|
|
valueField: 'PORT',
|
|
|
displayField: 'CODEANDNAME',
|
|
|
queryMode: 'remote',
|
|
|
minChars: 0,
|
|
|
queryParam: 'CODENAME',
|
|
|
forceSelection: true,
|
|
|
name: 'PORTDISCHARGE',
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefresh2Click();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
this.formSearch2 = Ext.widget('form', {
|
|
|
frame: true,
|
|
|
region: 'center',
|
|
|
bodyPadding: 5,
|
|
|
fieldDefaults: {
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 70,
|
|
|
msgTarget: 'qtip'
|
|
|
},
|
|
|
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
defaultType: 'textfield',
|
|
|
layout: 'anchor',
|
|
|
defaults: {
|
|
|
anchor: '100%'
|
|
|
},
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [this.comboxCustCode2, {
|
|
|
fieldLabel: '合同号',
|
|
|
name: 'CONTRACTNO',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefresh2Click();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: '客户订单号',
|
|
|
name: 'ORDERNO',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: '订单编号',
|
|
|
name: 'CUSTNO',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefresh2Click();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: '接单日期',
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'BSDATEBgn',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefresh2Click();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: '-',
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'BSDATEEnd',
|
|
|
labelSeparator:'-',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefresh2Click();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, this.comboxLoadPort2, {
|
|
|
xtype: 'button',
|
|
|
width: 100,
|
|
|
text: "执行查询",
|
|
|
iconCls: "btnrefresh",
|
|
|
handler: function (button, event) {
|
|
|
this.onRefresh2Click(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}]
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [this.comboxTransStatus2, {
|
|
|
fieldLabel: '起运日期',
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'ETDBgn',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefresh2Click();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: '-',
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'ETDEnd',
|
|
|
labelSeparator: '-',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefresh2Click();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: '到货日期',
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'ETABgn',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefresh2Click();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: '-',
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
labelSeparator: '-',
|
|
|
name: 'ETAEnd',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefresh2Click();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: '数量',
|
|
|
name: 'PKGS',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefresh2Click();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, this.comboxDistPort2, {
|
|
|
text: "重置",
|
|
|
width: 100,
|
|
|
xtype: 'button',
|
|
|
iconCls: "btnreset",
|
|
|
handler: function (button, event) {
|
|
|
this.onClearSql2(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}]
|
|
|
}]
|
|
|
}]
|
|
|
});
|
|
|
|
|
|
//查询工具条
|
|
|
this.panelBtn2 = new Ext.Panel({
|
|
|
region: "north",
|
|
|
tbar: [ {
|
|
|
text: '直接派车',
|
|
|
tooltip: '直接派车',
|
|
|
handler: function (button, event) {
|
|
|
this.onCreatePcAutoClick();
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: "保存列表样式",
|
|
|
id: "btntest2",
|
|
|
menu: [
|
|
|
{
|
|
|
text: "保存",
|
|
|
handler: function (button, event) {
|
|
|
this.girdcolums2 = DsTruck.SaveGridPanel(USERID, _this.formname+"2", _this.gridList2.columns, _this.girdcolums2, 1, true);
|
|
|
}
|
|
|
}, {
|
|
|
text: "初始化",
|
|
|
handler: function (menu, event) {
|
|
|
_this.gridList2.reconfigure(_this.storeList2, _this.initgirdcolums2);
|
|
|
_this.girdcolums2 = DsTruck.SaveGridPanel(USERID, _this.formname + "2", _this.gridList2.columns, _this.initgirdcolums2, 1, true);
|
|
|
}
|
|
|
}],
|
|
|
scope: this
|
|
|
}]
|
|
|
});
|
|
|
|
|
|
this.panelTop2 = new Ext.Panel({
|
|
|
layout: "border",
|
|
|
region: "north",
|
|
|
height: 100,
|
|
|
items: [this.formSearch2, this.panelBtn2]
|
|
|
});
|
|
|
|
|
|
|
|
|
this.panelTruckBulk = new Ext.Panel({
|
|
|
title: '待派车订单列表',
|
|
|
id: 'pnlmodOpTruckBulkList', //pnlmodOpOtherOpwt
|
|
|
layout: "border",
|
|
|
region: 'center',
|
|
|
animate: true,
|
|
|
autoScroll: true,
|
|
|
frame: false,
|
|
|
items: [this.panelTop2, this.gridList2]
|
|
|
});
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
this.tabTruckBulkPcPanel = new Ext.TabPanel({
|
|
|
activeTab: 0,
|
|
|
autoWidth: true,
|
|
|
border: true,
|
|
|
frame: false,
|
|
|
region: 'center',
|
|
|
id: "tabTruckBulkPcPanel",
|
|
|
enableTabScroll: true,
|
|
|
items:
|
|
|
[
|
|
|
this.panelTruckBulkPc,
|
|
|
this.panelTruckBulk
|
|
|
]
|
|
|
});
|
|
|
|
|
|
|
|
|
Ext.apply(this, {
|
|
|
items: [this.tabTruckBulkPcPanel]
|
|
|
});
|
|
|
|
|
|
if (this.worksql != undefined) {
|
|
|
this.worksql = this.worksql.replace(/@@/g, '=')
|
|
|
if (this.worktype == 'DINGDAN') {
|
|
|
this.sqlcontext2 = this.worksql;
|
|
|
this.onDsQuery2();
|
|
|
this.tabTruckBulkPcPanel.setActiveTab(1);
|
|
|
|
|
|
} else {
|
|
|
this.sqlcontext = this.worksql;
|
|
|
this.onDsQuery();
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.onRefreshClick();
|
|
|
this.onRefresh2Click();
|
|
|
}
|
|
|
|
|
|
this.storeList.on('beforeload', function (store) {
|
|
|
Ext.apply(store.proxy.extraParams, { condition: _this.sqlcontext });
|
|
|
}, this);
|
|
|
this.storeList2.on('beforeload', function (store) {
|
|
|
Ext.apply(store.proxy.extraParams, { condition: _this.sqlcontext2 });
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
this.formStatusChange = Ext.widget('form', {
|
|
|
frame: true,
|
|
|
region: 'center',
|
|
|
// title: "到货",
|
|
|
bodyPadding: 5,
|
|
|
fieldDefaults: {
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 90,
|
|
|
msgTarget: 'qtip'
|
|
|
},
|
|
|
|
|
|
items: [{
|
|
|
fieldLabel: 'TRANSSTATUS',
|
|
|
xtype: 'textfield',
|
|
|
name: 'TRANSSTATUS', hidden: true
|
|
|
}, {
|
|
|
fieldLabel: '日期',
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'STATUSDATE'
|
|
|
}, {
|
|
|
xtype: 'textareafield',
|
|
|
grow: true,
|
|
|
fieldLabel: '异常信息',
|
|
|
labelSeparator: '',
|
|
|
// labelWidth: 0,
|
|
|
height: 50,
|
|
|
name: 'ARRIVEREMARK',
|
|
|
anchor: '100%'
|
|
|
}
|
|
|
|
|
|
]//end root items
|
|
|
});
|
|
|
me = this;
|
|
|
this.winStatusChangeShow = Ext.create('Ext.window.Window', {
|
|
|
title: "状态更新",
|
|
|
width: 350,
|
|
|
//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.formStatusChange],
|
|
|
buttons: [{
|
|
|
text: "确认",
|
|
|
minWidth: 70,
|
|
|
handler: function () {
|
|
|
|
|
|
var form = me.formStatusChange.getForm();
|
|
|
var STATUSDATE = form.findField('STATUSDATE').getRawValue();
|
|
|
if (STATUSDATE == '' || STATUSDATE == null || STATUSDATE == undefined) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '状态日期为必填!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
};
|
|
|
var TRANSSTATUS = form.findField('TRANSSTATUS').getValue();
|
|
|
var ARRIVEREMARK = form.findField('ARRIVEREMARK').getValue();
|
|
|
|
|
|
me.UpTransStatus(TRANSSTATUS, STATUSDATE, ARRIVEREMARK);
|
|
|
}
|
|
|
}, {
|
|
|
text: "关闭",
|
|
|
minWidth: 70,
|
|
|
handler: function () {
|
|
|
me.winStatusChangeShow.close();
|
|
|
}
|
|
|
}]
|
|
|
});
|
|
|
|
|
|
}, //end initUIComponents
|
|
|
|
|
|
|
|
|
onRefreshClick: function (button, event) {
|
|
|
var sql = this.getCondition();
|
|
|
this.sqlcontext = sql;
|
|
|
this.PageSize = this.Pagenum.getValue();
|
|
|
|
|
|
this.storeList.pageSize = this.PageSize;
|
|
|
this.storeList.currentPage = 1;
|
|
|
this.storeList.load({
|
|
|
params: { start: 0, limit: this.PageSize, sort: '', condition: sql },
|
|
|
waitMsg: "正在查询数据...",
|
|
|
scope: this
|
|
|
});
|
|
|
// this.onRefreshSumClick(sql);
|
|
|
},
|
|
|
onRefresh2Click: function (button, event) {
|
|
|
var sql = this.getCondition2();
|
|
|
this.PageSize2 = this.Pagenum2.getValue();
|
|
|
this.sqlcontext2 = sql;
|
|
|
this.storeList2.pageSize = this.PageSize2;
|
|
|
this.storeList2.currentPage = 1;
|
|
|
|
|
|
this.storeList2.load({
|
|
|
params: { start: 0, limit: this.PageSize2, sort: '', condition: sql },
|
|
|
waitMsg: "正在查询数据...",
|
|
|
scope: this
|
|
|
});
|
|
|
// this.onRefreshSumClick(sql);
|
|
|
},
|
|
|
onCreatePcAutoClick:function(){
|
|
|
|
|
|
var selections = this.gridList2.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') {
|
|
|
Ext.Msg.wait('正在生成数据...');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在生成数据...',
|
|
|
url: '/TruckMng/MsOpTruckBulkPc/AddBillAuto',
|
|
|
params: {
|
|
|
data: Ext.JSON.encode(record.data)
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
this.storeList.remove(record);
|
|
|
var returnData = jsonresult.Data;
|
|
|
// var arrNewRecords = this.storeList.add(returnData);
|
|
|
var arrNewRecords = this.storeList.insert(0, returnData);
|
|
|
_this.SelectedRecord = this.storeList.getAt(0);
|
|
|
_this.OprationStatus = 'edit';
|
|
|
DsOpenEditWin('/TruckMng/MsOpTruckBulkPc/Edit');
|
|
|
Ext.Msg.hide();
|
|
|
|
|
|
}
|
|
|
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);
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
onRefreshSumClick: function (sql) {
|
|
|
|
|
|
|
|
|
this.storeSumList.load({
|
|
|
params: { start: 0, limit: this.PageSize, sort: '', condition: sql },
|
|
|
waitMsg: "正在查询数据...",
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
onDsQuery: function () {
|
|
|
//var girdcolums = this.gridList.getColumnMode();
|
|
|
var sql = this.sqlcontext;
|
|
|
this.PageSize = this.Pagenum.getValue();
|
|
|
|
|
|
this.storeList.pageSize = this.PageSize;
|
|
|
this.storeList.currentPage = 1;
|
|
|
|
|
|
this.storeList.load({
|
|
|
params: { start: 0, limit: this.PageSize, sort: '', condition: sql },
|
|
|
waitMsg: "正在查询数据...",
|
|
|
scope: this
|
|
|
});
|
|
|
this.storeSumList.load({
|
|
|
params: { start: 0, limit: this.PageSize, sort: '', condition: sql },
|
|
|
waitMsg: "正在查询数据...",
|
|
|
scope: this
|
|
|
});
|
|
|
},
|
|
|
onDsQuery2: function (button, event) {
|
|
|
var sql = this.sqlcontext2;
|
|
|
this.PageSize2 = this.Pagenum2.getValue();
|
|
|
this.storeList2.pageSize = this.PageSize2;
|
|
|
this.storeList2.currentPage = 1;
|
|
|
|
|
|
this.storeList2.load({
|
|
|
params: { start: 0, limit: this.PageSize2, sort: '', condition: sql },
|
|
|
waitMsg: "正在查询数据...",
|
|
|
scope: this
|
|
|
});
|
|
|
// this.onRefreshSumClick(sql);
|
|
|
},
|
|
|
|
|
|
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 bodyAddDatas = [];
|
|
|
for (var i = 0; i < selections.length; i++) {
|
|
|
var record = selections[i];
|
|
|
var isdelete = true;
|
|
|
if (record.data.BSSTATUS == '1') {
|
|
|
isdelete = false;
|
|
|
Ext.Msg.show({ title: '警告', msg: '业务已锁定,不允许删除!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
if (record.data.FEESTATUS == '1') {
|
|
|
isdelete = false;
|
|
|
Ext.Msg.show({ title: '警告', msg: '费用已锁定,不允许删除!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
if (record.data.TRANSSTATUS != '新建' && record.data.TRANSSTATUS != '驳回提交') {
|
|
|
isdelete = false;
|
|
|
Ext.Msg.show({ title: '警告', msg: '当前状态,不允许删除!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if (this.StoreOpRange.getCount() == 0) {
|
|
|
isdelete = false;
|
|
|
Ext.Msg.show({ title: '警告', msg: '权限不足,不允许删除!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
} else {
|
|
|
var op = record.data.OP;
|
|
|
var CREATEUSER = record.data.CREATEUSER;
|
|
|
|
|
|
var records = DsStoreQueryBy(this.StoreOpRange, 'OPID', op);
|
|
|
if (records.getCount() > 0) {
|
|
|
} else {
|
|
|
var recordins = DsStoreQueryBy(this.StoreOpRange, 'OPID', CREATEUSER);
|
|
|
if (recordins.getCount() > 0) {
|
|
|
} else {
|
|
|
isdelete = false;
|
|
|
Ext.Msg.show({ title: '警告', msg: '权限不足,不允许删除!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (isdelete) {
|
|
|
bodyAddDatas.push(record);
|
|
|
}
|
|
|
}
|
|
|
//
|
|
|
Ext.MessageBox.confirm('提示', '确定删除该记录吗?', function (btn) {
|
|
|
if (btn == 'yes') {
|
|
|
Ext.Msg.wait('正在删除数据...');
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在删除数据...',
|
|
|
url: '/TruckMng/MsOpTruckBulkPc/DeleteList',
|
|
|
params: {
|
|
|
data: jsonbodyAddDatas
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
this.storeList.reload();
|
|
|
Ext.Msg.show({ title: '提示', msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
else {
|
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
failure: function (response, options) {
|
|
|
Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
},
|
|
|
success: function (response, options) {
|
|
|
},
|
|
|
scope: this
|
|
|
}); //end Ext.Ajax.request
|
|
|
}
|
|
|
}, this);
|
|
|
},
|
|
|
onSubmitAuditClick: function () {
|
|
|
|
|
|
var selections = this.gridList.getSelectionModel().getSelection();
|
|
|
if (selections.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '请先选择业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
var bodydatas = [];
|
|
|
for (var i = 0; i < selections.length ; i += 1) {
|
|
|
var member = selections[i];
|
|
|
if ((member.data.TRANSSTATUS == '新建') || (member.data.TRANSSTATUS == '驳回提交'))
|
|
|
bodydatas.push(member);
|
|
|
}
|
|
|
if (bodydatas.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '误操作,不能操作!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
Ext.MessageBox.confirm('提示', '确实要提交审核吗?', function (btn) {
|
|
|
if (btn == 'yes') {
|
|
|
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodydatas);
|
|
|
Ext.Msg.wait('正在操作数据...');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在操作数据...',
|
|
|
url: '/TruckMng/MsOpTruckBulkPc/SubmitAuditList',
|
|
|
params: {
|
|
|
data: jsonbodyAddDatas
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
this.storeList.reload();
|
|
|
Ext.Msg.hide();
|
|
|
}
|
|
|
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);
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
onSubmitAuditBackClick: function () {
|
|
|
|
|
|
var selections = this.gridList.getSelectionModel().getSelection();
|
|
|
if (selections.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '请先选择业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
var bodydatas = [];
|
|
|
for (var i = 0; i < selections.length ; i += 1) {
|
|
|
var member = selections[i];
|
|
|
if (member.data.TRANSSTATUS == '提交审核')
|
|
|
bodydatas.push(member);
|
|
|
}
|
|
|
if (bodydatas.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '没有需要撤销提交的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
Ext.MessageBox.confirm('提示', '确实要提交审核吗?', function (btn) {
|
|
|
if (btn == 'yes') {
|
|
|
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodydatas);
|
|
|
Ext.Msg.wait('正在操作数据...');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在操作数据...',
|
|
|
url: '/TruckMng/MsOpTruckBulkPc/SubmitAuditBackList',
|
|
|
params: {
|
|
|
data: jsonbodyAddDatas
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
this.storeList.reload();
|
|
|
Ext.Msg.hide();
|
|
|
}
|
|
|
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);
|
|
|
|
|
|
},
|
|
|
onClearSql: function () {
|
|
|
var form = this.formSearch.getForm();
|
|
|
form.reset();
|
|
|
}, //onDeleteClick
|
|
|
onClearSql2: function () {
|
|
|
var form = this.formSearch2.getForm();
|
|
|
form.reset();
|
|
|
}, //onDeleteClick
|
|
|
|
|
|
onUpTransStatusClick: function (transstatus) {
|
|
|
|
|
|
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 bodydatas = [];
|
|
|
for (var i = 0; i < selections.length ; i += 1) {
|
|
|
var member = selections[i];
|
|
|
if ((transstatus == '在途' && (member.data.TRANSSTATUS == '审核通过' || member.data.TRANSSTATUS == '已到货'))
|
|
|
|| (transstatus == '已到货' && (member.data.TRANSSTATUS == '在途' || member.data.TRANSSTATUS == '已回单'))
|
|
|
|| (transstatus == '已回单' && member.data.TRANSSTATUS == '已到货') || (transstatus == '审核通过' && member.data.TRANSSTATUS == '在途'))
|
|
|
bodydatas.push(member);
|
|
|
}
|
|
|
if (bodydatas.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '误操作,不能操作!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
Ext.MessageBox.confirm('提示', '确实要更新派车的状态为<'+transstatus+'>吗?', function (btn) {
|
|
|
if (btn == 'yes') {
|
|
|
if (transstatus == '已到货' || transstatus == '已回单') {
|
|
|
this.selectbodydatas = bodydatas;
|
|
|
var myDate = new Date();
|
|
|
var mydatestr = Ext.util.Format.date(myDate, 'Y-m-d');
|
|
|
this.formStatusChange.getForm().findField('TRANSSTATUS').setValue(transstatus);
|
|
|
this.formStatusChange.getForm().findField('STATUSDATE').setFieldLabel(transstatus + '日期');
|
|
|
this.formStatusChange.getForm().findField('STATUSDATE').setValue(mydatestr);
|
|
|
this.winStatusChangeShow.show();
|
|
|
|
|
|
} else {
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodydatas);
|
|
|
Ext.Msg.wait('正在操作数据...');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在操作数据...',
|
|
|
url: '/TruckMng/MsOpTruckBulkPc/UpTransStatusList',
|
|
|
params: {
|
|
|
data: jsonbodyAddDatas,
|
|
|
transstatus: transstatus
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
this.storeList.reload();
|
|
|
Ext.Msg.hide();
|
|
|
}
|
|
|
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);
|
|
|
|
|
|
},
|
|
|
UpTransStatus: function (transstatus, transdate, remark) {
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(this.selectbodydatas);
|
|
|
|
|
|
Ext.Msg.wait('正在操作数据...');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在操作数据...',
|
|
|
url: '/TruckMng/MsOpTruckBulkPc/UpTransStatusList',
|
|
|
params: {
|
|
|
data: jsonbodyAddDatas,
|
|
|
transstatus: transstatus,
|
|
|
statusdate: transdate,
|
|
|
arriverremark: remark
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
this.storeList.reload();
|
|
|
Ext.Msg.hide();
|
|
|
_this.winStatusChangeShow.close();
|
|
|
}
|
|
|
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
|
|
|
|
|
|
},
|
|
|
|
|
|
onPiLiangSubmitClick: function (menu, event, type) {
|
|
|
|
|
|
var selections = this.GridCheckBoxModel.selected.items;
|
|
|
if (selections.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '请先选择要更新的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
var BSNOStr = '';
|
|
|
for (var i = 0; i < selections.length; i++) {
|
|
|
var rec = selections[i];
|
|
|
var BSNO = "'" + rec.data.BSNO + "'";
|
|
|
if (BSNOStr == '')
|
|
|
BSNOStr = BSNO;
|
|
|
else {
|
|
|
|
|
|
BSNOStr = BSNOStr + ',' + BSNO;
|
|
|
}
|
|
|
}
|
|
|
this.storePLList.removeAll();
|
|
|
for (var i = 0; i < selections.length; i++) {
|
|
|
var rec = selections[i];
|
|
|
this.storePLList.add(rec.data);
|
|
|
}
|
|
|
|
|
|
|
|
|
if (BSNOStr == '') {
|
|
|
Ext.Msg.show({ title: '提示', msg: '误操作,不能操作!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.selectbsno = " BSNO IN (" + BSNOStr + ")";
|
|
|
|
|
|
window.open('/Account/Chfee_Audit/PiLiangSubmit', "PILIANGSUBMIT", 'width=1200,height=600,top=0,left=0,resizable=yes,status=yes,menubar=no,scrollbars=yes');
|
|
|
}
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//#region 批量模板费用
|
|
|
|
|
|
|
|
|
|
|
|
//#endregion
|
|
|
|
|
|
onFeeEditClick: function (menu, 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];
|
|
|
|
|
|
this.SelectedRecord = record;
|
|
|
this.OprationStatus = 'edit';
|
|
|
DsOpenEditWin('/MvcShipping/MsOpTruckBulkPc/PiLiangFeeEdit');
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
getCondition: function () {
|
|
|
var form = this.formSearch.getForm();
|
|
|
if (!form.isValid()) {
|
|
|
Ext.Msg.alert('提示', '查询条件赋值错误,请检查。');
|
|
|
return '';
|
|
|
}
|
|
|
|
|
|
var sql = " TRANSTYPE='普运' ";
|
|
|
|
|
|
|
|
|
|
|
|
var TRUCKNO = form.findField('TRUCKNO').getValue();
|
|
|
sql = sql + getAndConSql(sql, TRUCKNO, "TRUCKNO like '%" + TRUCKNO + "%'");
|
|
|
|
|
|
|
|
|
var CUSTNO = form.findField('CUSTNO').getValue();
|
|
|
sql = sql + getAndConSql(sql, CUSTNO, "CUSTNO like '%" + CUSTNO + "%'");
|
|
|
|
|
|
var TRANSSTATUS = form.findField('TRANSSTATUS').getValue();
|
|
|
sql = sql + getAndConSql(sql, TRANSSTATUS, "TRANSSTATUS='" + TRANSSTATUS + "'");
|
|
|
|
|
|
var CUSTOMERNAME = form.findField('CUSTOMERNAME').getValue();
|
|
|
sql = sql + getAndConSql(sql, CUSTOMERNAME, "CUSTOMERNAME='" + CUSTOMERNAME + "'");
|
|
|
|
|
|
var TRUCKER = form.findField('TRUCKER').getValue();
|
|
|
sql = sql + getAndConSql(sql, TRUCKER, "TRUCKER='" + TRUCKER + "'");
|
|
|
|
|
|
var OP = form.findField('OP').getValue();
|
|
|
sql = sql + getAndConSql(sql, OP, "OP='" + OP + "'");
|
|
|
|
|
|
|
|
|
|
|
|
var ORDERNO = form.findField('ORDERNO').getValue();
|
|
|
sql = sql + getAndConSql(sql, ORDERNO, " op_truck_bulk_pc.BSNO IN (SELECT BSNO FROM op_truck_bulk_pc_detail WHERE LINKBSNO IN (SELECT BSNO FROM op_truck_bulk WHERE ORDERNO like '%" + ORDERNO + "%'))");
|
|
|
|
|
|
//var GOODSNAME = form.findField('GOODSNAME').getValue();
|
|
|
//sql = sql + getAndConSql(sql, GOODSNAME, " op_truck_bulk_pc.BSNO IN (SELECT BSNO FROM op_truck_bulk_pc_detail WHERE LINKBSNO IN (SELECT BSNO FROM op_truck_bulk WHERE GOODSNAME='" + GOODSNAME + "'))");
|
|
|
|
|
|
|
|
|
var ETDBgn = form.findField('ETDBgn').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, ETDBgn, "CONVERT(char(10), ETD, 20) >='" + ETDBgn + "'");
|
|
|
var ETDEnd = form.findField('ETDEnd').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, ETDEnd, "CONVERT(char(10), ETD, 20) <='" + ETDEnd + "'");
|
|
|
|
|
|
//var ETABgn = form.findField('ETABgn').getRawValue();
|
|
|
//sql = sql + getAndConSql(sql, ETABgn, "CONVERT(char(10), ETD, 20) >='" + ETABgn + "'");
|
|
|
//var ETAEnd = form.findField('ETAEnd').getRawValue();
|
|
|
//sql = sql + getAndConSql(sql, ETAEnd, "CONVERT(char(10), ETD, 20) <='" + ETAEnd + "'");
|
|
|
|
|
|
var BSDATEBgn = form.findField('BSDATEBgn').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, BSDATEBgn, "CONVERT(char(10), BSDATE, 20) >='" + BSDATEBgn + "'");
|
|
|
var BSDATEEnd = form.findField('BSDATEEnd').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, BSDATEEnd, "CONVERT(char(10), BSDATE, 20) <='" + BSDATEEnd + "'");
|
|
|
|
|
|
var PORTLOAD = form.findField('PORTLOAD').getValue();
|
|
|
sql = sql + getAndConSql(sql, PORTLOAD, "PORTLOAD= '" + PORTLOAD + "'");
|
|
|
var PORTDISCHARGE = form.findField('PORTDISCHARGE').getValue();
|
|
|
sql = sql + getAndConSql(sql, PORTDISCHARGE, "PORTDISCHARGE= '" + PORTDISCHARGE + "'");
|
|
|
|
|
|
return sql;
|
|
|
},
|
|
|
|
|
|
getCondition2: function () {
|
|
|
var form = this.formSearch2.getForm();
|
|
|
if (!form.isValid()) {
|
|
|
Ext.Msg.alert('提示', '查询条件赋值错误,请检查。');
|
|
|
return '';
|
|
|
}
|
|
|
|
|
|
var sql = " TRANSTYPE='普运' ";
|
|
|
|
|
|
var CUSTNO = form.findField('CUSTNO').getValue();
|
|
|
sql = sql + getAndConSql(sql, CUSTNO, "CUSTNO like '%" + CUSTNO + "%'");
|
|
|
|
|
|
var TRANSSTATUS = form.findField('TRANSSTATUS').getValue();
|
|
|
sql = sql + getAndConSql(sql, TRANSSTATUS, "TRANSSTATUS='" + TRANSSTATUS + "'");
|
|
|
|
|
|
|
|
|
var CONTRACTNO = form.findField('CONTRACTNO').getValue();
|
|
|
sql = sql + getAndConSql(sql, CONTRACTNO, "CONTRACTNO like '%" + CONTRACTNO + "%'");
|
|
|
|
|
|
var CUSTOMERNAME = form.findField('CUSTOMERNAME').getValue();
|
|
|
sql = sql + getAndConSql(sql, CUSTOMERNAME, "CUSTOMERNAME='" + CUSTOMERNAME + "'");
|
|
|
|
|
|
var ORDERNO = form.findField('ORDERNO').getValue();
|
|
|
sql = sql + getAndConSql(sql, ORDERNO, "ORDERNO like '%" + ORDERNO + "%'");
|
|
|
|
|
|
|
|
|
var PORTLOAD = form.findField('PORTLOAD').getValue();
|
|
|
sql = sql + getAndConSql(sql, PORTLOAD, "PORTLOAD= '" + PORTLOAD + "'");
|
|
|
var PORTDISCHARGE = form.findField('PORTDISCHARGE').getValue();
|
|
|
sql = sql + getAndConSql(sql, PORTDISCHARGE, "PORTDISCHARGE= '" + PORTDISCHARGE + "'");
|
|
|
|
|
|
var PKGS = form.findField('PKGS').getValue();
|
|
|
sql = sql + getAndConSql(sql, PKGS, "PKGS=" + PKGS + "");
|
|
|
|
|
|
|
|
|
var ETDBgn = form.findField('ETDBgn').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, ETDBgn, "CONVERT(char(10), ETD, 20) >='" + ETDBgn + "'");
|
|
|
var ETDEnd = form.findField('ETDEnd').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, ETDEnd, "CONVERT(char(10), ETD, 20) <='" + ETDEnd + "'");
|
|
|
|
|
|
var ETABgn = form.findField('ETABgn').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, ETABgn, "CONVERT(char(10), ETD, 20) >='" + ETABgn + "'");
|
|
|
var ETAEnd = form.findField('ETAEnd').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, ETAEnd, "CONVERT(char(10), ETD, 20) <='" + ETAEnd + "'");
|
|
|
|
|
|
var BSDATEBgn = form.findField('BSDATEBgn').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, BSDATEBgn, "CONVERT(char(10), BSDATE, 20) >='" + BSDATEBgn + "'");
|
|
|
var BSDATEEnd = form.findField('BSDATEEnd').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, BSDATEEnd, "CONVERT(char(10), BSDATE, 20) <='" + BSDATEEnd + "'");
|
|
|
|
|
|
|
|
|
|
|
|
return sql;
|
|
|
},
|
|
|
OprationSwap: function () {
|
|
|
var ret = new Array();
|
|
|
ret[0] = this.OprationStatus;
|
|
|
ret[1] = this.storeList;
|
|
|
ret[2] = this.SelectedRecord;
|
|
|
ret[3] = this.selectbsno;
|
|
|
ret[4] = 'op_truckbulk_pc';
|
|
|
ret[5] = this.storePLList;
|
|
|
return ret;
|
|
|
},
|
|
|
|
|
|
onExportClick: function (button, event) {
|
|
|
GridExportExcelPage(this.gridList);
|
|
|
},
|
|
|
Print: function () {
|
|
|
|
|
|
_this = this;
|
|
|
if (this.storeList.getCount() == 0) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
Ext.Msg.wait('正在组织数据, 请稍侯..');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在组织数据...',
|
|
|
url: '/MvcShipping/MsOpTruckBulkPc/GetDataListStr',
|
|
|
scope: this,
|
|
|
params: {
|
|
|
condition: _this.sqlcontext,
|
|
|
printstr: 'true'
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
Ext.MessageBox.hide();
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
var returnstr = jsonresult.data;
|
|
|
var printType = 'MSOPTRUCKBULKPCLIST';
|
|
|
var sql1 = returnstr;
|
|
|
var sql2 = "";
|
|
|
var sql3 = "";
|
|
|
var sql4 = "";
|
|
|
var sql5 = "";
|
|
|
var sql6 = "";
|
|
|
|
|
|
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
|
|
|
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: '请重试',
|
|
|
msg: '服务器响应出错',
|
|
|
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
|
|
|
|
|
|
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 = '';
|
|
|
|
|
|
if (this.sortfield != '' && this.sortdire != '') {
|
|
|
|
|
|
sortstr = this.sortfield + ' ' + this.sortdire;
|
|
|
}
|
|
|
|
|
|
if (sortstr == "") sortstr = "BSDATE desc"
|
|
|
|
|
|
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 = 'MSOPTRUCKBULKLISTPCSELECT';
|
|
|
var sql1 = "select * from op_truck_bulk_pc WHERE BSNO IN (" + feeGidSql + ") order by " + sortstr;
|
|
|
var sql2 = "select * from op_truck_bulk_pc where BSNO='" + bsno + "'";
|
|
|
var sql3 = "";
|
|
|
var sql4 = "";
|
|
|
var sql5 = "";
|
|
|
var sql6 = "";
|
|
|
|
|
|
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
|
|
|
},
|
|
|
//#region 2018年2月7日 李进举 鼎世 批量整票提交
|
|
|
onPiLiangZhengPiaoTiJiaoClick: function (menu, event, type) {
|
|
|
|
|
|
var selections = this.GridCheckBoxModel.selected.items;
|
|
|
if (selections.length == 0) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXianXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //请先选择要更新的业务!
|
|
|
return;
|
|
|
}
|
|
|
var BSNOStr = '';
|
|
|
for (var i = 0; i < selections.length; i++) {
|
|
|
var rec = selections[i];
|
|
|
var BSNO = "'" + rec.data.BSNO + "'";
|
|
|
if (BSNOStr == '')
|
|
|
BSNOStr = BSNO;
|
|
|
else {
|
|
|
|
|
|
BSNOStr = BSNOStr + ',' + BSNO;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
if (BSNOStr == '') {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.MeiYouYaoGengXinDeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
|
|
|
} else {
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在查询主表数据...',
|
|
|
url: '/MvcShipping/MsOpSeae/PiLiangZhengPiaoTiJiao',
|
|
|
params: {
|
|
|
bsno: BSNOStr,
|
|
|
statusvalue: 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;
|
|
|
} else {
|
|
|
this.storeList.load({
|
|
|
params: { start: 0, limit: this.PageSize, sort: '', condition: _this.sqlcontext, load: 'true' },
|
|
|
waitMsg: Zi.LAN.ZhengZaiChaXunShuJu, //"正在查询数据...",
|
|
|
scope: this
|
|
|
});
|
|
|
Ext.Msg.show({
|
|
|
title: '提示',
|
|
|
msg: result.Message,
|
|
|
icon: Ext.MessageBox.OK,
|
|
|
buttons: Ext.Msg.OK
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|
|
|
//#endregion
|
|
|
});
|
|
|
|
|
|
|