| | |
| | | <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}" /> |
| | | <apex:form id="allForm"> |
| | | <script> |
| | | // 20230418 ljh DB202304320022 start |
| | | window.onload = function init(){ |
| | | clearBrandMannualName(); |
| | | } |
| | | // 20230418 ljh DB202304320022 end |
| | | function saveJs() { |
| | | blockme(); |
| | | save(); |
| | |
| | | search(topNum, secondNum); |
| | | } |
| | | // add tcm 20211118 end |
| | | // 20230418 ljh DB202304320022 start |
| | | function edit2JS() { |
| | | blockme(); |
| | | edit2(); |
| | | } |
| | | // 20230418 ljh DB202304320022 end |
| | | function setLostTotalAmount() { |
| | | //console.log('setLostTotalAmount start:'); |
| | | var totalAmount = document.getElementById("allPage:allForm:allBlock:EditPage:LostReport:lstReport:LostTotalAmountOut:LostTotalAmount"); |
| | |
| | | setbrandmannual(brandNumber); |
| | | } |
| | | // 失单品牌不等于其他时,失单品牌(手动)清空并且不允许填写,失单品牌等于其他时,失单对手型号不可用 thh 2022-01-13 start |
| | | function clearBrandMannualName(){ |
| | | if(document.getElementById('allPage:allForm:allBlock:EditPage:LostBrands:0:LostBrand:BrandContent:Lost_By_CompanyOut:Lost_By_Company').value == '其他'){ |
| | | j$(escapeVfId('allPage:allForm:allBlock:EditPage:LostBrands:0:LostBrand:productTable:0:LostProduct')).attr("disabled", true); |
| | | } else{ |
| | | document.getElementById('allPage:allForm:allBlock:EditPage:LostBrands:0:LostBrand:BrandContent:Lost_By_Company_MannualOut:Lost_By_Company_Mannual').value = ''; |
| | | j$(escapeVfId('allPage:allForm:allBlock:EditPage:LostBrands:0:LostBrand:BrandContent:Lost_By_Company_MannualOut:Lost_By_Company_Mannual')).attr("disabled", true); |
| | | // function clearBrandMannualName(){ |
| | | // if(document.getElementById('allPage:allForm:allBlock:EditPage:LostBrands:0:LostBrand:BrandContent:Lost_By_CompanyOut:Lost_By_Company').value == '其他'){ |
| | | // j$(escapeVfId('allPage:allForm:allBlock:EditPage:LostBrands:0:LostBrand:productTable:0:LostProduct')).attr("disabled", true); |
| | | // } else{ |
| | | // document.getElementById('allPage:allForm:allBlock:EditPage:LostBrands:0:LostBrand:BrandContent:Lost_By_Company_MannualOut:Lost_By_Company_Mannual').value = ''; |
| | | // j$(escapeVfId('allPage:allForm:allBlock:EditPage:LostBrands:0:LostBrand:BrandContent:Lost_By_Company_MannualOut:Lost_By_Company_Mannual')).attr("disabled", true); |
| | | // } |
| | | // } |
| | | // 20230418 ljh DB202304320022 start |
| | | function clearBrandMannualName(){ |
| | | var pageStatus = "{!pageStatus}"; |
| | | if(pageStatus == 'Create'|| pageStatus == 'Edit'){ |
| | | var brandCount = parseInt("{!brandCount}"); |
| | | for(var i = 0;i<brandCount;i++){ |
| | | if(document.getElementById('allPage:allForm:allBlock:EditPage:LostBrands:'+i+':LostBrand:BrandContent:Lost_By_CompanyOut:Lost_By_Company').value == '其他'){ |
| | | if(document.getElementById('allPage:allForm:allBlock:EditPage:LostBrands:'+i+':LostBrand:BrandContent:Lost_By_Company_MannualOut:Lost_By_Company_Mannual').value == '' || document.getElementById('allPage:allForm:allBlock:EditPage:LostBrands:'+i+':LostBrand:BrandContent:Lost_By_Company_MannualOut:Lost_By_Company_Mannual').value == null){ |
| | | j$(escapeVfId('allPage:allForm:allBlock:EditPage:LostBrands:'+i+':LostBrand:productTable:0:LostProduct')).attr("disabled", true); |
| | | } |
| | | } else{ |
| | | document.getElementById('allPage:allForm:allBlock:EditPage:LostBrands:'+i+':LostBrand:BrandContent:Lost_By_Company_MannualOut:Lost_By_Company_Mannual').value = ''; |
| | | j$(escapeVfId('allPage:allForm:allBlock:EditPage:LostBrands:'+i+':LostBrand:BrandContent:Lost_By_Company_MannualOut:Lost_By_Company_Mannual')).attr("disabled", true); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // 20230418 ljh DB202304320022 end |
| | | // 失单品牌不等于其他时,失单品牌(手动)清空并且不允许填写,失单品牌等于其他时,失单对手型号不可用 thh 2022-01-13 end |
| | | </script> |
| | | <apex:actionFunction name="save" action="{!save}" oncomplete="unblockUI();clearBrandMannualName();" rerender="allForm,EditButton2"></apex:actionFunction> |
| | |
| | | </apex:actionFunction> |
| | | <!-- 失单品牌不等于其他时,失单品牌(手动)清空并且不允许填写,失单品牌等于其他时,失单对手型号不可用 thh 2022-01-13 end --> |
| | | |
| | | <apex:actionFunction name="setbrandmannual" action="{!setbrandmannual}" oncomplete="unblockUI();" rerender="allForm"> |
| | | <!-- 20230418 ljh DB202304320022 start --> |
| | | <!-- <apex:actionFunction name="setbrandmannual" action="{!setbrandmannual}" oncomplete="unblockUI();" rerender="allForm"> --> |
| | | <apex:actionFunction name="setbrandmannual" action="{!setbrandmannual}" oncomplete="clearBrandMannualName(),unblockUI();" rerender="allForm"> |
| | | <!-- 20230418 ljh DB202304320022 end --> |
| | | <apex:param assignTo="{!setBrandNo}" name="setBrandNo" value="" /> |
| | | </apex:actionFunction> |
| | | |
| | | <apex:actionFunction name="submit" action="{!submit}" oncomplete="unblockUI();" rerender="allForm,EditButton2"></apex:actionFunction> |
| | | |
| | | |
| | | <apex:actionFunction name="addBrand" action="{!addBrand}" oncomplete="unblockUI();" rerender="allForm,EditButton2"></apex:actionFunction> |
| | | <apex:actionFunction action="{!addProduct}" name="addProduct" reRender="allForm" oncomplete="unblockUI();"> |
| | | <!-- 20230418 ljh DB202304320022 start --> |
| | | <apex:actionFunction name="edit2" action="{!edit2}" oncomplete="clearBrandMannualName(),unblockUI();" rerender="allForm,EditButton2"></apex:actionFunction> |
| | | <!-- <apex:actionFunction name="addBrand" action="{!addBrand}" oncomplete="unblockUI();" rerender="allForm,EditButton2"></apex:actionFunction> --> |
| | | <apex:actionFunction name="addBrand" action="{!addBrand}" oncomplete="clearBrandMannualName(),unblockUI();" rerender="allForm,EditButton2"></apex:actionFunction> |
| | | |
| | | <!-- <apex:actionFunction action="{!addProduct}" name="addProduct" reRender="allForm" oncomplete="unblockUI();"> --> |
| | | <apex:actionFunction action="{!addProduct}" name="addProduct" reRender="allForm" oncomplete="clearBrandMannualName(),unblockUI();"> |
| | | <!-- 20230418 ljh DB202304320022 end --> |
| | | <apex:param assignTo="{!brandNo}" name="brandNo" value="" /> |
| | | </apex:actionFunction> |
| | | <apex:actionFunction action="{!Remove}" name="Remove" reRender="allForm" oncomplete="unblockUI();"> |
| | | <!-- 20230418 ljh DB202304320022 start --> |
| | | <!-- <apex:actionFunction action="{!Remove}" name="Remove" reRender="allForm" oncomplete="unblockUI();"> --> |
| | | <apex:actionFunction action="{!Remove}" name="Remove" reRender="allForm" oncomplete="clearBrandMannualName(),unblockUI();"> |
| | | <!-- 20230418 ljh DB202304320022 end --> |
| | | <apex:param assignTo="{!RemoveBrandNo}" name="RemoveBrandNo" value="" /> |
| | | </apex:actionFunction> |
| | | <!-- add tcm 20211118 start --> |
| | | <apex:actionFunction action="{!search}" name="search" reRender="allForm" oncomplete="unblockUI();"> |
| | | <!-- 20230418 ljh DB202304320022 start --> |
| | | <!-- <apex:actionFunction action="{!search}" name="search" reRender="allForm" oncomplete="unblockUI();"> --> |
| | | <apex:actionFunction action="{!search}" name="search" reRender="allForm" oncomplete="clearBrandMannualName(),unblockUI();"> |
| | | <!-- 20230418 ljh DB202304320022 end --> |
| | | <apex:param assignTo="{!topNum}" name="topNum" value="" /> |
| | | <apex:param assignTo="{!secondNum}" name="secondNum" value="" /> |
| | | </apex:actionFunction> |
| | |
| | | |
| | | <apex:commandButton rendered="{!IF(LostReport.lostReport.Report_Status__c = '草案', 'true', 'false')}" id="SubmitButton" onclick="submitJS();return false;" |
| | | value="提交" style="width: 150px;margin-left: 50px;" /> |
| | | <apex:commandButton rendered="{!IF(LostReport.lostReport.Report_Status__c = '草案' || $Profile.Id = '00e10000000Y3o5AAC', 'true', 'false')}" |
| | | <!-- 20230418 ljh DB202304320022 start --> |
| | | <!-- <apex:commandButton rendered="{!IF(LostReport.lostReport.Report_Status__c = '草案' || $Profile.Id = '00e10000000Y3o5AAC', 'true', 'false')}" |
| | | id="EditButton" reRender="allForm" action="{!edit2}" value="编辑" style="width: 150px;margin-left: 50px;" |
| | | /> --> |
| | | <apex:commandButton rendered="{!IF(LostReport.lostReport.Report_Status__c = '草案' || $Profile.Id = '00e10000000Y3o5AAC', 'true', 'false')}" |
| | | id="EditButton" reRender="allForm" onclick="edit2JS();return false;" value="编辑" style="width: 150px;margin-left: 50px;" |
| | | /> |
| | | <!-- 20230418 ljh DB202304320022 end --> |
| | | <apex:commandButton id="CancelButton" action="{!cancel}" value="返回询价" style="width: 150px;margin-left: 50px;" /> |
| | | |
| | | </apex:pageBlockButtons> |