liwentao
2023-07-21 b8e1ab6623181a2e95188123ce4b1451a8ed071f
营业:
vf页面:
保有设备所属变更
OPD计划
保修期变更申请
4个文件已修改
111 ■■■■■ 已修改文件
force-app/main/default/classes/AssetModifyBelongsController.cls 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/AssetGuaranteePeriodAlteration.page 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/AssetModifyBelongs.page 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/LookupPage.page 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/AssetModifyBelongsController.cls
@@ -50,7 +50,7 @@
    public Boolean isShow { get; set; }
    public List<Attachment> attachments { get; set; }
    //CHAN-BC6BV2 XHL AddEnd 20190522
    public List<ContentDocument> contents { get; set; }
    //分页功能
    public Integer pageLimit {get; set;}
    public String soql {get; set;}
@@ -68,6 +68,16 @@
        pageLimit = Integer.valueOf(System.Label.orderdetPageLimitsize);
        attachments = new List<Attachment>();
        //update 李文涛 2023/07/13 更新lightning附件上传 start
        List<ContentDocumentLink> cdlList = [SELECT ContentDocumentId
                                                   FROM ContentDocumentLink
                                                   WHERE LinkedEntityId = :Id];
        List<ID> fileIDs = new List<ID>();
        for (ContentDocumentLink docLink : cdlList) {
            fileIDs.add(docLink.ContentDocumentId);
        }
        contents=[SELECT Title,OwnerId,ContentModifiedDate from ContentDocument WHERE id IN :fileIDs];
        //update 李文涛 2023/07/13 更新lightning附件上传 end
    }
    public boolean getcheckUser() {
@@ -260,7 +270,17 @@
        if (String.isNotBlank(val1)) {
            val1 = val1.trim();
        }
        String soql = 'select Id,name,SerialNumber,Asset_situation__c,Order_No__c,Account.Name,Status,Installation_Site__c,CurrentContract__c from Asset where AccountId = \'' + RawAccountId + '\'';
        String soql='';
        System.debug(RawAccountId);
        RawAccountId='';
        if(String.isBlank(RawAccountId)){
            soql = 'select Id,name,SerialNumber,Asset_situation__c,Order_No__c,Account.Name,Status,Installation_Site__c,CurrentContract__c from Asset where AccountId = \'\'';
            System.debug('id is null');
        }
        else {
            soql = 'select Id,name,SerialNumber,Asset_situation__c,Order_No__c,Account.Name,Status,Installation_Site__c,CurrentContract__c from Asset where AccountId = \'' + RawAccountId + '\'';
            System.debug('id is not null');
        }
        if (!String.isBlank(text1)) {
            if (text1 == 'Order_No__c' && checkexact) {
                soql += ' AND (' + text1 + ' = \'' + String.escapeSingleQuotes(val1) + '\' )';
@@ -328,6 +348,16 @@
        ref.setRedirect(true);
        return ref;
    }
    //update 李文涛 2023/07/13 更新lightning附件上传 start
    //跳转到上传附件页面(lightning)
    public PageReference uploadingAttachmentLightning() {
        //PageReference ref = new Pagereference('/p/attach/NoteAttach?pid=' + Id + '&retURL=%2Fapex/AssetModifyBelongs?Id=' + Id);
        PageReference ref = new Pagereference('/lightning/n/lightning?backgroundContext=%2Flightning%2Fr%2FAssetModifyBelongsChange__c%2F'+Id+'%2Fedit%3Fcount%3D1&0.recordId='+Id+'');
        ref.setRedirect(true);
        return ref;
    }
    //update 李文涛 2023/07/13 更新lightning附件上传 end
    // CHAN-BC6BV2 XHL AddEnd 20190522
    //  重新刷新
    public PageReference returnChangePage() {
force-app/main/default/pages/AssetGuaranteePeriodAlteration.page
@@ -1,5 +1,7 @@
<apex:page standardController="GuaranteePeriodAlterationApplication__c" extensions="GuaranteePeriodAlterationController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="保修期变更申请">
<apex:page standardController="GuaranteePeriodAlterationApplication__c" extensions="GuaranteePeriodAlterationController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="保修期变更申请" lightningStylesheets="true">
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
@@ -137,7 +139,7 @@
        </apex:actionFunction>
         <apex:actionFunction name="DelConsumable" action="{!DelConsumable}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();CheckStatusAfter()">
        </apex:actionFunction>
        <apex:actionFunction name="uploadingAttachmentJs" action="{!uploadingAttachment}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();CheckStatusAfter()">
        <apex:actionFunction name="uploadingAttachmentJs" action="{!uploadingAttachmentLightning}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();CheckStatusAfter()">
        </apex:actionFunction>
        <!-- <apex:actionFunction name="returnChangePage" action="{!returnChangePage}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();CheckStatusAfter()">
        </apex:actionFunction> -->
@@ -150,6 +152,7 @@
        <apex:outputPanel id="allPanel">
            <apex:pageBlock id="allBlock" >
                <apex:pageBlock id="EDCline_1" >
                    <apex:commandButton style="display:none"/>
                    <apex:commandButton onclick="EditConsumable();"   value="编辑" style="margin-left:30px;width:180px" rerender="dummy" rendered="{!!(editAble)}"  disabled="{!IF(ambc.Change_status__c='已提交'||ambc.Change_status__c='批准'||ambc.Change_status__c='驳回',true,false)}"/>
                   
                    <apex:commandButton onclick="SorderJs();"         value="提交申请" style="margin-left:30px;width:180px" rerender="dummy" rendered="{!!(editAble )}" disabled="{!IF(ambc.Change_status__c='已提交'||ambc.Change_status__c='批准',true,false)}"/>
@@ -232,7 +235,7 @@
                            id="val1" style="width:100px"/>
                            </td>
                            <td align="right"></td>
                            <td><apex:commandButton value="保有设备搜索" style="width: 100px;" onclick="searchProductJs('0');return false;" /></td>
                            <td><apex:commandButton value="保有设备搜索" style="width: 120px;" onclick="searchProductJs('0');return false;" /></td>
                            <td><input type="button" value="清空" style="width: 100px;" onclick="ClearJs();return false;" class="btn"/></td>
                            <td/>
                        </tr>
@@ -243,7 +246,7 @@
                            <td colspan="3"/>
                         
                            <td  colspan="4">&nbsp; &nbsp;&nbsp;&nbsp;变更原因:<!-- <apex:selectList value="{!ambc.ChangeReason__c}" id="changeReason01" size="1" style="width:204px" onchange="ChangeReasonjs('{!ambc.ChangeReason__c}');"><apex:selectOptions value="{!changeReasonOpts}"   />  -->
                            <td  colspan="4" style="height:50px">&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;变更原因:<!-- <apex:selectList value="{!ambc.ChangeReason__c}" id="changeReason01" size="1" style="width:204px" onchange="ChangeReasonjs('{!ambc.ChangeReason__c}');"><apex:selectOptions value="{!changeReasonOpts}"   />  -->
                            <!-- </apex:selectList> -->
                                <apex:inputField value="{!ambc.ChangeReason__c}" style="width:200px"></apex:inputField>
                            </td>
@@ -256,7 +259,7 @@
                            <td colspan="3"/>
                            <!-- <td colspan="1"/> -->
                            <!-- <td colspan="5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;变更原因其他:<apex:inputText value="{!ambc.ChangeReason_text__c}" style="width:200px"/></td> -->
                             <td colspan="4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;安装日期:<apex:outputField value="{!ambc.WarrantyStartDate__c}" style="width:200px"/></td>
                             <td colspan="4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;安装日期:<apex:outputField value="{!ambc.WarrantyStartDate__c}" style="width:200px"/></td>
                            <!-- <td colspan="4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 保修天数:<apex:inputText value="{!ambc.WarrantyDays__c}" style="width:200px"/></td> -->
                            <!-- <td  colspan="4"/> -->
                        </tr>
@@ -268,6 +271,7 @@
                 </apex:outputPanel>
                <apex:pageBlock title="保有设备所属变更明细" id="ConsumableorderdetailsSection">
                <input type="hidden" id="allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsCount" value="{!ConsumableorderdetailsviewCount}" />
                <input type="hidden" id="allPage:allForm:allBlock:ConsumableorderdetailsSection:Id" value="{!Id}" />
                    <table class="list" border="0" cellpadding="0" cellspacing="0">
                        <tr class="headerRow">
                            <apex:variable var="v" value="" rendered="{!editAble}">
@@ -312,14 +316,14 @@
                    <apex:pageBlockButtons location="top">
                        <apex:commandButton value="附件上传"  onclick="uploadingAttachmentJs();" disabled="{!IF(ambc.Change_status__c='已提交'||ambc.Change_status__c='批准',true,false)}"/>
                    </apex:pageBlockButtons>
                    <apex:pageBlockTable value="{!attachments}" var="attachment" >
                    <apex:pageBlockTable value="{!contents}" var="attachment" >
                        
                        
                        <apex:column headerValue="标题" style="width: 33%">
                            <apex:outputField value="{!attachment.Name}"/>
                            <apex:outputField value="{!attachment.Title}"/>
                        </apex:column>
                        <apex:column headerValue="上次修改时间" style="width: 33%">
                            <apex:outputField value="{!attachment.CreatedDate}"/>
                            <apex:outputField value="{!attachment.ContentModifiedDate}"/>
                        </apex:column>
                        <apex:column headerValue="创建人" style="width: 33%">
                            <apex:outputField value="{!attachment.OwnerId}"/>
force-app/main/default/pages/AssetModifyBelongs.page
@@ -1,14 +1,16 @@
<apex:page standardController="AssetModifyBelongsChange__c" extensions="AssetModifyBelongsController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="最终用户变更申请" lightningStylesheets="true">
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
<script>
function ClearJs(){
    blockme();
    document.getElementById("allPage:allForm:allBlock:searchBlock:text1").value = "";
    document.getElementById("allPage:allForm:allBlock:searchBlock:val1").value = "";
    searchConsumableorderdetails();
}
var selectedSize = 0;
@@ -136,7 +138,7 @@
        </apex:actionFunction>
         <apex:actionFunction name="DelConsumable" action="{!DelConsumable}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();CheckStatusAfter()">
        </apex:actionFunction>
        <apex:actionFunction name="uploadingAttachmentJs" action="{!uploadingAttachment}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();CheckStatusAfter()">
        <apex:actionFunction name="uploadingAttachmentJs" action="{!uploadingAttachmentLightning}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();CheckStatusAfter()">
        </apex:actionFunction>
        <apex:actionFunction name="returnChangePage" action="{!returnChangePage}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();CheckStatusAfter()">
        </apex:actionFunction>
@@ -145,12 +147,11 @@
        </apex:actionFunction>
        <!-- <apex:actionFunction name="UnabletoEdit" action="{!UnabletoEdit}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI()">
        </apex:actionFunction> -->
        <apex:outputPanel id="allPanel">
            <apex:pageBlock id="allBlock" >
                <apex:pageBlock id="EDCline_1" >
                    <apex:commandButton style="display:none"/>
                    <apex:commandButton onclick="EditConsumable();"   value="编辑" style="margin-left:30px;width:180px" rerender="dummy" rendered="{!!(editAble)}"  disabled="{!IF(ambc.Change_status__c='已提交'||ambc.Change_status__c='批准'||ambc.Change_status__c='驳回',true,false)}"/>
                    <apex:commandButton onclick="SorderJs();"         value="提交订单" style="margin-left:30px;width:180px" rerender="dummy" rendered="{!!(editAble )}" disabled="{!IF(ambc.Change_status__c='已提交'||ambc.Change_status__c='批准',true,false)}"/>
                    <apex:commandButton onclick="saveJs();"           value="保存变更申请单" style="margin-left:30px;width:180px" rerender="dummy" rendered="{!IF((editAble) && ambc.Change_status__c !='驳回',true,false)}" />
                    <apex:commandButton onclick="saveJs();"           value="保存变更申请单" style="margin-left:30px;width:180px" rerender="dummy" rendered="{!IF(ambc.Change_status__c='驳回' && editAble,true,false)}" />
@@ -170,7 +171,7 @@
                            <col width="300px"/>
                        </colgroup>
                        <tr>
                        <tr style='line-height: 25px;'>
                            <td align="right" >申请单编码:</td>
                            <td align="left" ><apex:outputField id="OrderCode_out"  value="{!ambc.Name}" style="width:300px"/></td>
                            <td/>
@@ -178,7 +179,7 @@
                            <td align="left" ><apex:outputField id="OrderStatus_out" value="{!ambc.Change_status__c}" style="width:100px"/></td>
                            <td/>
                        </tr>
                        <tr>
                        <tr  style='line-height: 25px;'>
                            <td align="right" >原客户:</td>
                            <td align="left" ><apex:outputField value="{!ambc.rawAccount__r.Name}"/></td>
                            <td/>
@@ -187,7 +188,7 @@
                            <td/>
                        </tr> 
                        
                        <tr>
                        <tr  style='line-height: 25px;'>
                            <apex:outputPanel rendered="{!checkUser}">
                                <td align="right" >SPO表单号:</td>
                                <td align="left" ><apex:outputField value="{!ambc.SPOLink__c}"/></td>
@@ -200,7 +201,7 @@
                            </td>
                            <!-- CHAN-B9B68N Stop -->
                        </tr>
                        <tr>
                        <tr  style='line-height: 25px;'>
                            <td align="right">备注:</td>
                             <td align="left"><apex:outputField value="{!ambc.remark__c}" style="width:200px"/></td>
                            <!-- LZHU-BPJ8DF 20200513  Start -->
@@ -212,7 +213,7 @@
                            <!--  LZHU-BPJ8DF 20200513 End -->
                        </tr>
                        <!-- WLIG-BS7B4T ---20200806---update By rentongxiao---Start -->
                        <tr>
                        <tr  style='line-height: 25px;'>
                            <td align="right">共享:</td>
                             <td align="left"><apex:outputField value="{!ambc.share__c}" style="width:50px"/></td>
                            <td/>
@@ -223,8 +224,8 @@
                <apex:pageBlock id="searchBlock" rendered="{!editAble}">
                    <table>
                        <colgroup>
                            <col width="10px"/>
                            <col width="10px"/>
                            <col width="0px"/>
                            <col width="0px"/>
                            <col width="60px"/>
                            <col width="85px"/>
                            <col width="60px"/>
@@ -241,17 +242,17 @@
                            <td align="right"></td>
                            <td></td>
                            <td/>
                            <td align="right">选择条件:</td>
                            <td align="right">&nbsp;&nbsp;&nbsp;选择条件:</td>
                            <td>
                             <apex:selectList value="{!text1}" id="text1" size="1" style="width:90px"><apex:selectOptions value="{!textOpts}"/>
                            </apex:selectList>
                            </td>                           
                            <td>
                            <apex:inputText value="{!val1}"
                            id="val1" style="width:100px"/>
                            id="val1" style="width:200px"/>
                            </td>
                            <td align="left"><div id="seachdiv">合同编码精确查询<apex:inputCheckbox value="{!checkexact}" id="RowCheckbox"/></div></td>
                            <td><apex:commandButton value="保有设备搜索" style="width: 100px;" onclick="searchProductJs('0');return false;" /></td>
                            <td><apex:commandButton value="保有设备搜索" style="width: 120px;" onclick="searchProductJs('0');return false;" /></td>
                            <td><input type="button" value="清空" style="width: 100px;" onclick="ClearJs();return false;" class="btn"/></td>
                            <td/>
                        </tr>
@@ -260,14 +261,14 @@
                        </tr>
                        <tr>
                            <td colspan="3"/>
                            <td colspan="4">&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;原客户:<apex:outputField value="{!ambc.rawAccount__c}"/></td>
                            <td colspan="4">目标客户:<apex:inputField id="OEC" value="{!ambc.AccountField__c}" style="width:200px"/></td>
                            <td colspan="4" style="height:50px;">&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;原客户:<apex:outputField value="{!ambc.rawAccount__c}"/></td>
                            <td colspan="4">目标客户:<apex:inputField id="OEC" value="{!ambc.AccountField__c}" style="height:25px;width:200px"/></td>
                        </tr>
                       
                        <tr  >
                            <apex:outputPanel rendered="{!checkUser}">
                                <td colspan="3"/>
                                <td colspan="4">SPO表单号:<apex:inputText value="{!ambc.SPOLink__c}" style="width:200px"/></td>
                                <td colspan="4">&nbsp;&nbsp;&nbsp;SPO表单号:<apex:inputText value="{!ambc.SPOLink__c}" style="width:200px"/></td>
                            </apex:outputPanel>
                            <!-- CHAN-B9B68N Start -->
                            <td  colspan="4">变更原因:<!-- <apex:selectList value="{!ambc.ChangeReason__c}" id="changeReason01" size="1" style="width:204px"><apex:selectOptions value="{!changeReasonOpts}"/> --><apex:inputField value="{!ambc.ChangeReason__c}"></apex:inputField>
@@ -278,10 +279,11 @@
                        </tr>
                         <tr>
                            <td colspan="3"/>
                                <td colspan="4">&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
                                    &nbsp;备注:<apex:inputText value="{!ambc.remark__c}" style="width:200px"/></td>
                                <td colspan="4" style="height:50px;">&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    &nbsp;&nbsp;备注:<apex:inputText value="{!ambc.remark__c}" style="width:200px"/></td>
                             <!-- LZHU-BPJ8DF 20200513  Start -->
                            <td colspan="4">变更设备总数:<apex:outputField value="{!ambc.DetailCnt__c}"/></td>
                                <td colspan="4" style="height:50px;">变更设备总数:<apex:outputField value="{!ambc.DetailCnt__c}"/></td>
                            <!--  LZHU-BPJ8DF 20200513 End -->
                        </tr>
                        <!-- WLIG-BS7B4T ---20200806---update By rentongxiao---Start -->
@@ -289,7 +291,7 @@
                            <!-- 共享字段的回显 -->
                             <td colspan="3"/>
                                <td colspan="4">&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
                                    &nbsp;共享:<apex:inputCheckbox value="{!ambc.share__c}" style="width:50px"/>
                                    &nbsp;&nbsp;&nbsp;共享:<apex:inputCheckbox value="{!ambc.share__c}" style="height:20px;width:20px"/>
                                </td>
                                <td colspan="4"></td>
                        </tr>
@@ -301,6 +303,7 @@
                 </apex:outputPanel>
                <apex:pageBlock title="保有设备所属变更明细" id="ConsumableorderdetailsSection">
                <input type="hidden" id="allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsCount" value="{!ConsumableorderdetailsviewCount}" />
                <input type="hidden" id="allPage:allForm:allBlock:ConsumableorderdetailsSection:Id" value="{!Id}" />
                    <table class="list" border="0" cellpadding="0" cellspacing="0">
                        <tr class="headerRow">
                            <apex:variable var="v" value="" rendered="{!editAble}">
@@ -339,20 +342,22 @@
                    </table>
                </apex:pageBlock>
                <!-- CHAN-BC6BV2 XHL AddStart 20190522 -->
                <apex:pageBlock title="附件" id="accessory" rendered="{!isShow}">
                
                    <apex:pageBlockButtons location="top">
                        <apex:commandButton value="附件上传"  onclick="uploadingAttachmentJs();" disabled="{!IF(ambc.Change_status__c='已提交'||ambc.Change_status__c='批准',true,false)}"/>
                    </apex:pageBlockButtons>
                    <apex:pageBlockTable value="{!attachments}" var="attachment" >
                    <apex:pageBlockTable value="{!contents}" var="attachment" >
                        
                        
                        <apex:column headerValue="标题" style="width: 33%">
                            <apex:outputField value="{!attachment.Name}"/>
                            <apex:outputField value="{!attachment.Title}"/>
                        </apex:column>
                        <apex:column headerValue="上次修改时间" style="width: 33%">
                            <apex:outputField value="{!attachment.CreatedDate}"/>
                            <apex:outputField value="{!attachment.ContentModifiedDate}"/>
                        </apex:column>
                        <apex:column headerValue="创建人" style="width: 33%">
                            <apex:outputField value="{!attachment.OwnerId}"/>
@@ -365,5 +370,6 @@
        </apex:outputPanel>
    </apex:form>
<script>
</script>
</apex:page>
force-app/main/default/pages/LookupPage.page
@@ -1,10 +1,11 @@
<apex:page controller="LookupController" id="pg" showheader="false" sidebar="false"  title="{!title}" >
<apex:page controller="LookupController" id="pg" showheader="false" sidebar="false"  title="{!title}" lightningStylesheets="true">
    <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
    <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
    <apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
    <apex:includeScript value="{!URLFOR($Resource.clipboardminjs)}"/>
    <apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
    <apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/>
    <script type="text/javascript">
        //搜索跳转