19626
2023-06-30 ac0d606acaa5844bc2c6ad2242d5502b60f9be3a
修改页面和按钮
4个文件已添加
9个文件已修改
229 ■■■■■ 已修改文件
force-app/main/default/classes/lexAccountController.cls 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexLightingButtonConstant.cls 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexPCLLostReportLwcController.cls 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCBLBPNewLwc/__tests__/lexCBLBPNewLwc.test.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCBLBPNewLwc/lexCBLBPNewLwc.html 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCBLBPNewLwc/lexCBLBPNewLwc.js 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexCBLBPNewLwc/lexCBLBPNewLwc.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOTHCreate/lexOTHCreate.html 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOTHCreate/lexOTHCreate.js 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOTHCreate/lexOTHCreate.js-meta.xml 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/pages/MaintenanceProductData.page 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/lexAccountController.cls
@@ -19,6 +19,16 @@
        }
        return res;
    }
    @AuraEnabled
    public static InitData initForOTHCreateButton(String recordId){
        InitData res = new InitData();
        try {
           res.recordTypeId = Schema.SObjectType.Account_Number_of_case__c.getRecordTypeInfosByDeveloperName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_OTHER).getRecordTypeId();
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
        return res;
    }
    class InitData{
        @AuraEnabled
        public String hospitalSalesdepartmentHP;
@@ -26,5 +36,7 @@
        public String hospitalId;
        @AuraEnabled
        public String hospitalOCMCategory;
        @AuraEnabled
        public String recordTypeId;
    }
}
force-app/main/default/classes/lexLightingButtonConstant.cls
@@ -89,6 +89,8 @@
      public static final String RECORD_TYPE_NAME_BY_INQUIRY_FOLLOW_UP = '询价跟进';
      //授权申请的记录类型‘授权申请’
      public static final String RECORD_TYPE_NAME_BY_AUTHORIZATION_REQUEST = '授权申请';
      //客户-病例数的记录类型‘其他’
      public static final String RECORD_TYPE_NAME_BY_OTHER = '其他';
      //52 询价注残特殊对应的记录类型‘询价特殊对应’
      public static final String RECORD_TYPE_NAME_BY_SPECIL_APPLY_CREATE = '询价特殊对应';
      //52 询价注残特殊对应的记录类型‘注残特殊对应’
force-app/main/default/classes/lexPCLLostReportLwcController.cls
@@ -438,7 +438,10 @@
                SELECT 
                ProcessDefinition.Name,
                 (
                    SELECT StepStatus,
                    SELECT
                    Id,
                    StepStatus,
                    IsPending,
                    Comments,
                    CreatedDate,
                    Actor.Name,  
force-app/main/default/lwc/lexCBLBPNewLwc/__tests__/lexCBLBPNewLwc.test.js
New file
@@ -0,0 +1,25 @@
import { createElement } from 'lwc';
import LexCBLBPNewLwc from 'c/lexCBLBPNewLwc';
describe('c-lex-cblbp-new-lwc', () => {
    afterEach(() => {
        // The jsdom instance is shared across test cases in a single file so reset the DOM
        while (document.body.firstChild) {
            document.body.removeChild(document.body.firstChild);
        }
    });
    it('TODO: test case generated by CLI command, please fill in test logic', () => {
        // Arrange
        const element = createElement('c-lex-cblbp-new-lwc', {
            is: LexCBLBPNewLwc
        });
        // Act
        document.body.appendChild(element);
        // Assert
        // const div = element.shadowRoot.querySelector('div');
        expect(1).toBe(1);
    });
});
force-app/main/default/lwc/lexCBLBPNewLwc/lexCBLBPNewLwc.html
New file
@@ -0,0 +1,14 @@
<!--
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-06-30 10:57:52
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-06-30 10:58:11
-->
<template>
    <div class="baseHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
    </div>
</template>
force-app/main/default/lwc/lexCBLBPNewLwc/lexCBLBPNewLwc.js
New file
@@ -0,0 +1,46 @@
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import init  from '@salesforce/apex/OpportunityLightingButtonController.initForCancelReportButton';
import { updateRecord } from 'lightning/uiRecordApi';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { NavigationMixin } from 'lightning/navigation';
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
export default class LexCBLBPNewLwc extends LightningElement {
    @api recordId;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
            console.log(111);
            console.log(currentPageReference);
        if (currentPageReference) {
          const urlValue = currentPageReference.state.recordId;
          if (urlValue) {
            let str = `${urlValue}`;
            console.log("str");
            console.log(str);
            this.recordId = str;
          }
        }
    }
    connectedCallback(){
      this.CBLBPNewLwc();
    }
    CBLBPNewLwc(){
      const defaultValues = encodeDefaultFieldValues({
        ProductName__c: this.recordId,
    });
      this[NavigationMixin.Navigate]({
          type: 'standard__objectPage',
          attributes: {
              objectApiName: 'LastbuyProduct__c',
              actionName: 'new'
          },
          state: {
              nooverride: '1',
              defaultFieldValues: defaultValues
          }
      });
    }
}
force-app/main/default/lwc/lexCBLBPNewLwc/lexCBLBPNewLwc.js-meta.xml
New file
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
     <apiVersion>54.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__RecordPage</target>
        <target>lightning__AppPage</target>
        <target>lightning__HomePage</target>
        <target>lightning__RecordAction</target>
    </targets>
</LightningComponentBundle>
force-app/main/default/lwc/lexOTHCreate/lexOTHCreate.html
@@ -1,3 +1,13 @@
<!--
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-06-29 15:55:05
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-06-30 11:21:00
-->
<template>
    <div class="reportHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexOTHCreate/lexOTHCreate.js
@@ -1,3 +1,57 @@
import { LightningElement } from 'lwc';
/*
 * @Description:
 * @version:
 * @Author: chen jing wu
 * @Date: 2023-06-29 15:55:05
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-06-30 11:28:58
 */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import init  from '@salesforce/apex/lexAccountController.initForOTHCreateButton';
export default class LexOTHCreate extends LightningElement {}
export default class LexOTHCreate extends LightningElement {
    @api recordId;
    recordTypeId;
    @wire(CurrentPageReference)
    getStateParameters(currentPageReference) {
            console.log(111);
            console.log(currentPageReference);
        if (currentPageReference) {
          const urlValue = currentPageReference.state.recordId;
          if (urlValue) {
            let str = `${urlValue}`;
            console.log("str");
            console.log(str);
            this.recordId = str;
          }
        }
    }
    connectedCallback(){
        init({
            recordId: this.recordId
        }).then(result=>{
            this.recordTypeId = result.recordTypeId;
            this.OTHCreate();
        });
    }
    OTHCreate(){
        const defaultValues = encodeDefaultFieldValues({
            Account__c: this.recordId
        });
        this[NavigationMixin.Navigate]({
            type: 'standard__objectPage',
            attributes: {
                objectApiName: 'Account_Number_of_case__c',
                actionName: 'new'
            },
            state: {
                nooverride: '1',
                defaultFieldValues: defaultValues,
                RecordTypeId: this.recordTypeId
            }
        });
    }
}
force-app/main/default/lwc/lexOTHCreate/lexOTHCreate.js-meta.xml
@@ -1,5 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>57.0</apiVersion>
    <isExposed>false</isExposed>
   <apiVersion>54.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__RecordPage</target>
        <target>lightning__AppPage</target>
        <target>lightning__HomePage</target>
        <target>lightning__RecordAction</target>
    </targets>
</LightningComponentBundle>
force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-04-20 17:16:48
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-06-28 17:53:19
 * @LastEditTime: 2023-06-30 10:06:30
-->
<template>
    <template if:true={isInit}>
@@ -180,7 +180,9 @@
                                    <div class="mainTitle" style="padding: 10px 3px;font-weight: bold;font-size: large">失单报告查看页面</div>
                                </lightning-layout-item>
                                    <lightning-layout-item alignment-bump="left">
                                        <template if:false={submitFlag}>
                                        <lightning-button label="提交" onclick={submitJs}></lightning-button>
                                        </template>
                                        <lightning-button name="编辑" label="编辑" onclick={editJs}></lightning-button>
                                        <lightning-button label="返回询价" onclick={cancel}></lightning-button>
                                    </lightning-layout-item>
@@ -345,7 +347,9 @@
                                <lightning-layout style="margin-top: 20px;">
                                    <div class="slds-align_absolute-center">
                                        <lightning-layout-item size="12">
                                            <template if:false={submitFlag}>
                                            <lightning-button label="提交" onclick={submitJs}></lightning-button>
                                            </template>
                                            <lightning-button name="编辑" label="编辑" onclick={editJs}></lightning-button>
                                            <lightning-button label="返回询价" onclick={cancel}></lightning-button>
                                        </lightning-layout-item>
@@ -360,7 +364,7 @@
                                        <div class="mainTitle" style="padding: 10px 3px;font-weight: bold;font-size: large">批准历史</div>
                                    </lightning-layout-item>
                                    <lightning-layout-item alignment-bump="left">
                                        <lightning-button label="撤回批准请求"></lightning-button>
                                        <lightning-button label="撤回批准请求" onclick={onApproveChange}></lightning-button>
                                    </lightning-layout-item>
                                </lightning-layout>
                                <lightning-layout>
@@ -379,9 +383,11 @@
                                            <template for:each={LostReport.approvalHistorys} for:item="approvalHistory" for:index="j">
                                                <tr class="inputRows" key={approvalHistory.Id}>
                                                    <td>
                                                        <a onclick={test}>重新分配</a>
                                                        <template if:true={approvalHistory.IsPending}>
                                                            <a onclick={onApproveChange}>重新分配</a>
                                                        <label>|</label>
                                                        <a onclick={test}>批准/拒绝</a>
                                                            <a onclick={onApproveChange}>批准/拒绝</a>
                                                        </template>
                                                    </td>
                                                    <td>
                                                        <div>{approvalHistory.CreatedDate}</div>
force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js
@@ -4,7 +4,7 @@
 * @Author: chen jing wu
 * @Date: 2023-04-20 15:04:03
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-06-28 17:29:47
 * @LastEditTime: 2023-06-30 09:55:38
 */
const columns2=[
    { label: '--无--', value: '' },
@@ -251,6 +251,8 @@
                console.log(this.LostReport);
                for(var i=0;i < result.approvalHistorys.length;i++){
                    console.log('123');
                    var date = new Date(result.approvalHistorys[i].CreatedDate);
                    result.approvalHistorys[i].CreatedDate = date.toLocaleString();
                    this.LostReport.approvalHistorys.push(JSON.parse(JSON.stringify(result.approvalHistorys[i])));
                    console.log('321');
                }
@@ -263,6 +265,15 @@
            console.log(error);
        });
    }
    onApproveChange(event){
        this[NavigationMixin.Navigate]({
            type: 'standard__recordPage',
            attributes: {
                recordId: this.LostReport.approvalHistorys[0].Id,
                actionName: 'view'
            }
        });
    }
    
    deleteBrandJs(event){
force-app/main/default/pages/MaintenanceProductData.page
@@ -921,6 +921,11 @@
                </tr>
                </apex:outputPanel>
                <tr>
                    <td>
                        <div>&nbsp;</div>
                    </td>
                </tr>
                <tr>
                    <td align="right" style="width: 100px;">产品名称</td>
                    <!-- ProductDateSearch -->
                    <td><apex:inputText id="CateName" value="{!searchCateName}" style="width:100px"/></td>
@@ -1250,7 +1255,7 @@
                                        <apex:variable var="edv" value="" rendered="{!editAble}" id="edvariable">
                                            <apex:outputPanel rendered="{!(edc.size==1)}" layout="none">
                                                <apex:outputPanel layout="none" rendered="{!IF((RecordTypeName = 'GuranteeMain'&& !contains(GuranteeMainProductService,edc[0]))||RecordTypeName != 'GuranteeMain',true , false)}">
                                                    <apex:InputField value="{!aa.mpded[edc[0]]}"  id="edtheValue" style="max-width: 120px;"/>
                                                    <apex:InputField value="{!aa.mpded[edc[0]]}"  id="edtheValue" style="max-width: 120px;min-width: 10px"/>
                                                </apex:outputPanel>
                                                <apex:outputPanel layout="none" rendered="{!IF((RecordTypeName = 'GuranteeMain'&& !contains(GuranteeMainProductService,edc[0]))||RecordTypeName != 'GuranteeMain',false , true)}">
                                                    <apex:outputField value="{!aa.mpded[edc[0]]}"/>