目的: V80201 - store 重設 timeout & WebService 重設 timeout - 顯示子件資料
處理說明: 呼叫WebService(WS_PDM02) 顯示子件資料
1> 後端 Webservice.重設 timeout - web.config - 10分鐘
1> 後端 Webservice.重設 timeout - web.config - 10分鐘
<binding name="ServiceSoap"
receiveTimeout="00:10:00" .. >
2> 前端 store.重設 timeout - 10分鐘
Ext.getCmp('sub_Grid').store.proxy.timeout=600000;
3>Ext.Ajax 設定 timeout - 10 分鐘
Ext.Ajax.timeout = 600000; //如果有ajax timeout問題可以加上去
1>web.config - 後端 Webservice.重設 timeout - 10分鐘
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="ILdapServiceHttpBinding" />
<binding name="TLSWebServiceSoap" />
<binding name="ID40AuthenticateSoap" />
<binding name="AMMWebServiceSoap" />
<binding name="zm179TlsSoap" />
<binding name="ZRFC_ZM66Soap" maxBufferPoolSize="524288" maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647" />
<binding name="ws_als_wbshourSoap" receiveTimeout="00:15:00"
sendTimeout="00:15:00"/>
<binding name="ServiceSoap"
receiveTimeout="00:10:00"
sendTimeout="00:10:00"
maxBufferPoolSize="524288"
maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647" />
<binding name="ws_als_jcnhourSoap" />
</basicHttpBinding>
<customBinding>
<binding name="ID40AuthenticateSoap12">
<textMessageEncoding messageVersion="Soap12" />
<httpTransport />
</binding>
<binding name="zm179TlsSoap12">
<textMessageEncoding messageVersion="Soap12" />
<httpTransport />
</binding>
<binding name="ServiceSoap12">
<textMessageEncoding messageVersion="Soap12" />
<httpTransport />
</binding>
</customBinding>
</bindings>
<client>
<endpoint address="http://aidcldap/ldapService.do" binding="basicHttpBinding"
bindingConfiguration="ILdapServiceHttpBinding" contract="aidcldap.ILdapServicePortType"
name="ILdapServiceHttpPort" />
<endpoint address="http://192.30.8.210:8503/TLSWebService.asmx"
binding="basicHttpBinding" bindingConfiguration="TLSWebServiceSoap"
contract="TLSWS.TLSWebServiceSoap" name="TLSWebServiceSoap" />
<endpoint address="http://192.168.99.36/aeispj/aeis/webservice/id40Authenticate.asmx"
binding="basicHttpBinding" bindingConfiguration="ID40AuthenticateSoap"
contract="iAIDCWebservice.ID40AuthenticateSoap" name="ID40AuthenticateSoap" />
<endpoint address="http://192.30.8.240:8100/AMMWebService.asmx"
binding="basicHttpBinding" bindingConfiguration="AMMWebServiceSoap"
contract="AMMWS_TEST.AMMWebServiceSoap" name="AMMWebServiceSoap" />
<endpoint address="http://aesweb/SAP/Zm179tls.asmx" binding="basicHttpBinding"
bindingConfiguration="zm179TlsSoap" contract="ZM179.zm179TlsSoap"
name="zm179TlsSoap" />
<endpoint address="http://194.1.5.106/SAPWS/ZRFC_ZM66.asmx" binding="basicHttpBinding"
bindingConfiguration="ZRFC_ZM66Soap" contract="ZRFC_ZM66.ZRFC_ZM66Soap"
name="ZRFC_ZM66Soap" />
<endpoint address="http://194.1.5.106/sapws/ws_als_wbshour.asmx"
binding="basicHttpBinding" bindingConfiguration="ws_als_wbshourSoap"
contract="ws_als_wbshour.ws_als_wbshourSoap" name="ws_als_wbshourSoap" />
<endpoint address="http://enovia/AMM/Service.asmx" binding="basicHttpBinding"
bindingConfiguration="ServiceSoap" contract="PDM_WS.ServiceSoap"
name="ServiceSoap" />
<endpoint address="http://194.1.5.106/sapws/ws_als_jcnhour.asmx"
binding="basicHttpBinding" bindingConfiguration="ws_als_jcnhourSoap"
contract="ws_als_jcnhour.ws_als_jcnhourSoap" name="ws_als_jcnhourSoap" />
</client>
</system.serviceModel>
</configuration>
2> 前端 store.重設 timeout - V80201A1.js
var win1 = getMyWindow("顯示子件明細資料", sub_ShowPNDetail_Flds, sub_ShowPNDetail_Btns, "A1");
win1.x =400;
win1.setWidth(700);
win1.setHeight(400);
//顯示 sub Grid 資料
var np = {};
np["PROJID"] = Ext.getCmp("sub_PROJID").getValue();
np["PDM_CONFIG"] = Ext.getCmp("sub_PDM_CONFIG").getValue();
np["PDTP"] = Ext.getCmp("sub_PDTP").getValue();
np["TYPE"] = Ext.getCmp("sub_TYPE").getValue();
//目前所選件號(PN),ECNO,情況處理碼(CNDPROCCODE)
np["PN"] = par_PN;
np["ECNO"] = par_ECNO;
np["CNDPROCCODE"] = par_CNDPROCCODE;
np["ASN"] = par_ASN;
np["PROCWC"] = par_PROCWC;
Ext.getCmp('sub_Grid').store.getProxy().url = '../api/V80201A1API/getsubData';
Ext.getCmp('sub_Grid').store.getProxy().extraParams = np; //分頁OK,篩選條件OK
//Ext.getCmp('sub_Grid').store.clearOnPageLoad = true;
//Ext.getCmp('sub_Grid').reloadGridData();
//重新設定store.proxy 的timeout 時間(10分鐘), 以免store載入時間 timeuot , 出現 Error
Ext.getCmp('sub_Grid').store.proxy.timeout=600000;
Ext.getCmp('sub_Grid').store.on("load", function (me, records, successful, eOpts) {
console.log("STEP2 Ext.getCmp(sub_Grid).store.on(load ..");
console.log("successful:", successful);
console.log("records:", records);
if (successful) {
console.log("successful");
console.log("Ext.getCmp('sub_Grid').store.data", Ext.getCmp('sub_Grid').store.data);
win1.show();
//若已載入完成,則
//Ext.getCmp('waitlbl').setVisible(false);
Ext.getCmp("myMask").hide();
//myMask.unmask();
//myMask.hide();
}
}
);
Ext.getCmp('sub_Grid').store.load();
console.log(" STEP 1 Ext.getCmp('sub_Grid').store.load() ");
Ext.getCmp('sub_Grid_ptb').hide();
}; // end of function ShowPNBtn_click() {
3>*.cs - V80201A1APIController.cs
//重新設定WebService 的timeout 時間(10分鐘), 以免呼叫 WebService timeuot , 出現 Error
DataSet ds = PDM02.AMM_PDM02(Tmp_PN, Tmp_ECNO,Tmp_CNDPROCCODE, Tmp_PDTP,
Tmp_ASN,Tmp_PROJID, Tmp_PROCWC);
//將 ds 轉成標準的 T1C 格式(TMGrid)
ds = myfunc.ds2T1C(ds);