监管车界面的公司和部门

DS7_JingHan
ddlucky 2 years ago
parent a79f466bea
commit b23489fb37

@ -19,6 +19,19 @@
SHOWNAME = '<%= Session["SHOWNAME"] %>'; SHOWNAME = '<%= Session["SHOWNAME"] %>';
} }
getSessgion3(); getSessgion3();
var DEPTID;
function getSessgion4() {
DEPTID = '<%= Session["DEPTGID"] %>';
}
getSessgion4();
var COMPANYID;
function getSessgion5() {
COMPANYID = '<%= Session["COMPANYID"] %>';
}
getSessgion5();
var strLANGUAGES; var strLANGUAGES;
function getSessgion6() { function getSessgion6() {
strLANGUAGES = '<%= Session["LANGUAGES"] %>'; //zh-cn-中文en-us英文 strLANGUAGES = '<%= Session["LANGUAGES"] %>'; //zh-cn-中文en-us英文

@ -1406,10 +1406,13 @@ function getStoreRecordsByFieldValue(store, fieldname, fieldvalue) {
var member = store.getAt(i); var member = store.getAt(i);
var _fieldvalue = member.get(fieldname); var _fieldvalue = member.get(fieldname);
if (_fieldvalue == fieldvalue) { if (_fieldvalue == fieldvalue) {
_List.push(member.get(fieldname)); _List.push(member);
} else { } else {
} }
} }
//idx = store.findExact(fieldname, fieldvalue);
////return idx !== -1 ? ds.getAt(idx)
//idx !== -1 ? _List.push(store.getAt(idx)) : false;
return _List; return _List;
} }

@ -116,9 +116,9 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckEdit, Ext.Panel, {
// flex: 0.5, // flex: 0.5,
// labelWidth: 60, // labelWidth: 60,
forceSelection: true, forceSelection: true,
name: 'SALEDEPT', name: 'DEPTID', id: "DEPTID",
value: DEPTNAME, valueField: 'GID',
valueField: 'DeptName', value: DEPTID,
displayField: 'DeptName' displayField: 'DeptName'
//,hidden: true //,hidden: true
}); });

@ -63,14 +63,14 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckIndex, Ext.Panel, {
}); });
this.storeDEPT = Ext.create('DsExt.ux.RefTableStore', { this.storeDept = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsTruckMng.ux.DEPTRefModel', model: 'DsShipping.ux.DeptModel',
proxy: { url: '/CommMng/BasicDataRef/GetDeptList' } proxy: { url: '/CommMng/BasicDataRef/GetDeptList' }
}); });
this.storeDEPT.load({ params: { condition: "" } }); this.storeDept.load();
this.comboxDEPT = Ext.create('DsExt.ux.RefTableCombox', { this.comboxDEPT = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '部门', fieldLabel: '部门',
store: this.storeDEPT, store: this.storeDept,
name: 'DEPTID', id: "DEPTID", name: 'DEPTID', id: "DEPTID",
valueField: 'GID', valueField: 'GID',
displayField: 'DeptName' displayField: 'DeptName'
@ -1857,15 +1857,15 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckIndex, Ext.Panel, {
//#endregion //#endregion
, GetCompanyInfo: function (CORPID) { , GetCompanyInfo: function (CORPID) {
var company = getStoreRecordsByFieldValue(this.storeCompany, "GID", CORPID) var company = getStoreRecordsByFieldValue(this.storeCompany, "gid", CORPID)
if (company.length > 0) { if (company.length > 0) {
return company[0].get("NAME"); return company[0].get("name");
} else { } else {
return ""; return "";
} }
} }
, GetDeptInfo: function (DEPTGID) { , GetDeptInfo: function (DEPTGID) {
var dept = getStoreRecordsByFieldValue(this.storeCompany, "GID", DEPTGID) var dept = getStoreRecordsByFieldValue(this.storeDept, "GID", DEPTGID)
if (dept.length > 0) { if (dept.length > 0) {
return dept[0].get("DeptName"); return dept[0].get("DeptName");
} else { } else {

Loading…
Cancel
Save