| | |
| | | { |
| | | "target-org": "OlympusStageEnv" |
| | | "target-org": "OlympusProd" |
| | | } |
| | |
| | | <aura:component controller="CreateTargetCmp" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction,forceCommunity:availableForAllPageTypes" access="global" > |
| | | <aura:component |
| | | controller="CreateTargetCmp" |
| | | implements="forceCommunity:availableForAllPageTypes,force:hasRecordId" |
| | | access="global" |
| | | > |
| | | <aura:handler name="init" value="{!this}" action="{!c.doInit}"/> |
| | | <aura:attribute name="recordId" type="Id" /> |
| | | <aura:attribute name="hospital" type="string" default=""/> |
| | |
| | | <aura:attribute name="OTHAmount" type="string" default="0.00"/> |
| | | <aura:attribute name="OCMTerm" type="string" default=""/> |
| | | <aura:attribute name="button_text" type="string" default="新建"/> |
| | | <aura:handler name="change" value="{!v.record.Agency_Hospital__c}" action="{!c.hosChange}"/> |
| | | <aura:handler |
| | | name="change" |
| | | value="{!v.record.Agency_Hospital__c}" |
| | | action="{!c.hosChange}" |
| | | /> |
| | | <aura:attribute name="hospitalList" type="sobject[]" /> |
| | | <aura:attribute name="record" type="Agency_Opportunity__c" default="{'sobjectType':'Agency_Opportunity__c'}"/> |
| | | <aura:handler name="change" value="{!v.recordET.Product_Category1__c}" action="{!c.productcategoryETChange1}"/> |
| | | <aura:handler name="change" value="{!v.recordET.Product_Category2__c}" action="{!c.productcategoryETChange2}"/> |
| | | <aura:handler name="change" value="{!v.recordET.Product_Category3__c}" action="{!c.productcategoryETChange3}"/> |
| | | <aura:attribute |
| | | name="record" |
| | | type="Agency_Opportunity__c" |
| | | default="{'sobjectType':'Agency_Opportunity__c'}" |
| | | /> |
| | | <aura:handler |
| | | name="change" |
| | | value="{!v.recordET.Product_Category1__c}" |
| | | action="{!c.productcategoryETChange1}" |
| | | /> |
| | | <aura:handler |
| | | name="change" |
| | | value="{!v.recordET.Product_Category2__c}" |
| | | action="{!c.productcategoryETChange2}" |
| | | /> |
| | | <aura:handler |
| | | name="change" |
| | | value="{!v.recordET.Product_Category3__c}" |
| | | action="{!c.productcategoryETChange3}" |
| | | /> |
| | | |
| | | |
| | | <aura:handler name="change" value="{!v.recordBF.Product_Category1__c}" action="{!c.productcategoryBFChange1}"/> |
| | | <aura:handler name="change" value="{!v.recordBF.Product_Category2__c}" action="{!c.productcategoryBFChange2}"/> |
| | | <aura:handler name="change" value="{!v.recordBF.Product_Category3__c}" action="{!c.productcategoryBFChange3}"/> |
| | | <aura:handler name="change" value="{!v.recordGS.Product_Category1__c}" action="{!c.productcategoryGSChange1}"/> |
| | | <aura:handler name="change" value="{!v.recordGS.Product_Category2__c}" action="{!c.productcategoryGSChange2}"/> |
| | | <aura:handler name="change" value="{!v.recordGS.Product_Category3__c}" action="{!c.productcategoryGSChange3}"/> |
| | | <aura:handler name="change" value="{!v.recordURO.Product_Category1__c}" action="{!c.productcategoryUROChange1}"/> |
| | | <aura:handler name="change" value="{!v.recordURO.Product_Category2__c}" action="{!c.productcategoryUROChange2}"/> |
| | | <aura:handler name="change" value="{!v.recordURO.Product_Category3__c}" action="{!c.productcategoryUROChange3}"/> |
| | | <aura:handler name="change" value="{!v.recordGYN.Product_Category1__c}" action="{!c.productcategoryGYNChange1}"/> |
| | | <aura:handler name="change" value="{!v.recordGYN.Product_Category2__c}" action="{!c.productcategoryGYNChange2}"/> |
| | | <aura:handler name="change" value="{!v.recordGYN.Product_Category3__c}" action="{!c.productcategoryGYNChange3}"/> |
| | | <aura:handler name="change" value="{!v.recordENT.Product_Category1__c}" action="{!c.productcategoryENTChange1}"/> |
| | | <aura:handler name="change" value="{!v.recordENT.Product_Category2__c}" action="{!c.productcategoryENTChange2}"/> |
| | | <aura:handler name="change" value="{!v.recordENT.Product_Category3__c}" action="{!c.productcategoryENTChange3}"/> |
| | | <aura:handler name="change" value="{!v.recordOTH.Product_Category1__c}" action="{!c.productcategoryOTHChange1}"/> |
| | | <aura:handler name="change" value="{!v.recordOTH.Product_Category2__c}" action="{!c.productcategoryOTHChange2}"/> |
| | | <aura:handler name="change" value="{!v.recordOTH.Product_Category3__c}" action="{!c.productcategoryOTHChange3}"/> |
| | | <aura:handler |
| | | name="change" |
| | | value="{!v.recordBF.Product_Category1__c}" |
| | | action="{!c.productcategoryBFChange1}" |
| | | /> |
| | | <aura:handler |
| | | name="change" |
| | | value="{!v.recordBF.Product_Category2__c}" |
| | | action="{!c.productcategoryBFChange2}" |
| | | /> |
| | | <aura:handler |
| | | name="change" |
| | | value="{!v.recordBF.Product_Category3__c}" |
| | | action="{!c.productcategoryBFChange3}" |
| | | /> |
| | | <aura:handler |
| | | name="change" |
| | | value="{!v.recordGS.Product_Category1__c}" |
| | | action="{!c.productcategoryGSChange1}" |
| | | /> |
| | | <aura:handler |
| | | name="change" |
| | | value="{!v.recordGS.Product_Category2__c}" |
| | | action="{!c.productcategoryGSChange2}" |
| | | /> |
| | | <aura:handler |
| | | name="change" |
| | | value="{!v.recordGS.Product_Category3__c}" |
| | | action="{!c.productcategoryGSChange3}" |
| | | /> |
| | | <aura:handler |
| | | name="change" |
| | | value="{!v.recordURO.Product_Category1__c}" |
| | | action="{!c.productcategoryUROChange1}" |
| | | /> |
| | | <aura:handler |
| | | name="change" |
| | | value="{!v.recordURO.Product_Category2__c}" |
| | | action="{!c.productcategoryUROChange2}" |
| | | /> |
| | | <aura:handler |
| | | name="change" |
| | | value="{!v.recordURO.Product_Category3__c}" |
| | | action="{!c.productcategoryUROChange3}" |
| | | /> |
| | | <aura:handler |
| | | name="change" |
| | | value="{!v.recordGYN.Product_Category1__c}" |
| | | action="{!c.productcategoryGYNChange1}" |
| | | /> |
| | | <aura:handler |
| | | name="change" |
| | | value="{!v.recordGYN.Product_Category2__c}" |
| | | action="{!c.productcategoryGYNChange2}" |
| | | /> |
| | | <aura:handler |
| | | name="change" |
| | | value="{!v.recordGYN.Product_Category3__c}" |
| | | action="{!c.productcategoryGYNChange3}" |
| | | /> |
| | | <aura:handler |
| | | name="change" |
| | | value="{!v.recordENT.Product_Category1__c}" |
| | | action="{!c.productcategoryENTChange1}" |
| | | /> |
| | | <aura:handler |
| | | name="change" |
| | | value="{!v.recordENT.Product_Category2__c}" |
| | | action="{!c.productcategoryENTChange2}" |
| | | /> |
| | | <aura:handler |
| | | name="change" |
| | | value="{!v.recordENT.Product_Category3__c}" |
| | | action="{!c.productcategoryENTChange3}" |
| | | /> |
| | | <aura:handler |
| | | name="change" |
| | | value="{!v.recordOTH.Product_Category1__c}" |
| | | action="{!c.productcategoryOTHChange1}" |
| | | /> |
| | | <aura:handler |
| | | name="change" |
| | | value="{!v.recordOTH.Product_Category2__c}" |
| | | action="{!c.productcategoryOTHChange2}" |
| | | /> |
| | | <aura:handler |
| | | name="change" |
| | | value="{!v.recordOTH.Product_Category3__c}" |
| | | action="{!c.productcategoryOTHChange3}" |
| | | /> |
| | | <div class="button_area"> |
| | | <ui:button label="{!v.button_text}" press="{!c.toggle_report}"/> |
| | | </div> |
| | | <div aura:id="modal_window" role="dialog" tabindex="-1" class="disp_none slds-modal slds-fade-in-open slds-modal--large" aria-labelledby="headerTarget"> |
| | | <div |
| | | aura:id="modal_window" |
| | | role="dialog" |
| | | tabindex="-1" |
| | | class="disp_none slds-modal slds-fade-in-open slds-modal--large" |
| | | aria-labelledby="headerTarget" |
| | | > |
| | | <div class="slds-modal__container"> |
| | | <div class="slds-modal__header"> |
| | | <button class="slds-button slds-modal__close slds-button--icon-inverse" title="Close" onclick="{!c.toggle_report}"> |
| | | <lightning:icon iconName="utility:close" size="medium" alternative-text="close" variant="inverse"/> |
| | | <button |
| | | class="slds-button slds-modal__close slds-button--icon-inverse" |
| | | title="Close" |
| | | onclick="{!c.toggle_report}" |
| | | > |
| | | <lightning:icon |
| | | class="close_icn" |
| | | iconName="utility:close" |
| | | size="medium" |
| | | alternativeText="Indicates approval" |
| | | /> |
| | | <span class="slds-assistive-text">Close</span> |
| | | </button> |
| | | <h2 id="headerTarget" class="slds-text-heading--medium">目标({!v.OCMTerm})</h2> |
| | | <h2 id="headerTarget" class="slds-text-heading--medium"> |
| | | 目标({!v.OCMTerm}) |
| | | </h2> |
| | | </div> |
| | | <div class="slds-modal__content slds-grow slds-p-around--medium"> |
| | | <div class="slds-box slds-theme--shade "> |
| | |
| | | <div class="slds-form-element__group"> |
| | | <div class="slds-form-element__row"> |
| | | <div class="slds-form-element slds-size--1-of-2"> |
| | | <label class="slds-form-element__label" for="input-hos">医院</label> |
| | | <!-- <force:inputField value="{!v.record.Agency_Hospital__c}" aura:id="input-hos"/> --> |
| | | <lightning:recordEditForm objectApiName="Agency_Opportunity__c"> |
| | | <lightning:inputField variant="label-hidden" fieldName="Agency_Hospital__c" value="{!v.record.Agency_Hospital__c}" aura:id="input-hos"/> |
| | | </lightning:recordEditForm> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >医院</label |
| | | > |
| | | <force:inputField |
| | | value="{!v.record.Agency_Hospital__c}" |
| | | aura:id="input-hos" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <!-- <h4 class="slds-section__title">访问目标</h4> |
| | |
| | | <h4 class="slds-section__title">产品目标</h4> |
| | | <div class="slds-form-element__row"> |
| | | <div class="slds-size--1-of-7 slds-grid--align-center"> |
| | | <div style="margin-top: 32px;">消化科</div> |
| | | <div style="margin-top: 32px">消化科</div> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">产品区分1</label> |
| | | <ui:inputSelect aura:id="select_GI1" class="slds-select" change="{!c.productcategoryGIChange1}"/> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >产品区分1</label |
| | | > |
| | | <ui:inputSelect |
| | | aura:id="select_GI1" |
| | | class="slds-select" |
| | | change="{!c.productcategoryGIChange1}" |
| | | /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">金额目标(不含税)</label> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >金额目标(不含税)</label |
| | | > |
| | | <ui:inputText aura:id="select_GI4_1" class="slds-select"/> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">产品区分2</label> |
| | | <ui:inputSelect aura:id="select_GI2" class="slds-select" change="{!c.productcategoryGIChange2}"/> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >产品区分2</label |
| | | > |
| | | <ui:inputSelect |
| | | aura:id="select_GI2" |
| | | class="slds-select" |
| | | change="{!c.productcategoryGIChange2}" |
| | | /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">金额目标(不含税)</label> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >金额目标(不含税)</label |
| | | > |
| | | <ui:inputText aura:id="select_GI4_2" class="slds-select"/> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">产品区分3</label> |
| | | <ui:inputSelect aura:id="select_GI3" class="slds-select" change="{!c.productcategoryGIChange3}"/> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >产品区分3</label |
| | | > |
| | | <ui:inputSelect |
| | | aura:id="select_GI3" |
| | | class="slds-select" |
| | | change="{!c.productcategoryGIChange3}" |
| | | /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">金额目标(不含税)</label> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >金额目标(不含税)</label |
| | | > |
| | | <ui:inputText aura:id="select_GI4_3" class="slds-select"/> |
| | | </div> |
| | | </div> |
| | | <div class="slds-form-element__row"> |
| | | <div class="slds-size--1-of-7 slds-grid--align-center"> |
| | | <div style="margin-top: 32px;">ET耗材</div> |
| | | <div style="margin-top: 32px">ET耗材</div> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">产品区分1</label> |
| | | <ui:inputSelect aura:id="select_ET1" class="slds-select" change="{!c.productcategoryETChange1}"/> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >产品区分1</label |
| | | > |
| | | <ui:inputSelect |
| | | aura:id="select_ET1" |
| | | class="slds-select" |
| | | change="{!c.productcategoryETChange1}" |
| | | /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">金额目标(不含税)</label> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >金额目标(不含税)</label |
| | | > |
| | | <ui:inputText aura:id="select_ET4_1" class="slds-select"/> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">产品区分2</label> |
| | | <ui:inputSelect aura:id="select_ET2" class="slds-select" change="{!c.productcategoryETChange2}"/> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >产品区分2</label |
| | | > |
| | | <ui:inputSelect |
| | | aura:id="select_ET2" |
| | | class="slds-select" |
| | | change="{!c.productcategoryETChange2}" |
| | | /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">金额目标(不含税)</label> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >金额目标(不含税)</label |
| | | > |
| | | <ui:inputText aura:id="select_ET4_2" class="slds-select"/> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">产品区分3</label> |
| | | <ui:inputSelect aura:id="select_ET3" class="slds-select" change="{!c.productcategoryETChange3}"/> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >产品区分3</label |
| | | > |
| | | <ui:inputSelect |
| | | aura:id="select_ET3" |
| | | class="slds-select" |
| | | change="{!c.productcategoryETChange3}" |
| | | /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">金额目标(不含税)</label> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >金额目标(不含税)</label |
| | | > |
| | | <ui:inputText aura:id="select_ET4_3" class="slds-select" /> |
| | | </div> |
| | | </div> |
| | | <div class="slds-form-element__row"> |
| | | <div class="slds-size--1-of-7 slds-grid--align-center"> |
| | | <div style="margin-top: 32px;">呼吸科</div> |
| | | <div style="margin-top: 32px">呼吸科</div> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">产品区分1</label> |
| | | <ui:inputSelect aura:id="select_BF1" class="slds-select" change="{!c.productcategoryBFChange1}"/> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >产品区分1</label |
| | | > |
| | | <ui:inputSelect |
| | | aura:id="select_BF1" |
| | | class="slds-select" |
| | | change="{!c.productcategoryBFChange1}" |
| | | /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">金额目标(不含税)</label> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >金额目标(不含税)</label |
| | | > |
| | | <ui:inputText aura:id="select_BF4_1" class="slds-select" /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">产品区分2</label> |
| | | <ui:inputSelect aura:id="select_BF2" class="slds-select" change="{!c.productcategoryBFChange2}"/> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >产品区分2</label |
| | | > |
| | | <ui:inputSelect |
| | | aura:id="select_BF2" |
| | | class="slds-select" |
| | | change="{!c.productcategoryBFChange2}" |
| | | /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">金额目标(不含税)</label> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >金额目标(不含税)</label |
| | | > |
| | | <ui:inputText aura:id="select_BF4_2" class="slds-select" /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">产品区分3</label> |
| | | <ui:inputSelect aura:id="select_BF3" class="slds-select" change="{!c.productcategoryBFChange3}"/> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >产品区分3</label |
| | | > |
| | | <ui:inputSelect |
| | | aura:id="select_BF3" |
| | | class="slds-select" |
| | | change="{!c.productcategoryBFChange3}" |
| | | /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">金额目标(不含税)</label> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >金额目标(不含税)</label |
| | | > |
| | | <ui:inputText aura:id="select_BF4_3" class="slds-select" /> |
| | | </div> |
| | | </div> |
| | | <div class="slds-form-element__row"> |
| | | <div class="slds-size--1-of-7 slds-grid--align-center"> |
| | | <div style="margin-top: 32px;">普外科</div> |
| | | <div style="margin-top: 32px">普外科</div> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">产品区分1</label> |
| | | <ui:inputSelect aura:id="select_GS1" class="slds-select" change="{!c.productcategoryGSChange1}"/> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >产品区分1</label |
| | | > |
| | | <ui:inputSelect |
| | | aura:id="select_GS1" |
| | | class="slds-select" |
| | | change="{!c.productcategoryGSChange1}" |
| | | /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">金额目标(不含税)</label> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >金额目标(不含税)</label |
| | | > |
| | | <ui:inputText aura:id="select_GS4_1" class="slds-select" /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">产品区分2</label> |
| | | <ui:inputSelect aura:id="select_GS2" class="slds-select" change="{!c.productcategoryGSChange2}"/> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >产品区分2</label |
| | | > |
| | | <ui:inputSelect |
| | | aura:id="select_GS2" |
| | | class="slds-select" |
| | | change="{!c.productcategoryGSChange2}" |
| | | /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">金额目标(不含税)</label> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >金额目标(不含税)</label |
| | | > |
| | | <ui:inputText aura:id="select_GS4_2" class="slds-select" /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">产品区分3</label> |
| | | <ui:inputSelect aura:id="select_GS3" class="slds-select" change="{!c.productcategoryGSChange3}"/> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >产品区分3</label |
| | | > |
| | | <ui:inputSelect |
| | | aura:id="select_GS3" |
| | | class="slds-select" |
| | | change="{!c.productcategoryGSChange3}" |
| | | /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">金额目标(不含税)</label> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >金额目标(不含税)</label |
| | | > |
| | | <ui:inputText aura:id="select_GS4_3" class="slds-select" /> |
| | | </div> |
| | | </div> |
| | | <div class="slds-form-element__row"> |
| | | <div class="slds-size--1-of-7 slds-grid--align-center"> |
| | | <div style="margin-top: 32px;">泌尿科</div> |
| | | <div style="margin-top: 32px">泌尿科</div> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">产品区分1</label> |
| | | <ui:inputSelect aura:id="select_URO1" class="slds-select" change="{!c.productcategoryUROChange1}"/> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >产品区分1</label |
| | | > |
| | | <ui:inputSelect |
| | | aura:id="select_URO1" |
| | | class="slds-select" |
| | | change="{!c.productcategoryUROChange1}" |
| | | /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">金额目标(不含税)</label> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >金额目标(不含税)</label |
| | | > |
| | | <ui:inputText aura:id="select_URO4_1" class="slds-select" /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">产品区分2</label> |
| | | <ui:inputSelect aura:id="select_URO2" class="slds-select" change="{!c.productcategoryUROChange2}"/> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >产品区分2</label |
| | | > |
| | | <ui:inputSelect |
| | | aura:id="select_URO2" |
| | | class="slds-select" |
| | | change="{!c.productcategoryUROChange2}" |
| | | /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">金额目标(不含税)</label> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >金额目标(不含税)</label |
| | | > |
| | | <ui:inputText aura:id="select_URO4_2" class="slds-select" /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">产品区分3</label> |
| | | <ui:inputSelect aura:id="select_URO3" class="slds-select" change="{!c.productcategoryUROChange3}"/> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >产品区分3</label |
| | | > |
| | | <ui:inputSelect |
| | | aura:id="select_URO3" |
| | | class="slds-select" |
| | | change="{!c.productcategoryUROChange3}" |
| | | /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">金额目标(不含税)</label> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >金额目标(不含税)</label |
| | | > |
| | | <ui:inputText aura:id="select_URO4_3" class="slds-select" /> |
| | | </div> |
| | | </div> |
| | | <div class="slds-form-element__row"> |
| | | <div class="slds-size--1-of-7 slds-grid--align-center"> |
| | | <div style="margin-top: 32px;">妇科</div> |
| | | <div style="margin-top: 32px">妇科</div> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">产品区分1</label> |
| | | <ui:inputSelect aura:id="select_GYN1" class="slds-select" change="{!c.productcategoryGYNChange1}"/> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >产品区分1</label |
| | | > |
| | | <ui:inputSelect |
| | | aura:id="select_GYN1" |
| | | class="slds-select" |
| | | change="{!c.productcategoryGYNChange1}" |
| | | /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">金额目标(不含税)</label> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >金额目标(不含税)</label |
| | | > |
| | | <ui:inputText aura:id="select_GYN4_1" class="slds-select" /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">产品区分2</label> |
| | | <ui:inputSelect aura:id="select_GYN2" class="slds-select" change="{!c.productcategoryGYNChange2}"/> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >产品区分2</label |
| | | > |
| | | <ui:inputSelect |
| | | aura:id="select_GYN2" |
| | | class="slds-select" |
| | | change="{!c.productcategoryGYNChange2}" |
| | | /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">金额目标(不含税)</label> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >金额目标(不含税)</label |
| | | > |
| | | <ui:inputText aura:id="select_GYN4_2" class="slds-select" /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">产品区分3</label> |
| | | <ui:inputSelect aura:id="select_GYN3" class="slds-select" change="{!c.productcategoryGYNChange3}"/> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >产品区分3</label |
| | | > |
| | | <ui:inputSelect |
| | | aura:id="select_GYN3" |
| | | class="slds-select" |
| | | change="{!c.productcategoryGYNChange3}" |
| | | /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">金额目标(不含税)</label> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >金额目标(不含税)</label |
| | | > |
| | | <ui:inputText aura:id="select_GYN4_3" class="slds-select" /> |
| | | </div> |
| | | </div> |
| | | <div class="slds-form-element__row"> |
| | | <div class="slds-size--1-of-7 slds-grid--align-center"> |
| | | <div style="margin-top: 32px;">耳鼻喉科</div> |
| | | <div style="margin-top: 32px">耳鼻喉科</div> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">产品区分1</label> |
| | | <ui:inputSelect aura:id="select_ENT1" class="slds-select" change="{!c.productcategoryENTChange1}"/> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >产品区分1</label |
| | | > |
| | | <ui:inputSelect |
| | | aura:id="select_ENT1" |
| | | class="slds-select" |
| | | change="{!c.productcategoryENTChange1}" |
| | | /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">金额目标(不含税)</label> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >金额目标(不含税)</label |
| | | > |
| | | <ui:inputText aura:id="select_ENT4_1" class="slds-select" /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">产品区分2</label> |
| | | <ui:inputSelect aura:id="select_ENT2" class="slds-select" change="{!c.productcategoryENTChange2}"/> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >产品区分2</label |
| | | > |
| | | <ui:inputSelect |
| | | aura:id="select_ENT2" |
| | | class="slds-select" |
| | | change="{!c.productcategoryENTChange2}" |
| | | /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">金额目标(不含税)</label> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >金额目标(不含税)</label |
| | | > |
| | | <ui:inputText aura:id="select_ENT4_2" class="slds-select" /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">产品区分3</label> |
| | | <ui:inputSelect aura:id="select_ENT3" class="slds-select" change="{!c.productcategoryENTChange3}"/> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >产品区分3</label |
| | | > |
| | | <ui:inputSelect |
| | | aura:id="select_ENT3" |
| | | class="slds-select" |
| | | change="{!c.productcategoryENTChange3}" |
| | | /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">金额目标(不含税)</label> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >金额目标(不含税)</label |
| | | > |
| | | <ui:inputText aura:id="select_ENT4_3" class="slds-select" /> |
| | | </div> |
| | | </div> |
| | | <div class="slds-form-element__row"> |
| | | <div class="slds-size--1-of-7 slds-grid--align-center"> |
| | | <div style="margin-top: 32px;">其他</div> |
| | | <div style="margin-top: 32px">其他</div> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">产品区分1</label> |
| | | <ui:inputSelect aura:id="select_OTH1" class="slds-select" change="{!c.productcategoryOTHChange1}"/> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >产品区分1</label |
| | | > |
| | | <ui:inputSelect |
| | | aura:id="select_OTH1" |
| | | class="slds-select" |
| | | change="{!c.productcategoryOTHChange1}" |
| | | /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">金额目标(不含税)</label> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >金额目标(不含税)</label |
| | | > |
| | | <ui:inputText aura:id="select_OTH4_1" class="slds-select" /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">产品区分2</label> |
| | | <ui:inputSelect aura:id="select_OTH2" class="slds-select" change="{!c.productcategoryOTHChange2}"/> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >产品区分2</label |
| | | > |
| | | <ui:inputSelect |
| | | aura:id="select_OTH2" |
| | | class="slds-select" |
| | | change="{!c.productcategoryOTHChange2}" |
| | | /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">金额目标(不含税)</label> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >金额目标(不含税)</label |
| | | > |
| | | <ui:inputText aura:id="select_OTH4_2" class="slds-select" /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">产品区分3</label> |
| | | <ui:inputSelect aura:id="select_OTH3" class="slds-select" change="{!c.productcategoryOTHChange3}"/> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >产品区分3</label |
| | | > |
| | | <ui:inputSelect |
| | | aura:id="select_OTH3" |
| | | class="slds-select" |
| | | change="{!c.productcategoryOTHChange3}" |
| | | /> |
| | | </div> |
| | | <div class="slds-form-element slds-size--1-of-7"> |
| | | <label class="slds-form-element__label" for="input-hos">金额目标(不含税)</label> |
| | | <label class="slds-form-element__label" for="input-hos" |
| | | >金额目标(不含税)</label |
| | | > |
| | | <ui:inputText aura:id="select_OTH4_3" class="slds-select" /> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="slds-modal__footer slds-grid slds-grid--align-spread"> |
| | | <div class="slds-order--1" /> |
| | | <ui:button aura:id="save_button" label="保存" class="slds-button slds-button--brand slds-order--2" press="{!c.createTarget}"/> |
| | | <ui:button |
| | | aura:id="save_button" |
| | | label="保存" |
| | | class="slds-button slds-button--brand slds-order--2" |
| | | press="{!c.createTarget}" |
| | | /> |
| | | <div class="slds-order--3" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div aura:id="modal_bg" class="disp_none slds-backdrop slds-backdrop--open"></div> |
| | | <div |
| | | aura:id="modal_bg" |
| | | class="disp_none slds-backdrop slds-backdrop--open" |
| | | ></div> |
| | | </aura:component> |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>42.0</apiVersion> |
| | | <apiVersion>39.0</apiVersion> |
| | | <description>A Lightning Component Bundle</description> |
| | | </AuraDefinitionBundle> |
| | |
| | | .THIS.disp_none { |
| | | display: none; |
| | | } |
| | | .THIS select { |
| | | --lwc-lineHeightButton:36px; |
| | | --lwc-heightInput:36px; |
| | | min-height: 0px !important; |
| | | height: 36px !important; |
| | | } |
| | |
| | | component.set("v.button_text", "编辑"); |
| | | var recordId = component.get("v.recordId"); |
| | | var action = component.get("c.getHospital"); |
| | | action.setParams({"recordId": recordId}); |
| | | action.setParams({ recordId: recordId }); |
| | | action.setCallback(this, function(response) { |
| | | var state = response.getState(); |
| | | console.log("state1:"+state); |
| | | if(state === "SUCCESS") { |
| | | var ah = response.getReturnValue(); |
| | | var select_ah = ah.Id; |
| | | var select_ah_name = ah.Name; |
| | | // component.set('v.record.Agency_Hospital__c', select_ah); |
| | | //add by Deloitte 2023-6-8 |
| | | let agency = component.get("v.record"); |
| | | agency.Agency_Hospital__c = select_ah; |
| | | // component.set("v.record", agency); |
| | | |
| | | component.set("v.record.Agency_Hospital__c", select_ah); |
| | | // alert(JSON.stringify(component.find('input-hos').get("v.body")[0].get('v.values'))); |
| | | if ($A.get("$Browser.formFactor") == 'DESKTOP') { |
| | | console.log("flag1"); |
| | | var values = [{ |
| | | type: 'Agency_Hospital_Link__c', |
| | | if ($A.get("$Browser.formFactor") == "DESKTOP") { |
| | | var values = [ |
| | | { |
| | | type: "Agency_Hospital_Link__c", |
| | | id: select_ah, |
| | | label: select_ah_name, |
| | | icon : { |
| | | url:'/img/icon/t4v35/custom/custom24_120.png', |
| | | backgroundColor:'dc71d1', |
| | | alt:'Agency_Hospital_Link__c' |
| | | url: "/img/icon/t4v35/custom/custom24_120.png", |
| | | backgroundColor: "dc71d1", |
| | | alt: "Agency_Hospital_Link__c" |
| | | } |
| | | }]; |
| | | // component.find('input-hos').get("v.body")[0].set('v.values', values); |
| | | //add by Deloitte 2023-6-8 |
| | | if(component.find('input-hos').get("v.body") && component.find('input-hos').get("v.body").length>0){ |
| | | component.find('input-hos').get("v.body")[0].set('v.values', values); |
| | | } |
| | | ]; |
| | | component |
| | | .find("input-hos") |
| | | .get("v.body")[0] |
| | | .set("v.values", values); |
| | | } else { |
| | | // component.find('input-hos').get("v.body")[0].set('v.selectedLabel', select_ah_name); |
| | | //add by Deloitte 2023-6-8 |
| | | if(component.find('input-hos').get("v.body") && component.find('input-hos').get("v.body").length>0){ |
| | | component.find('input-hos').get("v.body")[0].set('v.selectedLabel', select_ah_name); |
| | | component |
| | | .find("input-hos") |
| | | .get("v.body")[0] |
| | | .set("v.selectedLabel", select_ah_name); |
| | | } |
| | | } |
| | | |
| | | } else if (state === "ERROR") { |
| | | var errors = response.getError(); |
| | | var toastEvent = $A.get("e.force:showToast"); |
| | | toastEvent.setParams({ |
| | | "title": "错误", |
| | | "type":"error", |
| | | "message": errors[0].message |
| | | title: "错误", |
| | | type: "error", |
| | | message: errors[0].message |
| | | }); |
| | | toastEvent.fire(); |
| | | |
| | | } |
| | | }); |
| | | $A.enqueueAction(action); |
| | |
| | | var action = component.get("c.getProductList"); |
| | | action.setCallback(this, function(response) { |
| | | var state = response.getState(); |
| | | console.log("state2:"+state); |
| | | if(state === "SUCCESS") { |
| | | var opts = response.getReturnValue(); |
| | | // alert(JSON.stringify(opts["GI"])); |
| | | component.find("select_GI1").set("v.options", JSON.parse(JSON.stringify(opts["GI"]))); |
| | | component.find("select_GI2").set("v.options", JSON.parse(JSON.stringify(opts["GI"]))); |
| | | component.find("select_GI3").set("v.options", JSON.parse(JSON.stringify(opts["GI"]))); |
| | | component |
| | | .find("select_GI1") |
| | | .set("v.options", JSON.parse(JSON.stringify(opts["GI"]))); |
| | | component |
| | | .find("select_GI2") |
| | | .set("v.options", JSON.parse(JSON.stringify(opts["GI"]))); |
| | | component |
| | | .find("select_GI3") |
| | | .set("v.options", JSON.parse(JSON.stringify(opts["GI"]))); |
| | | |
| | | component.find("select_GS1").set("v.options", JSON.parse(JSON.stringify(opts["GS"]))); |
| | | component.find("select_GS2").set("v.options", JSON.parse(JSON.stringify(opts["GS"]))); |
| | | component.find("select_GS3").set("v.options", JSON.parse(JSON.stringify(opts["GS"]))); |
| | | component |
| | | .find("select_GS1") |
| | | .set("v.options", JSON.parse(JSON.stringify(opts["GS"]))); |
| | | component |
| | | .find("select_GS2") |
| | | .set("v.options", JSON.parse(JSON.stringify(opts["GS"]))); |
| | | component |
| | | .find("select_GS3") |
| | | .set("v.options", JSON.parse(JSON.stringify(opts["GS"]))); |
| | | |
| | | component.find("select_GYN1").set("v.options", JSON.parse(JSON.stringify(opts["GYN"]))); |
| | | component.find("select_GYN2").set("v.options", JSON.parse(JSON.stringify(opts["GYN"]))); |
| | | component.find("select_GYN3").set("v.options", JSON.parse(JSON.stringify(opts["GYN"]))); |
| | | component |
| | | .find("select_GYN1") |
| | | .set("v.options", JSON.parse(JSON.stringify(opts["GYN"]))); |
| | | component |
| | | .find("select_GYN2") |
| | | .set("v.options", JSON.parse(JSON.stringify(opts["GYN"]))); |
| | | component |
| | | .find("select_GYN3") |
| | | .set("v.options", JSON.parse(JSON.stringify(opts["GYN"]))); |
| | | |
| | | component.find("select_URO1").set("v.options", JSON.parse(JSON.stringify(opts["URO"]))); |
| | | component.find("select_URO2").set("v.options", JSON.parse(JSON.stringify(opts["URO"]))); |
| | | component.find("select_URO3").set("v.options", JSON.parse(JSON.stringify(opts["URO"]))); |
| | | component |
| | | .find("select_URO1") |
| | | .set("v.options", JSON.parse(JSON.stringify(opts["URO"]))); |
| | | component |
| | | .find("select_URO2") |
| | | .set("v.options", JSON.parse(JSON.stringify(opts["URO"]))); |
| | | component |
| | | .find("select_URO3") |
| | | .set("v.options", JSON.parse(JSON.stringify(opts["URO"]))); |
| | | |
| | | component.find("select_ENT1").set("v.options", JSON.parse(JSON.stringify(opts["ENT"]))); |
| | | component.find("select_ENT2").set("v.options", JSON.parse(JSON.stringify(opts["ENT"]))); |
| | | component.find("select_ENT3").set("v.options", JSON.parse(JSON.stringify(opts["ENT"]))); |
| | | component |
| | | .find("select_ENT1") |
| | | .set("v.options", JSON.parse(JSON.stringify(opts["ENT"]))); |
| | | component |
| | | .find("select_ENT2") |
| | | .set("v.options", JSON.parse(JSON.stringify(opts["ENT"]))); |
| | | component |
| | | .find("select_ENT3") |
| | | .set("v.options", JSON.parse(JSON.stringify(opts["ENT"]))); |
| | | |
| | | component.find("select_OTH1").set("v.options", JSON.parse(JSON.stringify(opts["OTH"]))); |
| | | component.find("select_OTH2").set("v.options", JSON.parse(JSON.stringify(opts["OTH"]))); |
| | | component.find("select_OTH3").set("v.options", JSON.parse(JSON.stringify(opts["OTH"]))); |
| | | component |
| | | .find("select_OTH1") |
| | | .set("v.options", JSON.parse(JSON.stringify(opts["OTH"]))); |
| | | component |
| | | .find("select_OTH2") |
| | | .set("v.options", JSON.parse(JSON.stringify(opts["OTH"]))); |
| | | component |
| | | .find("select_OTH3") |
| | | .set("v.options", JSON.parse(JSON.stringify(opts["OTH"]))); |
| | | |
| | | component.find("select_ET1").set("v.options", JSON.parse(JSON.stringify(opts["ET"]))); |
| | | component.find("select_ET2").set("v.options", JSON.parse(JSON.stringify(opts["ET"]))); |
| | | component.find("select_ET3").set("v.options", JSON.parse(JSON.stringify(opts["ET"]))); |
| | | component |
| | | .find("select_ET1") |
| | | .set("v.options", JSON.parse(JSON.stringify(opts["ET"]))); |
| | | component |
| | | .find("select_ET2") |
| | | .set("v.options", JSON.parse(JSON.stringify(opts["ET"]))); |
| | | component |
| | | .find("select_ET3") |
| | | .set("v.options", JSON.parse(JSON.stringify(opts["ET"]))); |
| | | |
| | | component.find("select_BF1").set("v.options", JSON.parse(JSON.stringify(opts["BF"]))); |
| | | component.find("select_BF2").set("v.options", JSON.parse(JSON.stringify(opts["BF"]))); |
| | | component.find("select_BF3").set("v.options", JSON.parse(JSON.stringify(opts["BF"]))); |
| | | component |
| | | .find("select_BF1") |
| | | .set("v.options", JSON.parse(JSON.stringify(opts["BF"]))); |
| | | component |
| | | .find("select_BF2") |
| | | .set("v.options", JSON.parse(JSON.stringify(opts["BF"]))); |
| | | component |
| | | .find("select_BF3") |
| | | .set("v.options", JSON.parse(JSON.stringify(opts["BF"]))); |
| | | } else if (state === "ERROR") { |
| | | var errors = response.getError(); |
| | | var toastEvent = $A.get("e.force:showToast"); |
| | | toastEvent.setParams({ |
| | | "title": "错误", |
| | | "type":"error", |
| | | "message": errors[0].message |
| | | title: "错误", |
| | | type: "error", |
| | | message: errors[0].message |
| | | }); |
| | | toastEvent.fire(); |
| | | |
| | | } |
| | | }); |
| | | $A.enqueueAction(action); |
| | | }, |
| | | |
| | | toggle_report : function(component, event, helper) { |
| | | var modal_window = component.find('modal_window'); |
| | | var modal_bg = component.find('modal_bg'); |
| | | $A.util.toggleClass(modal_window, 'disp_none'); |
| | | $A.util.toggleClass(modal_bg, 'disp_none'); |
| | | var modal_window = component.find("modal_window"); |
| | | var modal_bg = component.find("modal_bg"); |
| | | $A.util.toggleClass(modal_window, "disp_none"); |
| | | $A.util.toggleClass(modal_bg, "disp_none"); |
| | | |
| | | if ($A.util.hasClass(modal_window, 'disp_none') && !component.get("v.recordId")) { |
| | | $A.get('e.force:refreshView').fire(); |
| | | if ( |
| | | $A.util.hasClass(modal_window, "disp_none") && |
| | | !component.get("v.recordId") |
| | | ) { |
| | | $A.get("e.force:refreshView").fire(); |
| | | } |
| | | }, |
| | | |
| | | productcategoryChange : function(component, event, helper, dept, index) { |
| | | var cmpId = 'select_'+dept; |
| | | var cmpId = "select_" + dept; |
| | | var myId; |
| | | var o1Id; |
| | | var o2Id; |
| | | if (index == 1) { |
| | | myId = cmpId + '1'; |
| | | o1Id = cmpId + '2'; |
| | | o2Id = cmpId + '3'; |
| | | myId = cmpId + "1"; |
| | | o1Id = cmpId + "2"; |
| | | o2Id = cmpId + "3"; |
| | | } else if (index == 2){ |
| | | myId = cmpId + '2'; |
| | | o1Id = cmpId + '1'; |
| | | o2Id = cmpId + '3'; |
| | | myId = cmpId + "2"; |
| | | o1Id = cmpId + "1"; |
| | | o2Id = cmpId + "3"; |
| | | } else { |
| | | myId = cmpId + '3'; |
| | | o1Id = cmpId + '1'; |
| | | o2Id = cmpId + '2'; |
| | | myId = cmpId + "3"; |
| | | o1Id = cmpId + "1"; |
| | | o2Id = cmpId + "2"; |
| | | } |
| | | |
| | | var product_category_id = component.find(myId).get('v.value'); |
| | | var pcId1 = component.find(o1Id).get('v.value'); |
| | | var pcId2 = component.find(o2Id).get('v.value'); |
| | | var p1bool = pcId1 != '' && pcId1 != null && pcId1 != undefined; |
| | | var p2bool = pcId2 != '' && pcId2 != null && pcId2 != undefined; |
| | | var p0bool = product_category_id != '' && product_category_id != null && product_category_id != undefined; |
| | | if ((p1bool && p0bool && product_category_id == pcId1) || (p2bool && p0bool && product_category_id == pcId2)) { |
| | | this.warning('不能选择同样的产品区分'); |
| | | component.find(myId).set('v.value',''); |
| | | var product_category_id = component.find(myId).get("v.value"); |
| | | var pcId1 = component.find(o1Id).get("v.value"); |
| | | var pcId2 = component.find(o2Id).get("v.value"); |
| | | var p1bool = pcId1 != "" && pcId1 != null && pcId1 != undefined; |
| | | var p2bool = pcId2 != "" && pcId2 != null && pcId2 != undefined; |
| | | var p0bool = |
| | | product_category_id != "" && |
| | | product_category_id != null && |
| | | product_category_id != undefined; |
| | | if ( |
| | | (p1bool && p0bool && product_category_id == pcId1) || |
| | | (p2bool && p0bool && product_category_id == pcId2) |
| | | ) { |
| | | this.warning("不能选择同样的产品区分"); |
| | | component.find(myId).set("v.value", ""); |
| | | } |
| | | }, |
| | | |
| | | selectHos : function(component, event, helper) { |
| | | |
| | | var accid = component.get("v.record.Agency_Hospital__c"); |
| | | var action = component.get("c.getDeptAmount"); |
| | | action.setParams({ "hospitalId" : accid }); |
| | | action.setParams({ hospitalId: accid }); |
| | | action.setCallback(this, function(response) { |
| | | var state = response.getState(); |
| | | if (state === "SUCCESS") { |
| | | var amountMap = response.getReturnValue(); |
| | | var GIProduct_Category1 = ''; |
| | | var GIProduct_Category2 = ''; |
| | | var GIProduct_Category3 = ''; |
| | | var GIAim_Price__c1 = ''; |
| | | var GIAim_Price__c2 = ''; |
| | | var GIAim_Price__c3 = ''; |
| | | var GIProduct_Category1 = ""; |
| | | var GIProduct_Category2 = ""; |
| | | var GIProduct_Category3 = ""; |
| | | var GIAim_Price__c1 = ""; |
| | | var GIAim_Price__c2 = ""; |
| | | var GIAim_Price__c3 = ""; |
| | | if (amountMap.GI.length > 0) { |
| | | GIProduct_Category1 = amountMap.GI[0].Product_Category__c; |
| | | if (amountMap.GI.length > 1) { |
| | |
| | | GIAim_Price__c1 = amountMap.GI[0].Aim_Price__c; |
| | | GIAim_Price__c2 = amountMap.GI[1].Aim_Price__c; |
| | | GIAim_Price__c3 = amountMap.GI[2].Aim_Price__c; |
| | | console.warn(GIAim_Price__c1+"-"+GIAim_Price__c2+"-"+GIAim_Price__c3); |
| | | |
| | | console.warn( |
| | | GIAim_Price__c1 + "-" + GIAim_Price__c2 + "-" + GIAim_Price__c3 |
| | | ); |
| | | } |
| | | component.find('select_GI1').set('v.value',GIProduct_Category1); |
| | | component.find('select_GI2').set('v.value',GIProduct_Category2); |
| | | component.find('select_GI3').set('v.value',GIProduct_Category3); |
| | | component.find('select_GI4_1').set('v.value',GIAim_Price__c1); |
| | | component.find('select_GI4_2').set('v.value',GIAim_Price__c2); |
| | | component.find('select_GI4_3').set('v.value',GIAim_Price__c3); |
| | | component.find("select_GI1").set("v.value", GIProduct_Category1); |
| | | component.find("select_GI2").set("v.value", GIProduct_Category2); |
| | | component.find("select_GI3").set("v.value", GIProduct_Category3); |
| | | component.find("select_GI4_1").set("v.value", GIAim_Price__c1); |
| | | component.find("select_GI4_2").set("v.value", GIAim_Price__c2); |
| | | component.find("select_GI4_3").set("v.value", GIAim_Price__c3); |
| | | |
| | | |
| | | var ETProduct_Category1 = ''; |
| | | var ETProduct_Category2 = ''; |
| | | var ETProduct_Category3 = ''; |
| | | var ETAim_Price__c1 = ''; |
| | | var ETAim_Price__c2 = ''; |
| | | var ETAim_Price__c3 = ''; |
| | | var ETProduct_Category1 = ""; |
| | | var ETProduct_Category2 = ""; |
| | | var ETProduct_Category3 = ""; |
| | | var ETAim_Price__c1 = ""; |
| | | var ETAim_Price__c2 = ""; |
| | | var ETAim_Price__c3 = ""; |
| | | if (amountMap.ET.length > 0) { |
| | | ETProduct_Category1 = amountMap.ET[0].Product_Category__c; |
| | | if (amountMap.ET.length > 1) { |
| | |
| | | ETAim_Price__c2 = amountMap.ET[1].Aim_Price__c; |
| | | ETAim_Price__c3 = amountMap.ET[2].Aim_Price__c; |
| | | } |
| | | component.find('select_ET1').set('v.value',ETProduct_Category1); |
| | | component.find('select_ET2').set('v.value',ETProduct_Category2); |
| | | component.find('select_ET3').set('v.value',ETProduct_Category3); |
| | | component.find('select_ET4_1').set('v.value',ETAim_Price__c1); |
| | | component.find('select_ET4_2').set('v.value',ETAim_Price__c2); |
| | | component.find('select_ET4_3').set('v.value',ETAim_Price__c3); |
| | | component.find("select_ET1").set("v.value", ETProduct_Category1); |
| | | component.find("select_ET2").set("v.value", ETProduct_Category2); |
| | | component.find("select_ET3").set("v.value", ETProduct_Category3); |
| | | component.find("select_ET4_1").set("v.value", ETAim_Price__c1); |
| | | component.find("select_ET4_2").set("v.value", ETAim_Price__c2); |
| | | component.find("select_ET4_3").set("v.value", ETAim_Price__c3); |
| | | |
| | | |
| | | var BFProduct_Category1 = ''; |
| | | var BFProduct_Category2 = ''; |
| | | var BFProduct_Category3 = ''; |
| | | var BFAim_Price__c1 = ''; |
| | | var BFAim_Price__c2 = ''; |
| | | var BFAim_Price__c3 = ''; |
| | | var BFProduct_Category1 = ""; |
| | | var BFProduct_Category2 = ""; |
| | | var BFProduct_Category3 = ""; |
| | | var BFAim_Price__c1 = ""; |
| | | var BFAim_Price__c2 = ""; |
| | | var BFAim_Price__c3 = ""; |
| | | if (amountMap.BF.length > 0) { |
| | | BFProduct_Category1 = amountMap.BF[0].Product_Category__c; |
| | | if (amountMap.BF.length > 1) { |
| | |
| | | BFAim_Price__c2 = amountMap.BF[1].Aim_Price__c; |
| | | BFAim_Price__c3 = amountMap.BF[2].Aim_Price__c; |
| | | } |
| | | component.find('select_BF1').set('v.value',BFProduct_Category1); |
| | | component.find('select_BF2').set('v.value',BFProduct_Category2); |
| | | component.find('select_BF3').set('v.value',BFProduct_Category3); |
| | | component.find('select_BF4_1').set('v.value',BFAim_Price__c1); |
| | | component.find('select_BF4_2').set('v.value',BFAim_Price__c2); |
| | | component.find('select_BF4_3').set('v.value',BFAim_Price__c3); |
| | | component.find("select_BF1").set("v.value", BFProduct_Category1); |
| | | component.find("select_BF2").set("v.value", BFProduct_Category2); |
| | | component.find("select_BF3").set("v.value", BFProduct_Category3); |
| | | component.find("select_BF4_1").set("v.value", BFAim_Price__c1); |
| | | component.find("select_BF4_2").set("v.value", BFAim_Price__c2); |
| | | component.find("select_BF4_3").set("v.value", BFAim_Price__c3); |
| | | |
| | | |
| | | var OTHProduct_Category1 = ''; |
| | | var OTHProduct_Category2 = ''; |
| | | var OTHProduct_Category3 = ''; |
| | | var OTHAim_Price__c1 = ''; |
| | | var OTHAim_Price__c2 = ''; |
| | | var OTHAim_Price__c3 = ''; |
| | | var OTHProduct_Category1 = ""; |
| | | var OTHProduct_Category2 = ""; |
| | | var OTHProduct_Category3 = ""; |
| | | var OTHAim_Price__c1 = ""; |
| | | var OTHAim_Price__c2 = ""; |
| | | var OTHAim_Price__c3 = ""; |
| | | if (amountMap.OTH.length > 0) { |
| | | |
| | | OTHProduct_Category1 = amountMap.OTH[0].Product_Category__c; |
| | | if (amountMap.OTH.length > 1) { |
| | | OTHProduct_Category2 = amountMap.OTH[1].Product_Category__c; |
| | |
| | | OTHAim_Price__c2 = amountMap.OTH[1].Aim_Price__c; |
| | | OTHAim_Price__c3 = amountMap.OTH[2].Aim_Price__c; |
| | | } |
| | | component.find('select_OTH1').set('v.value',OTHProduct_Category1); |
| | | component.find('select_OTH2').set('v.value',OTHProduct_Category2); |
| | | component.find('select_OTH3').set('v.value',OTHProduct_Category3); |
| | | component.find('select_OTH4_1').set('v.value',OTHAim_Price__c1); |
| | | component.find('select_OTH4_2').set('v.value',OTHAim_Price__c2); |
| | | component.find('select_OTH4_3').set('v.value',OTHAim_Price__c3); |
| | | component.find("select_OTH1").set("v.value", OTHProduct_Category1); |
| | | component.find("select_OTH2").set("v.value", OTHProduct_Category2); |
| | | component.find("select_OTH3").set("v.value", OTHProduct_Category3); |
| | | component.find("select_OTH4_1").set("v.value", OTHAim_Price__c1); |
| | | component.find("select_OTH4_2").set("v.value", OTHAim_Price__c2); |
| | | component.find("select_OTH4_3").set("v.value", OTHAim_Price__c3); |
| | | |
| | | var GSProduct_Category1 = ''; |
| | | var GSProduct_Category2 = ''; |
| | | var GSProduct_Category3 = ''; |
| | | var GSPAim_Price__c1 = ''; |
| | | var GSPAim_Price__c2 = ''; |
| | | var GSPAim_Price__c3 = ''; |
| | | var GSProduct_Category1 = ""; |
| | | var GSProduct_Category2 = ""; |
| | | var GSProduct_Category3 = ""; |
| | | var GSPAim_Price__c1 = ""; |
| | | var GSPAim_Price__c2 = ""; |
| | | var GSPAim_Price__c3 = ""; |
| | | if (amountMap.GS.length > 0) { |
| | | GSProduct_Category1 = amountMap.GS[0].Product_Category__c; |
| | | if (amountMap.GS.length > 1) { |
| | |
| | | GSPAim_Price__c2 = amountMap.GS[1].Aim_Price__c; |
| | | GSPAim_Price__c3= amountMap.GS[2].Aim_Price__c; |
| | | } |
| | | component.find('select_GS1').set('v.value',GSProduct_Category1); |
| | | component.find('select_GS2').set('v.value',GSProduct_Category2); |
| | | component.find('select_GS3').set('v.value',GSProduct_Category3); |
| | | component.find('select_GS4_1').set('v.value',GSPAim_Price__c1); |
| | | component.find('select_GS4_2').set('v.value',GSPAim_Price__c2); |
| | | component.find('select_GS4_3').set('v.value',GSPAim_Price__c3); |
| | | component.find("select_GS1").set("v.value", GSProduct_Category1); |
| | | component.find("select_GS2").set("v.value", GSProduct_Category2); |
| | | component.find("select_GS3").set("v.value", GSProduct_Category3); |
| | | component.find("select_GS4_1").set("v.value", GSPAim_Price__c1); |
| | | component.find("select_GS4_2").set("v.value", GSPAim_Price__c2); |
| | | component.find("select_GS4_3").set("v.value", GSPAim_Price__c3); |
| | | |
| | | var UROProduct_Category1 = ''; |
| | | var UROProduct_Category2 = ''; |
| | | var UROProduct_Category3 = ''; |
| | | var UROAim_Price__c1 = ''; |
| | | var UROAim_Price__c2 = ''; |
| | | var UROAim_Price__c3 = ''; |
| | | var UROProduct_Category1 = ""; |
| | | var UROProduct_Category2 = ""; |
| | | var UROProduct_Category3 = ""; |
| | | var UROAim_Price__c1 = ""; |
| | | var UROAim_Price__c2 = ""; |
| | | var UROAim_Price__c3 = ""; |
| | | if (amountMap.URO.length > 0) { |
| | | |
| | | UROProduct_Category1 = amountMap.URO[0].Product_Category__c; |
| | | if (amountMap.URO.length > 1) { |
| | | UROProduct_Category2 = amountMap.URO[1].Product_Category__c; |
| | |
| | | UROAim_Price__c2 = amountMap.URO[1].Aim_Price__c; |
| | | UROAim_Price__c3 = amountMap.URO[2].Aim_Price__c; |
| | | } |
| | | component.find('select_URO1').set('v.value',UROProduct_Category1); |
| | | component.find('select_URO2').set('v.value',UROProduct_Category2); |
| | | component.find('select_URO3').set('v.value',UROProduct_Category3); |
| | | component.find('select_URO4_1').set('v.value',UROAim_Price__c1); |
| | | component.find('select_URO4_2').set('v.value',UROAim_Price__c2); |
| | | component.find('select_URO4_3').set('v.value',UROAim_Price__c3); |
| | | component.find("select_URO1").set("v.value", UROProduct_Category1); |
| | | component.find("select_URO2").set("v.value", UROProduct_Category2); |
| | | component.find("select_URO3").set("v.value", UROProduct_Category3); |
| | | component.find("select_URO4_1").set("v.value", UROAim_Price__c1); |
| | | component.find("select_URO4_2").set("v.value", UROAim_Price__c2); |
| | | component.find("select_URO4_3").set("v.value", UROAim_Price__c3); |
| | | |
| | | |
| | | var GYNProduct_Category1 = ''; |
| | | var GYNProduct_Category2 = ''; |
| | | var GYNProduct_Category3 = ''; |
| | | var GYNAim_Price__c1 = ''; |
| | | var GYNAim_Price__c2 = ''; |
| | | var GYNAim_Price__c3 = ''; |
| | | var GYNProduct_Category1 = ""; |
| | | var GYNProduct_Category2 = ""; |
| | | var GYNProduct_Category3 = ""; |
| | | var GYNAim_Price__c1 = ""; |
| | | var GYNAim_Price__c2 = ""; |
| | | var GYNAim_Price__c3 = ""; |
| | | if (amountMap.GYN.length > 0) { |
| | | |
| | | GYNProduct_Category1 = amountMap.GYN[0].Product_Category__c; |
| | | if (amountMap.GYN.length > 1) { |
| | | GYNProduct_Category2 = amountMap.GYN[1].Product_Category__c; |
| | |
| | | GYNAim_Price__c2 = amountMap.GYN[1].Aim_Price__c; |
| | | GYNAim_Price__c3 = amountMap.GYN[2].Aim_Price__c; |
| | | } |
| | | component.find('select_GYN1').set('v.value',GYNProduct_Category1); |
| | | component.find('select_GYN2').set('v.value',GYNProduct_Category2); |
| | | component.find('select_GYN3').set('v.value',GYNProduct_Category3); |
| | | component.find('select_GYN4_1').set('v.value',GYNAim_Price__c1); |
| | | component.find('select_GYN4_2').set('v.value',GYNAim_Price__c2); |
| | | component.find('select_GYN4_3').set('v.value',GYNAim_Price__c3); |
| | | component.find("select_GYN1").set("v.value", GYNProduct_Category1); |
| | | component.find("select_GYN2").set("v.value", GYNProduct_Category2); |
| | | component.find("select_GYN3").set("v.value", GYNProduct_Category3); |
| | | component.find("select_GYN4_1").set("v.value", GYNAim_Price__c1); |
| | | component.find("select_GYN4_2").set("v.value", GYNAim_Price__c2); |
| | | component.find("select_GYN4_3").set("v.value", GYNAim_Price__c3); |
| | | |
| | | |
| | | var ENTProduct_Category1 = ''; |
| | | var ENTProduct_Category2 = ''; |
| | | var ENTProduct_Category3 = ''; |
| | | var ENTAim_Price__c1 = ''; |
| | | var ENTAim_Price__c2 = ''; |
| | | var ENTAim_Price__c3 = ''; |
| | | var ENTProduct_Category1 = ""; |
| | | var ENTProduct_Category2 = ""; |
| | | var ENTProduct_Category3 = ""; |
| | | var ENTAim_Price__c1 = ""; |
| | | var ENTAim_Price__c2 = ""; |
| | | var ENTAim_Price__c3 = ""; |
| | | if (amountMap.ENT.length > 0) { |
| | | |
| | | ENTProduct_Category1 = amountMap.ENT[0].Product_Category__c; |
| | | if (amountMap.ENT.length > 1) { |
| | | ENTProduct_Category2 = amountMap.ENT[1].Product_Category__c; |
| | |
| | | ENTAim_Price__c2 = amountMap.ENT[1].Aim_Price__c; |
| | | ENTAim_Price__c3 = amountMap.ENT[2].Aim_Price__c; |
| | | } |
| | | component.find('select_ENT1').set('v.value',ENTProduct_Category1); |
| | | component.find('select_ENT2').set('v.value',ENTProduct_Category2); |
| | | component.find('select_ENT3').set('v.value',ENTProduct_Category3); |
| | | component.find('select_ENT4_1').set('v.value',ENTAim_Price__c1); |
| | | component.find('select_ENT4_2').set('v.value',ENTAim_Price__c2); |
| | | component.find('select_ENT4_3').set('v.value',ENTAim_Price__c3); |
| | | |
| | | component.find("select_ENT1").set("v.value", ENTProduct_Category1); |
| | | component.find("select_ENT2").set("v.value", ENTProduct_Category2); |
| | | component.find("select_ENT3").set("v.value", ENTProduct_Category3); |
| | | component.find("select_ENT4_1").set("v.value", ENTAim_Price__c1); |
| | | component.find("select_ENT4_2").set("v.value", ENTAim_Price__c2); |
| | | component.find("select_ENT4_3").set("v.value", ENTAim_Price__c3); |
| | | } |
| | | }); |
| | | $A.enqueueAction(action); |
| | | console.log(JSON.stringify(component.find('input-hos').get("v.body")[0].get('v'))); |
| | | console.log( |
| | | JSON.stringify(component.find("input-hos").get("v.body")[0].get("v")) |
| | | ); |
| | | }, |
| | | |
| | | getOCMTerm : function() { |
| | |
| | | var month = today.getMonth(); |
| | | |
| | | if (month < 3) year -= 1; |
| | | var thisYearOCMPeriod = String(year - 1867) + 'P'; |
| | | var thisYearOCMPeriod = String(year - 1867) + "P"; |
| | | |
| | | return thisYearOCMPeriod; |
| | | }, |
| | |
| | | var action = component.get("c.createSFTarget"); |
| | | // alert(component.get("v.GIAmount")); |
| | | |
| | | |
| | | |
| | | var p1_1 = component.find('select_GI4_1').get('v.value') ; |
| | | var p1_2 = component.find('select_GI4_2').get('v.value') ; |
| | | var p1_3 = component.find('select_GI4_3').get('v.value') ; |
| | | var p1_1 = component.find("select_GI4_1").get("v.value"); |
| | | var p1_2 = component.find("select_GI4_2").get("v.value"); |
| | | var p1_3 = component.find("select_GI4_3").get("v.value"); |
| | | |
| | | if (p1_1 == undefined || p1_1 == "") { |
| | | p1_1 = 0; |
| | |
| | | } |
| | | console.warn(p1_1+"-"+p1_2+"-"+p1_3); |
| | | |
| | | var p2_1 = component.find('select_ET4_1').get('v.value') ; |
| | | var p2_2 = component.find('select_ET4_2').get('v.value') ; |
| | | var p2_3 = component.find('select_ET4_3').get('v.value') ; |
| | | var p2_1 = component.find("select_ET4_1").get("v.value"); |
| | | var p2_2 = component.find("select_ET4_2").get("v.value"); |
| | | var p2_3 = component.find("select_ET4_3").get("v.value"); |
| | | if (p2_1 == undefined || p2_1 == "") { |
| | | p2_1 = 0; |
| | | } |
| | |
| | | p2_3 = 0; |
| | | } |
| | | |
| | | |
| | | var p3_1 = component.find('select_BF4_1').get('v.value') ; |
| | | var p3_2 = component.find('select_BF4_2').get('v.value') ; |
| | | var p3_3 = component.find('select_BF4_3').get('v.value') ; |
| | | var p3_1 = component.find("select_BF4_1").get("v.value"); |
| | | var p3_2 = component.find("select_BF4_2").get("v.value"); |
| | | var p3_3 = component.find("select_BF4_3").get("v.value"); |
| | | if (p3_1 == undefined || p3_1 == "") { |
| | | p3_1 = 0; |
| | | } |
| | |
| | | p3_3 = 0; |
| | | } |
| | | |
| | | |
| | | |
| | | var p4_1 = component.find('select_OTH4_1').get('v.value') ; |
| | | var p4_2 = component.find('select_OTH4_2').get('v.value') ; |
| | | var p4_3 = component.find('select_OTH4_3').get('v.value') ; |
| | | var p4_1 = component.find("select_OTH4_1").get("v.value"); |
| | | var p4_2 = component.find("select_OTH4_2").get("v.value"); |
| | | var p4_3 = component.find("select_OTH4_3").get("v.value"); |
| | | if (p4_1 == undefined || p4_1 == "") { |
| | | p4_1 = 0; |
| | | } |
| | |
| | | p4_3 = 0; |
| | | } |
| | | |
| | | |
| | | |
| | | var p5_1 = component.find('select_GS4_1').get('v.value') ; |
| | | var p5_2 = component.find('select_GS4_2').get('v.value') ; |
| | | var p5_3 = component.find('select_GS4_3').get('v.value') ; |
| | | var p5_1 = component.find("select_GS4_1").get("v.value"); |
| | | var p5_2 = component.find("select_GS4_2").get("v.value"); |
| | | var p5_3 = component.find("select_GS4_3").get("v.value"); |
| | | if (p5_1 == undefined || p5_1 == "") { |
| | | p5_1 = 0; |
| | | } |
| | |
| | | p5_3 = 0; |
| | | } |
| | | |
| | | |
| | | |
| | | var p6_1 = component.find('select_URO4_1').get('v.value') ; |
| | | var p6_2 = component.find('select_URO4_2').get('v.value') ; |
| | | var p6_3 = component.find('select_URO4_3').get('v.value') ; |
| | | var p6_1 = component.find("select_URO4_1").get("v.value"); |
| | | var p6_2 = component.find("select_URO4_2").get("v.value"); |
| | | var p6_3 = component.find("select_URO4_3").get("v.value"); |
| | | if (p6_1 == undefined || p6_1 == "") { |
| | | p6_1 = 0; |
| | | } |
| | |
| | | p6_3 = 0; |
| | | } |
| | | |
| | | var p7_1 = component.find('select_GYN4_1').get('v.value') ; |
| | | var p7_2 = component.find('select_GYN4_2').get('v.value') ; |
| | | var p7_3 = component.find('select_GYN4_3').get('v.value') ; |
| | | var p7_1 = component.find("select_GYN4_1").get("v.value"); |
| | | var p7_2 = component.find("select_GYN4_2").get("v.value"); |
| | | var p7_3 = component.find("select_GYN4_3").get("v.value"); |
| | | if (p7_1 == undefined || p7_1 == "") { |
| | | p7_1 = 0; |
| | | } |
| | |
| | | p7_3 = 0; |
| | | } |
| | | |
| | | |
| | | |
| | | var p8_1 = component.find('select_ENT4_1').get('v.value') ; |
| | | var p8_2 = component.find('select_ENT4_2').get('v.value') ; |
| | | var p8_3 = component.find('select_ENT4_3').get('v.value') ; |
| | | var p8_1 = component.find("select_ENT4_1").get("v.value"); |
| | | var p8_2 = component.find("select_ENT4_2").get("v.value"); |
| | | var p8_3 = component.find("select_ENT4_3").get("v.value"); |
| | | if (p8_1 == undefined || p8_1 == "") { |
| | | p8_1 = 0; |
| | | } |
| | |
| | | p8_3 = 0; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | action.setParams({ |
| | | "hospitalId" : component.get("v.record.Agency_Hospital__c"), |
| | | "GIProduct" : [component.find('select_GI1').get('v.value'),component.find('select_GI2').get('v.value'),component.find('select_GI3').get('v.value'),p1_1,p1_2,p1_3], |
| | | "ETProduct" : [component.find('select_ET1').get('v.value'),component.find('select_ET2').get('v.value'),component.find('select_ET3').get('v.value'),p2_1, p2_2,p2_3 ], |
| | | "BFProduct" : [component.find('select_BF1').get('v.value'),component.find('select_BF2').get('v.value'),component.find('select_BF3').get('v.value'),p3_1 ,p3_2 ,p3_3 ], |
| | | "OTHProduct" : [component.find('select_OTH1').get('v.value'),component.find('select_OTH2').get('v.value'),component.find('select_OTH3').get('v.value'),p4_1,p4_2 ,p4_3], |
| | | "GSProduct" : [component.find('select_GS1').get('v.value'),component.find('select_GS2').get('v.value'),component.find('select_GS3').get('v.value'),p5_1,p5_2,p5_3], |
| | | "UROProduct" : [component.find('select_URO1').get('v.value'),component.find('select_URO2').get('v.value'),component.find('select_URO3').get('v.value'),p6_1,p6_2 ,p6_2 ], |
| | | "GYNProduct" : [component.find('select_GYN1').get('v.value'),component.find('select_GYN2').get('v.value'),component.find('select_GYN3').get('v.value'),p7_1,p7_2 ,p7_3 ], |
| | | "ENTProduct" : [component.find('select_ENT1').get('v.value'),component.find('select_ENT2').get('v.value'),component.find('select_ENT3').get('v.value'),p8_1 ,p8_2 ,p8_3], |
| | | "OCMTerm" : component.get("v.OCMTerm") |
| | | hospitalId: component.get("v.record.Agency_Hospital__c"), |
| | | GIProduct: [ |
| | | component.find("select_GI1").get("v.value"), |
| | | component.find("select_GI2").get("v.value"), |
| | | component.find("select_GI3").get("v.value"), |
| | | p1_1, |
| | | p1_2, |
| | | p1_3 |
| | | ], |
| | | ETProduct: [ |
| | | component.find("select_ET1").get("v.value"), |
| | | component.find("select_ET2").get("v.value"), |
| | | component.find("select_ET3").get("v.value"), |
| | | p2_1, |
| | | p2_2, |
| | | p2_3 |
| | | ], |
| | | BFProduct: [ |
| | | component.find("select_BF1").get("v.value"), |
| | | component.find("select_BF2").get("v.value"), |
| | | component.find("select_BF3").get("v.value"), |
| | | p3_1, |
| | | p3_2, |
| | | p3_3 |
| | | ], |
| | | OTHProduct: [ |
| | | component.find("select_OTH1").get("v.value"), |
| | | component.find("select_OTH2").get("v.value"), |
| | | component.find("select_OTH3").get("v.value"), |
| | | p4_1, |
| | | p4_2, |
| | | p4_3 |
| | | ], |
| | | GSProduct: [ |
| | | component.find("select_GS1").get("v.value"), |
| | | component.find("select_GS2").get("v.value"), |
| | | component.find("select_GS3").get("v.value"), |
| | | p5_1, |
| | | p5_2, |
| | | p5_3 |
| | | ], |
| | | UROProduct: [ |
| | | component.find("select_URO1").get("v.value"), |
| | | component.find("select_URO2").get("v.value"), |
| | | component.find("select_URO3").get("v.value"), |
| | | p6_1, |
| | | p6_2, |
| | | p6_2 |
| | | ], |
| | | GYNProduct: [ |
| | | component.find("select_GYN1").get("v.value"), |
| | | component.find("select_GYN2").get("v.value"), |
| | | component.find("select_GYN3").get("v.value"), |
| | | p7_1, |
| | | p7_2, |
| | | p7_3 |
| | | ], |
| | | ENTProduct: [ |
| | | component.find("select_ENT1").get("v.value"), |
| | | component.find("select_ENT2").get("v.value"), |
| | | component.find("select_ENT3").get("v.value"), |
| | | p8_1, |
| | | p8_2, |
| | | p8_3 |
| | | ], |
| | | OCMTerm: component.get("v.OCMTerm") |
| | | }); |
| | | action.setCallback(this, function(response) { |
| | | console.warn(response); |
| | | var state = response.getState(); |
| | | if (state === "SUCCESS") { |
| | | var modal_window = component.find('modal_window'); |
| | | var modal_bg = component.find('modal_bg'); |
| | | $A.util.toggleClass(modal_window, 'disp_none'); |
| | | $A.util.toggleClass(modal_bg, 'disp_none'); |
| | | var modal_window = component.find("modal_window"); |
| | | var modal_bg = component.find("modal_bg"); |
| | | $A.util.toggleClass(modal_window, "disp_none"); |
| | | $A.util.toggleClass(modal_bg, "disp_none"); |
| | | |
| | | var toastEvent = $A.get("e.force:showToast"); |
| | | toastEvent.setParams({ |
| | | "title": "成功", |
| | | "type":"success", |
| | | "message": "保存成功" |
| | | title: "成功", |
| | | type: "success", |
| | | message: "保存成功" |
| | | }); |
| | | toastEvent.fire(); |
| | | |
| | | $A.get('e.force:refreshView').fire(); |
| | | $A.get("e.force:refreshView").fire(); |
| | | } else if (state === "INCOMPLETE") { |
| | | var toastEvent = $A.get("e.force:showToast"); |
| | | toastEvent.setParams({ |
| | | "title": "未完成!", |
| | | "type":"error", |
| | | "message": "未完成" |
| | | title: "未完成!", |
| | | type: "error", |
| | | message: "未完成" |
| | | }); |
| | | toastEvent.fire(); |
| | | } else if (state === "ERROR") { |
| | | var errors = response.getError(); |
| | | var toastEvent = $A.get("e.force:showToast"); |
| | | toastEvent.setParams({ |
| | | "title": "错误", |
| | | "type":"error", |
| | | "message": errors[0].message |
| | | title: "错误", |
| | | type: "error", |
| | | message: errors[0].message |
| | | }); |
| | | toastEvent.fire(); |
| | | |
| | | } |
| | | }); |
| | | $A.enqueueAction(action); |
| | |
| | | warning : function(message) { |
| | | var toastEvent = $A.get("e.force:showToast"); |
| | | toastEvent.setParams({ |
| | | "title": "警告!", |
| | | "message": message, |
| | | "type":"warning", |
| | | "duration" : "10000" |
| | | title: "警告!", |
| | | message: message, |
| | | type: "warning", |
| | | duration: "10000" |
| | | }); |
| | | toastEvent.fire(); |
| | | }, |
| | |
| | | error : function(message) { |
| | | var toastEvent = $A.get("e.force:showToast"); |
| | | toastEvent.setParams({ |
| | | "title": "错误!", |
| | | "message": message, |
| | | "type":"error", |
| | | "duration" : "10000" |
| | | title: "错误!", |
| | | message: message, |
| | | type: "error", |
| | | duration: "10000" |
| | | }); |
| | | toastEvent.fire(); |
| | | }, |
| | | |
| | | }) |
| | | } |
| | | }); |
| | |
| | | <aura:component |
| | | controller="RetrospectiveWeeklyReportController" |
| | | implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction,forceCommunity:availableForAllPageTypes,lightning:availableForFlowScreens" |
| | | implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction,forceCommunity:availableForAllPageTypes" |
| | | access="global" |
| | | > |
| | | <ltng:require styles="{!$Resource.multilineToastCSS}" /> |
| | |
| | | <aura:attribute |
| | | name="acondata" |
| | | type="Agency_Contact__c" |
| | | default="{sobjectType:'Ag |
| | | ency_Contact__c'}" |
| | | default="{sobjectType:'Agency_Contact__c'}" |
| | | /> |
| | | <aura:attribute name="successMessage" type="String" /> |
| | | <aura:attribute name="etEng" type="String" /> |
| | |
| | | <aura:attribute name="doclist" type="List" /> |
| | | <aura:attribute name="docmap" type="Map" /> |
| | | <aura:attribute name="login" type="Boolean" default="false" /> |
| | | <aura:attribute name="loginEdit" type="Boolean" default="false" /> |
| | | <aura:attribute name="modal_import_spinner" type="Boolean" default="false" /> |
| | | <aura:attribute name="loadOpp" type="Boolean" default="false" /> |
| | | <aura:attribute name="reportPageData" type="Map" /> |
| | | <aura:attribute name="selectbody" type="String" /> |
| | |
| | | <aura:attribute name="NumOfRecords" type="Integer" default="1000" /> |
| | | <aura:attribute name="showMain" type="Boolean" default="true" /> |
| | | <aura:attribute name="IsEventDefault" type="Boolean" default="true" /> |
| | | <!-- start DTT-zhj 增加错误信息table 2023-05-16--> |
| | | <aura:attribute name="errorData" type="Object" /> |
| | | <aura:attribute name="errorColumns" type="List" /> |
| | | <!-- show Error information --> |
| | | <aura:attribute name="showErrorInfo" type="Boolean" default="false" /> |
| | | <!-- end DTT-zhj 增加错误信息table 2023-05-16--> |
| | | |
| | | <aura:attribute name="PIConfig" type="Map" /> |
| | | |
| | |
| | | <!-- 批量添加日报 end--> |
| | | <!--ロード中...--> |
| | | <aura:renderIf isTrue="{!v.login}"> |
| | | <aura:renderIf isTrue="{!!v.loginEdit}"> |
| | | <!-- <div class="slds-spinner_container"> |
| | | <div role="status" class="slds-spinner slds-spinner_medium slds-spinner_brand"> |
| | | <span class="slds-assistive-text">Loading</span> |
| | | <div class="slds-spinner__dot-a"></div> |
| | | <div class="slds-spinner__dot-b"></div> |
| | | </div> |
| | | </div> --> |
| | | <div class="slds-spinner_container height100vh"> |
| | | <div |
| | | class="slds-spinner_container" |
| | | id="spinner" |
| | | style="position: fixed; top: 123px" |
| | | > |
| | | <div |
| | | role="status" |
| | | class="slds-spinner slds-spinner_medium slds-spinner_brand" |
| | | class="slds-spinner--brand slds-spinner slds-spinner--medium" |
| | | role="alert" |
| | | > |
| | | <span class="slds-assistive-text">Loading</span> |
| | | <div class="slds-spinner__dot-a"></div> |
| | |
| | | </div> |
| | | </div> |
| | | </aura:renderIf> |
| | | </aura:renderIf> |
| | | <div aura:id="report" id="report"> |
| | | <div aura:id="report" id="report" class="contents_wrapper"> |
| | | <div class="slds-grid slds-wrap slds-grid--pull-padded"> |
| | | <div style="width: 150px"></div> |
| | | <div style="width: 200px"></div> |
| | | <div |
| | | class="tr mt5 slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-12 slds-large-size--1-of-12 fontSize" |
| | | class="tr mt5 slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-12 slds-large-size--1-of-12" |
| | | > |
| | | 周 |
| | | </div> |
| | | <div |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--3-of-12 slds-large-size--3-of-12 fontSize" |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--3-of-12 slds-large-size--3-of-12" |
| | | > |
| | | <ui:inputSelect |
| | | aura:id="select_date" |
| | |
| | | class="tr slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12" |
| | | style="display: contents" |
| | | > |
| | | <ui:button |
| | | aura:id="new_button" |
| | | label="新建" |
| | | press="{!c.new_report}" |
| | | class="buttonFontSize" |
| | | /> |
| | | <ui:button aura:id="new_button" label="新建" press="{!c.new_report}" /> |
| | | </div> |
| | | <div |
| | | style="width: 400px" |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--4-of-12 slds-large-size--4-of-12" |
| | | style="width: 350px" |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12" |
| | | > |
| | | <ui:button |
| | | aura:id="copy_button" |
| | | label="复制" |
| | | press="{!c.copy_button}" |
| | | disabled="true" |
| | | class="buttonFontSize" |
| | | /> |
| | | <ui:button |
| | | aura:id="delete_button" |
| | | label="删除" |
| | | press="{!c.delete_button}" |
| | | disabled="true" |
| | | class="buttonFontSize" |
| | | /> |
| | | <ui:button |
| | | aura:id="import" |
| | | label="导入" |
| | | press="{!c.import}" |
| | | class="buttonFontSize" |
| | | /> |
| | | <ui:button aura:id="import" label="导入" press="{!c.import}" /> |
| | | <ui:button |
| | | aura:id="export" |
| | | label="导出" |
| | | press="{!c.export_condition}" |
| | | class="buttonFontSize" |
| | | /> |
| | | <!-- <ui:button aura:id="returnbutton" label="返回" press="{!c.return_main_page}" /> --> |
| | | <ui:button |
| | | aura:id="returnbutton" |
| | | label="返回" |
| | | press="{!c.return_main_page}" |
| | | /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | > |
| | | <thead> |
| | | <tr class="slds-line-height--reset"> |
| | | <th |
| | | class="table_header slds-text-title--caps fontSize" |
| | | style="width: 250px" |
| | | > |
| | | <span class="slds-truncate" title="Name">日报编号</span> |
| | | </th> |
| | | <th class="table_header slds-text-title--caps fontSize"> |
| | | <th class="table_header slds-text-title--caps"></th> |
| | | <th class="table_header slds-text-title--caps"> |
| | | <span class="slds-truncate" title="Name" |
| | | >{!v.fieldsmap.Person_In_Charge2__c}</span |
| | | > |
| | | <!-- {!v.fieldsmap.Person_In_Charge2__c} 担当--> |
| | | </th> |
| | | <th |
| | | class="table_header slds-text-title--caps fontSize" |
| | | style="width: 250px" |
| | | > |
| | | <th class="table_header slds-text-title--caps"> |
| | | <span class="slds-truncate" title="Name">医院</span> |
| | | </th> |
| | | <th class="table_header slds-text-title--caps fontSize"> |
| | | <th class="table_header slds-text-title--caps"> |
| | | <span class="slds-truncate" title="Name" |
| | | >{!v.fieldsmap.Department_Cateogy__c}</span |
| | | > |
| | | <!-- {!v.fieldsmap.Department_Cateogy__c} 科室--> |
| | | </th> |
| | | <th class="table_header slds-text-title--caps fontSize"> |
| | | <th class="table_header slds-text-title--caps"> |
| | | <span class="slds-truncate" title="Name">拜访人</span> |
| | | <!-- {!v.fieldsmap.doctor2__c} 拜访人 --> |
| | | </th> |
| | | <th class="table_header slds-text-title--caps fontSize"> |
| | | <th class="table_header slds-text-title--caps"> |
| | | <span class="slds-truncate" title="Name" |
| | | >{!v.fieldsmap.DealerPersonnel__c}</span |
| | | > |
| | | <!-- {!v.fieldsmap.visitor_title__c} 职位--> |
| | | </th> |
| | | <th class="table_header slds-text-title--caps fontSize"> |
| | | <th class="table_header slds-text-title--caps"> |
| | | <span class="slds-truncate" title="Name" |
| | | >{!v.fieldsmap.WorkMark__c}</span |
| | | > |
| | |
| | | <tbody> |
| | | <aura:iteration items="{!v.reports}" var="item" indexVar="index"> |
| | | <tr class="slds-hint-parent"> |
| | | <td role="gridcell" class="slds-cell-edit fontSize"> |
| | | <td role="gridcell" class="slds-cell-edit"> |
| | | <ui:inputRadio |
| | | class="report_radio" |
| | | name="report_radio" |
| | |
| | | onclick="{!c.edit_button}" |
| | | /> |
| | | </td> |
| | | <td role="gridcell" class="slds-cell-edit fontSize"> |
| | | <td role="gridcell" class="slds-cell-edit"> |
| | | <span class="slds-grid slds-grid--align-spread"> |
| | | <span |
| | | class="slds-truncate" |
| | |
| | | > |
| | | </span> |
| | | </td> |
| | | <td scope="row" tabindex="0" class="slds-cell-edit fontSize"> |
| | | <div |
| | | class="slds-grid slds-grid--align-spread" |
| | | style="word-wrap: break-word" |
| | | > |
| | | <th scope="row" tabindex="0" class="slds-cell-edit"> |
| | | <span class="slds-grid slds-grid--align-spread"> |
| | | {!item.Agency_Hospital__r.Name} |
| | | </div> |
| | | </td> |
| | | <td role="gridcell" class="slds-cell-edit fontSize"> |
| | | </span> |
| | | </th> |
| | | <td role="gridcell" class="slds-cell-edit"> |
| | | <span class="slds-grid slds-grid--align-spread"> |
| | | <span |
| | | class="slds-truncate" |
| | |
| | | > |
| | | </span> |
| | | </td> |
| | | <td role="gridcell" class="slds-cell-edit fontSize"> |
| | | <td role="gridcell" class="slds-cell-edit"> |
| | | <span class="slds-grid slds-grid--align-spread"> |
| | | <span class="slds-truncate" title="{!item.doctor2__r.Name}"> |
| | | <span class="encrypt">{!item.doctor2__r.Name}</span> |
| | |
| | | </span> |
| | | </span> |
| | | </td> |
| | | <td role="gridcell" class="slds-cell-edit fontSize"> |
| | | <td role="gridcell" class="slds-cell-edit"> |
| | | <span class="slds-grid slds-grid--align-spread"> |
| | | <span |
| | | class="slds-truncate" |
| | |
| | | > |
| | | </span> |
| | | </td> |
| | | <td role="gridcell" class="slds-cell-edit fontSize"> |
| | | <td role="gridcell" class="slds-cell-edit"> |
| | | <span class="slds-grid slds-grid--align-spread"> |
| | | <span class="slds-truncate" title="{!item.WorkMark__c}"> |
| | | <lightning:input |
| | |
| | | class="disp_none slds-modal slds-fade-in-open slds-modal--large" |
| | | aria-labelledby="headerTarget" |
| | | > |
| | | <aura:renderIf isTrue="{!v.modal_import_spinner}"> |
| | | <lightning:spinner alternativeText="Loading" size="medium" /> |
| | | </aura:renderIf> |
| | | <div class="slds-modal slds-fade-in-open slds-hide" aura:id="successDiv01"> |
| | | <!-- <ui:inputText aura:id="articleURL" /> --> |
| | | <div class="demo-only" style="height: 8rem"> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="slds-modal slds-fade-in-open slds-hide" aura:id="errorDiv01" style="z-index: 10001"> |
| | | <div class="demo-only" style="height: 8rem;"> |
| | | <div |
| | | class="slds-modal slds-fade-in-open slds-hide" |
| | | aura:id="errorDiv01" |
| | | style="z-index: 10001" |
| | | > |
| | | <!-- <ui:inputText aura:id="articleURL" /> --> |
| | | <div class="demo-only" style="height: 8rem"> |
| | | <div class="slds-notify_container slds-is-relative"> |
| | | <div class="slds-notify slds-notify_toast slds-theme_error" role="status"> |
| | | <div |
| | | class="slds-notify slds-notify_toast slds-theme_error" |
| | | role="status" |
| | | > |
| | | <div class=" slds-m-left_xx-large"> |
| | | <div |
| | | class="slds-notify__content slds-m-left_small slds-align_absolute-center slds-m-left_xx-large"> |
| | | <lightning:icon alternativeText="error" iconName="utility:error" size="small" |
| | | class="buttonColor slds-m-right_small" /> |
| | | class="slds-notify__content slds-m-left_small slds-align_absolute-center slds-m-left_xx-large" |
| | | > |
| | | <lightning:icon |
| | | alternativeText="error" |
| | | iconName="utility:error" |
| | | size="small" |
| | | class="buttonColor slds-m-right_small" |
| | | /> |
| | | <h2 class="slds-text-heading_small ">{!v.errorMessage}</h2> |
| | | <lightning:icon alternativeText="Close" iconName="utility:close" size="small" |
| | | onclick="{!c.closeErrorDiv}" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | <div class="slds-modal__container"> |
| | | <div class="slds-modal__header"> |
| | | <h4 id="headerTarget" class="slds-float--left"></h4> |
| | |
| | | <ui:button |
| | | aura:id="close_button" |
| | | label="关闭" |
| | | class="close_button slds-button slds-button--neutral slds-order--1 buttonFontSize" |
| | | class="close_button slds-button slds-button--neutral slds-order--1" |
| | | press="{!c.close_import}" |
| | | /> |
| | | </div> |
| | | <div |
| | | class="slds-modal__content slds-scrollable slds-grow slds-p-around--medium fontSize" |
| | | class="slds-modal__content slds-scrollable slds-grow slds-p-around--medium" |
| | | > |
| | | <aura:if isTrue="{!v.showMain}"> |
| | | <div> |
| | |
| | | </div> |
| | | <aura:set attribute="else"> |
| | | <ui:outputRichText |
| | | class="uiOutputRichText slds-m--around-large fontSize" |
| | | class="uiOutputRichText slds-m--around-large" |
| | | value="{!v.TableContent}" |
| | | /> |
| | | <div class="slds-p-around--large slds-align--absolute-center"> |
| | |
| | | label="保存" |
| | | variant="brand" |
| | | onclick="{!c.processFileContent}" |
| | | class="buttonFontSize" |
| | | /> |
| | | <lightning:button |
| | | label="取消" |
| | | variant="brand" |
| | | onclick="{!c.cancel}" |
| | | class="buttonFontSize" |
| | | /> |
| | | </div> |
| | | <aura:if isTrue="{!v.showErrorInfo}"> |
| | | <div class="slds-p-around--large slds-align--absolute-center"> |
| | | <lightning:button |
| | | label="导出错误信息" |
| | | variant="brand" |
| | | onclick="{!c.exportErrorInfo}" |
| | | /> |
| | | </div> |
| | | <div class="slds-p-around--large slds-align--absolute-center"> |
| | | <div style="height: 300px; overflow-x: scroll"> |
| | | <lightning:datatable |
| | | keyField="id" |
| | | data="{! v.errorData }" |
| | | columns="{! v.errorColumns }" |
| | | hideCheckboxColumn="true" |
| | | /> |
| | | </div> |
| | | </div> |
| | | </aura:if> |
| | | </aura:set> |
| | | </aura:if> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div |
| | | class="slds-modal__content slds-grow slds-p-around--medium" |
| | | style="position: relative" |
| | | > |
| | | <aura:renderIf isTrue="{!v.loginEdit}"> |
| | | <lightning:spinner |
| | | alternativeText="Loading" |
| | | size="medium" |
| | | style="width: 100%; height: 100%" |
| | | /> |
| | | </aura:renderIf> |
| | | <div class="slds-modal__header"> |
| | | <h4 id="headerTarget" class="slds-float--left">{!v.dialog_type}</h4> |
| | | <h2 id="headerTarget" class="slds-text-heading--medium"> |
| | | 日报({!v.selected_date} {!v.selected_agency_person}) |
| | | </h2> |
| | |
| | | press="{!c.toggle_report}" |
| | | /> |
| | | </div> |
| | | <div class="slds-modal__content slds-grow slds-p-around--medium"> |
| | | <div class="slds-box slds-theme--shade"> |
| | | <div class="slds-grid slds-wrap slds-grid--pull-padded"> |
| | | <div |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-7 slds-large-size--1-of-7" |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6" |
| | | > |
| | | 活动日 |
| | | <lightning:input |
| | | type="date" |
| | | value="{!v.data.Report_Date__c}" |
| | | aura:id="input-report-date" |
| | | variant="label-hidden" |
| | | /> |
| | | </div> |
| | | <!-- 医院 --> |
| | | <div |
| | | aura:id="hospital_list" |
| | | class="slds-form-element slds-lookup slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-7 slds-large-size--1-of-7" |
| | | class="slds-form-element slds-lookup slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6" |
| | | data-select="single" |
| | | > |
| | | <!-- label="医院" --> |
| | |
| | | class="field" |
| | | value="{!v.hospital}" |
| | | updateOn="keyup" |
| | | variant="label-hidden" |
| | | /> |
| | | <div class="slds-lookup__menu" id="lookup-66"> |
| | | <ul class="slds-lookup__list" role="listbox"> |
| | |
| | | </div> |
| | | <!-- 科室分类 --> |
| | | <div |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-7 slds-large-size--1-of-7" |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6" |
| | | > |
| | | {!v.fieldsmap.Department_Cateogy__c} |
| | | <!-- <ui:inputText aura:id="select_department" class="slds-select" |
| | | change="{!c.select_department}"/> --> |
| | | <lightning:input |
| | | type="text" |
| | | onchange="{!c.select_department}" |
| | | <ui:inputText |
| | | aura:id="select_department" |
| | | variant="label-hidden" |
| | | class="slds-select" |
| | | change="{!c.select_department}" |
| | | /> |
| | | </div> |
| | | <!-- 经销商人员 change="{!c.select_DealerPersonnel}" --> |
| | | <div |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-7 slds-large-size--1-of-7" |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6" |
| | | style="width: 145px" |
| | | > |
| | | {!v.fieldsmap.DealerPersonnel__c} |
| | |
| | | </div> |
| | | <!-- 活动区分 --> |
| | | <div |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-7 slds-large-size--1-of-7" |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6" |
| | | > |
| | | {!v.fieldsmap.WorkRecord__c} |
| | | <ui:inputSelect |
| | |
| | | </div> |
| | | <!-- 拜访人 {!v.fieldsmap.doctor2__c}--> |
| | | <div |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-7 slds-large-size--1-of-7" |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6" |
| | | style="width: 145px" |
| | | > |
| | | 拜访人 |
| | |
| | | <!-- <p hidden="hidden"> --> |
| | | |
| | | <div |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-7 slds-large-size--1-of-7" |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-12" |
| | | > |
| | | <br /> |
| | | <ui:button |
| | |
| | | <hr /> |
| | | <!-- 产品分类(第三分类) change="{!c.select_ProductClassification}" --> |
| | | <div |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-5" |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6" |
| | | > |
| | | 产品分类(第三分类) |
| | | <ui:inputSelect |
| | |
| | | <!-- 使用产品1(产品型号) UseProduct1__c --> |
| | | <div |
| | | aura:id="UseProduct1_List" |
| | | class="slds-form-element slds-lookup slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-5" |
| | | class="slds-form-element slds-lookup slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6" |
| | | data-select="single" |
| | | > |
| | | <!-- label="使用产品1(产品型号)" --> |
| | |
| | | class="field" |
| | | value="{!v.UseProduct1}" |
| | | updateOn="keyup" |
| | | variant="label-hidden" |
| | | /> |
| | | <div class="slds-lookup__menu" id="lookup-11"> |
| | | <ul |
| | |
| | | <!-- 使用产品2 UseProduct2__c --> |
| | | <div |
| | | aura:id="UseProduct2_List" |
| | | class="slds-form-element slds-lookup slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-5" |
| | | class="slds-form-element slds-lookup slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6" |
| | | data-select="single" |
| | | > |
| | | <!-- label="使用产品2" --> |
| | |
| | | class="field" |
| | | value="{!v.UseProduct2}" |
| | | updateOn="keyup" |
| | | variant="label-hidden" |
| | | /> |
| | | <div class="slds-lookup__menu" id="lookup-22"> |
| | | <ul |
| | |
| | | <!-- 使用产品3 UseProduct3__c --> |
| | | <div |
| | | aura:id="UseProduct3_List" |
| | | class="slds-form-element slds-lookup slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-5" |
| | | class="slds-form-element slds-lookup slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6" |
| | | data-select="single" |
| | | > |
| | | <!-- label="使用产品3" --> |
| | |
| | | class="field" |
| | | value="{!v.UseProduct3}" |
| | | updateOn="keyup" |
| | | variant="label-hidden" |
| | | /> |
| | | <div class="slds-lookup__menu" id="lookup-33"> |
| | | <ul |
| | |
| | | <!-- 效果/进度 EffectProgress__c--> |
| | | <div |
| | | aura:id="product_category_select1" |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-5" |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6" |
| | | > |
| | | {!v.fieldsmap.EffectProgress__c} |
| | | <ui:inputSelect |
| | |
| | | <hr /> |
| | | <!-- 产品1同类耗材科室月使用量 ConsumptionOfConsumables__c--> |
| | | <div |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-5" |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6" |
| | | > |
| | | {!v.fieldsmap.ConsumptionOfConsumables__c} |
| | | <!-- <ui:inputText aura:id="select_ConsumptionOfConsumables" class="slds-select" |
| | | change="{!c.select_ConsumptionOfConsumables}" /> --> |
| | | <lightning:input |
| | | type="text" |
| | | onchange="{!c.select_ConsumptionOfConsumables}" |
| | | <ui:inputText |
| | | aura:id="select_ConsumptionOfConsumables" |
| | | variant="label-hidden" |
| | | class="slds-select" |
| | | change="{!c.select_ConsumptionOfConsumables}" |
| | | /> |
| | | </div> |
| | | <!-- 术士分类 WarlockClassification__c --> |
| | |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6" |
| | | > |
| | | {!v.fieldsmap.warlocksNumber__c} |
| | | <!-- <ui:inputText aura:id="select_warlocksNumber" class="slds-select" |
| | | change="{!c.select_warlocksNumber}" /> --> |
| | | <lightning:input |
| | | type="text" |
| | | onchange="{!c.select_warlocksNumber}" |
| | | <ui:inputText |
| | | aura:id="select_warlocksNumber" |
| | | variant="label-hidden" |
| | | class="slds-select" |
| | | change="{!c.select_warlocksNumber}" |
| | | /> |
| | | </div> |
| | | <!-- 支援需求 WorkMark__c--> |
| | | <div style="padding-left: 12px"> |
| | | <div style="padding-left: 20px"> |
| | | {!v.fieldsmap.WorkMark__c} |
| | | <lightning:input type="checkbox" aura:id="select_WorkMark" /> |
| | | </div> |
| | |
| | | @import 'c/lexCssUtility'; |
| | | |
| | | .THIS .bcolor { |
| | | color: #333; |
| | | } |
| | | |
| | | .THIS.height100vh { |
| | | height: 100vh; |
| | | } |
| | | |
| | | .THIS.contents_wrapper { |
| | | padding-top: 50px; |
| | | } |
| | | |
| | | .THIS .mt5 { |
| | | margin-top: 5px; |
| | | } |
| | | |
| | | .THIS .mt40 { |
| | | margin-top: 40px; |
| | | } |
| | | |
| | | .THIS .edit_button { |
| | | float: right; |
| | | margin: -1.5em 0.5em 0 0; |
| | | border: 0; |
| | | } |
| | | |
| | | .THIS .no_data_area { |
| | | text-align: center; |
| | | margin: .5em 0; |
| | | margin: 0.5em 0; |
| | | } |
| | | |
| | | .THIS.report_list_area { |
| | | margin: 40px 0 20px 100px; |
| | | height: 60vh; |
| | | overflow-y: scroll; |
| | | } |
| | | |
| | | .THIS .report_radio { |
| | | float: left; |
| | | } |
| | | |
| | | .THIS .table_header { |
| | | width: 9.4rem; |
| | | height: 2em; |
| | | } |
| | | |
| | | .THIS.disp_none { |
| | | display: none; |
| | | } |
| | | |
| | | .THIS .disp_none { |
| | | display: none; |
| | | } |
| | | |
| | | .THIS .tr { |
| | | text-align: right; |
| | | } |
| | | |
| | | .THIS .close_button { |
| | | float: right; |
| | | margin-top: -2em; |
| | | } |
| | | |
| | | .THIS .close_icn svg { |
| | | fill: #fefefe; |
| | | } |
| | | |
| | | .THIS .slds-progress__marker { |
| | | cursor: default; |
| | | } |
| | | |
| | | .THIS .progress_0 { |
| | | width: 0%; |
| | | } |
| | | |
| | | .THIS .progress_100 { |
| | | width: 100%; |
| | | } |
| | | |
| | | .THIS .new_btn_area { |
| | | text-align: center; |
| | | margin-top: 22px; |
| | | } |
| | | |
| | | .THIS .new_btn { |
| | | width: 100%; |
| | | } |
| | | |
| | | .THIS .save_button_area { |
| | | margin: 1em 0; |
| | | text-align: right; |
| | | } |
| | | |
| | | .THIS .save_button { |
| | | background-color: #ffa500; |
| | | border: 1px solid #ff8c00; |
| | | } |
| | | |
| | | .THIS .report_data_header { |
| | | border-bottom: 2px solid #ccc; |
| | | } |
| | | |
| | | .THIS .report_data_area { |
| | | border-bottom: 1px solid #ccc; |
| | | } |
| | | |
| | | .THIS.fade { |
| | | transition: 5s opacity linear; |
| | | } |
| | | |
| | | .THIS.animation_off { |
| | | opacity: 0; |
| | | } |
| | | |
| | | .THIS.animation_on { |
| | | opacity: 1; |
| | | } |
| | | |
| | | .THIS .fade { |
| | | transition: 5s opacity linear; |
| | | } |
| | | |
| | | .THIS .animation_off { |
| | | opacity: 0; |
| | | } |
| | | |
| | | .THIS .animation_on { |
| | | opacity: 1; |
| | | } |
| | | |
| | | .THIS .divbotuser { |
| | | width: fit-content; |
| | | } |
| | |
| | | .THIS .customRequired { |
| | | font-weight: 400; |
| | | } |
| | | |
| | | .THIS .customRequired:before { |
| | | content: "*"; |
| | | margin: 0 0.125rem 0 0.125rem; |
| | | color: rgb(194, 57, 52); |
| | | float: left; |
| | | } |
| | | |
| | | .THIS .none { |
| | | display: none; |
| | | } |
| | |
| | | |
| | | .THIS tr:hover .encrypt { |
| | | display: none; |
| | | } |
| | | |
| | | .THIS tr:hover .encrypt { |
| | | display: none; |
| | | } |
| | | |
| | | .THIS .buttonFontSize { |
| | | font-size: 18px; |
| | | min-width: 80px; |
| | | max-width: 110px; |
| | | } |
| | | |
| | | .THIS .fontSize { |
| | | font-size: 18px; |
| | | } |
| | | |
| | | .THIS thead th { |
| | | font-size: 18px; |
| | | } |
| | | |
| | | .THIS table { |
| | | table-layout: fixed; |
| | | } |
| | | .THIS td { |
| | | white-space: normal; |
| | | overflow-wrap: break-word; |
| | | } |
| | |
| | | }, |
| | | |
| | | createAopp: function (component, event, helper) { |
| | | var addRecordEvent = $A.get('e.force:createRecord'); |
| | | var addRecordEvent = $A.get("e.force:createRecord"); |
| | | addRecordEvent.setParams({ |
| | | entityApiName: 'Agency_Opportunity__c', |
| | | recordTypeId: '012100000006KW7' |
| | | entityApiName: "Agency_Opportunity__c", |
| | | recordTypeId: "012100000006KW7" |
| | | }); |
| | | addRecordEvent.fire(); |
| | | }, |
| | | |
| | | new_report: function (component, event, helper) { |
| | | component.find('save_button').set('v.label', '保存并新建'); |
| | | component.find("save_button").set("v.label", "保存并新建"); |
| | | helper.new_report(component, event, helper); |
| | | }, |
| | | |
| | | copy_button: function (component, event, helper) { |
| | | component.find('save_button').set('v.label', '保存并新建'); |
| | | component.find("save_button").set("v.label", "保存并新建"); |
| | | helper.copy_button(component, event, helper); |
| | | }, |
| | | delete_button: function (component, event, helper) { |
| | |
| | | }, |
| | | |
| | | edit_button: function (component, event, helper) { |
| | | component.find('save_button').set('v.label', '保存'); |
| | | component.find("save_button").set("v.label", "保存"); |
| | | helper.edit_button(component, event, helper); |
| | | }, |
| | | |
| | |
| | | event.preventDefault(); // stop form submission |
| | | var showValidationError = false; |
| | | var fields = component.find("newOpportunityField"); |
| | | var vaildationFailReason = ''; |
| | | var vaildationFailReason = ""; |
| | | let agencyReport = Object.create(null); |
| | | fields.forEach(function (field) { |
| | | if (field.get("v.fieldName") === 'Type__c' && $A.util.isEmpty(field.get("v.value"))) { |
| | | if ( |
| | | field.get("v.fieldName") === "Type__c" && |
| | | $A.util.isEmpty(field.get("v.value")) |
| | | ) { |
| | | showValidationError = true; |
| | | vaildationFailReason = "分类不能为空!"; |
| | | } else if (field.get("v.fieldName") === 'Doctor_Division1__c' && $A.util.isEmpty(field.get("v.value"))) { |
| | | } else if ( |
| | | field.get("v.fieldName") === "Doctor_Division1__c" && |
| | | $A.util.isEmpty(field.get("v.value")) |
| | | ) { |
| | | showValidationError = true; |
| | | if (vaildationFailReason != '') { |
| | | if (vaildationFailReason != "") { |
| | | vaildationFailReason += "医生区分(职务)不能为空!"; |
| | | } else { |
| | | vaildationFailReason = "医生区分(职务)不能为空!"; |
| | | } |
| | | |
| | | } |
| | | //SWAG-CF58C3 fy start |
| | | if (field.get("v.fieldName") === 'Name') { |
| | | agencyReport['name'] = field.get("v.value"); |
| | | } else if (field.get("v.fieldName") === 'Type__c') { |
| | | agencyReport['type'] = field.get("v.value"); |
| | | } else if (field.get("v.fieldName") === 'Doctor_Division1__c') { |
| | | agencyReport['doctorDivision1'] = field.get("v.value"); |
| | | if (field.get("v.fieldName") === "Name") { |
| | | agencyReport["name"] = field.get("v.value"); |
| | | } else if (field.get("v.fieldName") === "Type__c") { |
| | | agencyReport["type"] = field.get("v.value"); |
| | | } else if (field.get("v.fieldName") === "Doctor_Division1__c") { |
| | | agencyReport["doctorDivision1"] = field.get("v.value"); |
| | | } |
| | | //SWAG-CF58C3 fy end |
| | | }); |
| | | if (!showValidationError) { |
| | | //SWAG-CF58C3 fy start |
| | | var agencyHospitalid = component.get('v.hospitalLinkId'); |
| | | var agencyHospitalid = component.get("v.hospitalLinkId"); |
| | | //zhj MEBG新方案改造 2022-11-29 start |
| | | debugger |
| | | let hospitalName = ''; |
| | | debugger; |
| | | let hospitalName = ""; |
| | | //调用后端searchAgencyDataId方法查询出医院下面所有客户人员dataid |
| | | helper.CallBackAction(component, 'searchAgencyDataId', { |
| | | helper.CallBackAction( |
| | | component, |
| | | "searchAgencyDataId", |
| | | { |
| | | hospitalId: agencyHospitalid |
| | | }, function (data) { |
| | | }, |
| | | function (data) { |
| | | if (data.getState() == "SUCCESS") { |
| | | var data = data.getReturnValue(); |
| | | if (data.IsSuccess == true) { |
| | | let agencyContactIds = '' |
| | | if (data.Message == '' && data.Data && data.Data.length > 0) { |
| | | let agencyContactIds = ""; |
| | | if (data.Message == "" && data.Data && data.Data.length > 0) { |
| | | hospitalName = data.Data[0].Agency_Hospital__r.Name; |
| | | for (var i = 0; i < data.Data.length; i++) { |
| | | if (data.Data[i].AWS_Data_Id__c) |
| | | agencyContactIds += ',' + data.Data[i].AWS_Data_Id__c; |
| | | agencyContactIds += "," + data.Data[i].AWS_Data_Id__c; |
| | | } |
| | | agencyContactIds = agencyContactIds.substring(1); |
| | | agencyReport['agencyContactIds'] = agencyContactIds; |
| | | agencyReport["agencyContactIds"] = agencyContactIds; |
| | | } else { |
| | | agencyReport['agencyContactIds'] = agencyContactIds; |
| | | agencyReport["agencyContactIds"] = agencyContactIds; |
| | | } |
| | | var arr = new Array(); |
| | | arr.push(agencyReport); |
| | | var requestData = JSON.stringify(arr); |
| | | // helper.set_aws_url(component,data,agencyHospitalid); |
| | | |
| | | var token = component.get('v.AWStoken'); |
| | | var newUrl = component.get('v.AWSinsert') + 'V2'; |
| | | var token = component.get("v.AWStoken"); |
| | | var newUrl = component.get("v.AWSinsert") + "V2"; |
| | | |
| | | component.set('v.login', true); |
| | | helper.insert_agencycontact(component, token, newUrl, requestData, agencyHospitalid, helper, hospitalName); |
| | | component.set("v.login", true); |
| | | helper.insert_agencycontact( |
| | | component, |
| | | token, |
| | | newUrl, |
| | | requestData, |
| | | agencyHospitalid, |
| | | helper, |
| | | hospitalName |
| | | ); |
| | | } else { |
| | | helper.ShowToast({ |
| | | "message": data.message, |
| | | "type": "error" |
| | | message: data.message, |
| | | type: "error" |
| | | }); |
| | | } |
| | | } else { |
| | | helper.ShowToast({ |
| | | "message": 'searchAgency失败', |
| | | "type": "error" |
| | | message: "searchAgency失败", |
| | | type: "error" |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | | ); |
| | | //zhj MEBG新方案改造 2022-11-29 end |
| | | // var arr = new Array(); |
| | | // arr.push(agencyReport); |
| | |
| | | //SWAG-CF58C3 fy end |
| | | // helper.newlyBuild(component, event, helper); |
| | | } else { |
| | | component.find('OppMessage').setError(vaildationFailReason); |
| | | component.find("OppMessage").setError(vaildationFailReason); |
| | | } |
| | | }, |
| | | |
| | |
| | | }, |
| | | |
| | | yes_button: function (component, event, helper) { |
| | | component.set('v.confirm_status', 1); |
| | | helper.close_confirm(component, component.get('v.modal_confirm_title'), component.get('v.modal_confirm_text')); |
| | | component.set("v.confirm_status", 1); |
| | | helper.close_confirm( |
| | | component, |
| | | component.get("v.modal_confirm_title"), |
| | | component.get("v.modal_confirm_text") |
| | | ); |
| | | }, |
| | | |
| | | no_button: function (component, event, helper) { |
| | | component.set('v.confirm_status', 2); |
| | | helper.close_confirm(component, component.get('v.modal_confirm_title'), component.get('v.modal_confirm_text')); |
| | | component.set("v.confirm_status", 2); |
| | | helper.close_confirm( |
| | | component, |
| | | component.get("v.modal_confirm_title"), |
| | | component.get("v.modal_confirm_text") |
| | | ); |
| | | }, |
| | | |
| | | toggle_report: function (component, event, helper) { |
| | |
| | | }, |
| | | |
| | | select_agency_change: function (component, event, helper) { |
| | | debugger |
| | | debugger; |
| | | helper.select_agency_change(component, event, helper); |
| | | }, |
| | | |
| | |
| | | helper.searchHos(component, event, helper); |
| | | } |
| | | } else { |
| | | if (hospital_name == '') { |
| | | if (hospital_name == "") { |
| | | helper.hideSearchs(component, event, helper); |
| | | } else { |
| | | helper.hideSearch(component, event, helper); |
| | |
| | | UseProduct1Change: function (component, event, helper) { |
| | | var UseProduct1Name = event.getParam("value"); |
| | | var UseProduct1Nameold = component.get("v.UseProduct1s"); |
| | | debugger |
| | | debugger; |
| | | if (UseProduct1Name.match(/(\S+\s)+/)) { |
| | | if (UseProduct1Name != UseProduct1Nameold) { |
| | | helper.searchUseProduct1(component, event, helper); |
| | | } |
| | | } else { |
| | | if (UseProduct1Name == '') { |
| | | if (UseProduct1Name == "") { |
| | | helper.hideSearchUseProduct1s(component, event, helper); |
| | | } else { |
| | | helper.hideSearchUseProduct1(component, event, helper); |
| | |
| | | helper.searchUseProduct2(component, event, helper); |
| | | } |
| | | } else { |
| | | if (UseProduct2Name == '') { |
| | | if (UseProduct2Name == "") { |
| | | helper.hideSearchUseProduct2s(component, event, helper); |
| | | } else { |
| | | helper.hideSearchUseProduct2(component, event, helper); |
| | |
| | | helper.searchUseProduct3(component, event, helper); |
| | | } |
| | | } else { |
| | | if (UseProduct3Name == '') { |
| | | if (UseProduct3Name == "") { |
| | | helper.hideSearchUseProduct3s(component, event, helper); |
| | | } else { |
| | | helper.hideSearchUseProduct3(component, event, helper); |
| | |
| | | seletUseProduct3Change: function (component, event, helper) { |
| | | helper.seletUseProduct3Change(component, event, helper); |
| | | }, |
| | | |
| | | |
| | | select_department: function (component, event, helper) { |
| | | helper.setOpportunity_cfilter(component); |
| | |
| | | onDrop: function (component, event, helper) { |
| | | event.stopPropagation(); |
| | | event.preventDefault(); |
| | | event.dataTransfer.dropEffect = 'copy'; |
| | | event.dataTransfer.dropEffect = "copy"; |
| | | var files = event.dataTransfer.files; |
| | | helper.readFile(component, helper, files[0]); |
| | | }, |
| | | CreateRecord: function (component, event, helper) { |
| | | var files = event.getSource().get("v.files"); |
| | | helper.readFile(component, helper, files[0]); |
| | | component.set("v.showErrorInfo", false); |
| | | }, |
| | | |
| | | processFileContent: function (component, event, helper) { |
| | | helper.saveRecords(component, event, helper); |
| | | component.set("v.showErrorInfo", false); |
| | | }, |
| | | |
| | | cancel: function (component, event, helper) { |
| | |
| | | }, |
| | | exportDate: function (component, event, helper) { |
| | | var stockData = component.get("v.reports_date"); |
| | | console.log('导出数据' + stockData); |
| | | console.log("导出数据" + stockData); |
| | | var csv = helper.convertArrayOfObjectsToCSV(component, stockData); |
| | | if (csv == null) { return; } |
| | | if (csv == null) { |
| | | return; |
| | | } |
| | | |
| | | var universalBOM = "\uFEFF"; |
| | | var hiddenElement = document.createElement('a'); |
| | | hiddenElement.href = 'data:text/csv;charset=utf-8,' + encodeURI(universalBOM + csv); |
| | | hiddenElement.target = '_self'; // |
| | | hiddenElement.download = 'ExportData.csv'; // CSV file Name* you can change it.[only name not .csv] |
| | | var hiddenElement = document.createElement("a"); |
| | | hiddenElement.href = |
| | | "data:text/csv;charset=utf-8," + encodeURI(universalBOM + csv); |
| | | hiddenElement.target = "_self"; // |
| | | hiddenElement.download = "ExportData.csv"; // CSV file Name* you can change it.[only name not .csv] |
| | | document.body.appendChild(hiddenElement); // Required for FireFox browser |
| | | hiddenElement.click(); // using click() js function to download csv file |
| | | |
| | | }, |
| | | export_condition: function (component, event, helper) { |
| | | helper.showExport(component); |
| | |
| | | helper.select_repores_date(component, event, helper); |
| | | }, |
| | | export: function (component, event, helper) { |
| | | console.log('进入export'); |
| | | console.log("进入export"); |
| | | var stockData = component.get("v.reports_date"); |
| | | console.log('查出的数据' + stockData); |
| | | console.log("查出的数据" + stockData); |
| | | }, |
| | | close_import: function (component, event, helper) { |
| | | component.set("v.showMain", true); |
| | |
| | | helper.selectpurposetype(component, event, helper); |
| | | }, |
| | | return_main_page: function (component, event, helper) { |
| | | window.open('/customer/', '_self'); |
| | | }, |
| | | exportErrorInfo: function (component, event, helper) { |
| | | helper.exportErrorInfoHelper(component); |
| | | }, |
| | | closeErrorDiv: function (component, event, helper) { |
| | | var errorDiv01 = component.find('errorDiv01'); |
| | | $A.util.addClass(errorDiv01, 'slds-hide'); |
| | | window.open("/customer/", "_self"); |
| | | } |
| | | }) |
| | | }); |
| | |
| | | ({ |
| | | doinit: function (component, event, helper) { |
| | | document.title = "追溯日报"; |
| | | |
| | | debugger; |
| | | this.report_date_list(component, event, helper, 5); |
| | | component.set("v.login", true); |
| | | var action = component.get("c.getalldata"); |
| | |
| | | component.set("v.allselectlist", res.allselectlist); |
| | | component.set("v.doclist", res.doclist); |
| | | //fy |
| | | |
| | | debugger; |
| | | var xx = res.UserProType; |
| | | component.set("v.UserProType", res.UserProType); |
| | | var gg = component.get("v.UserProType"); |
| | |
| | | component.set("v.PIConfig", res.PIConfig); // 20220222 PI改造 by Bright |
| | | component.set("v.login", false); |
| | | } else { |
| | | //component.set('v.errorMessage', 'doinit failed.'); |
| | | this.error("doinit failed."); |
| | | //this.showErrorToast(component); |
| | | component.set("v.errorMessage", "doinit failed."); |
| | | this.showErrorToast(component); |
| | | component.set("v.login", false); |
| | | } |
| | | }); |
| | | $A.enqueueAction(action); |
| | | }, |
| | | doinitSave: function (component, event, helper) { |
| | | document.title = "追溯日报"; |
| | | component.set("v.loginEdit", true); |
| | | this.report_date_list(component, event, helper, 5); |
| | | var action = component.get("c.getalldata"); |
| | | action.setCallback(this, function (response) { |
| | | var state = response.getState(); |
| | | if (state == "SUCCESS") { |
| | | var res = response.getReturnValue(); |
| | | component.set("v.alldata", res.reports); |
| | | component.set("v.fieldsmap", res.fieldsMap); |
| | | component.set("v.allselectlist", res.allselectlist); |
| | | component.set("v.doclist", res.doclist); |
| | | //fy |
| | | |
| | | var xx = res.UserProType; |
| | | component.set("v.UserProType", res.UserProType); |
| | | var gg = component.get("v.UserProType"); |
| | | //fy |
| | | component |
| | | .find("select_agency_person") |
| | | .set( |
| | | "v.options", |
| | | this.conv_selected(res.allselectlist.AgencyPerson__c) |
| | | ); |
| | | component |
| | | .find("select_DealerPersonnel") |
| | | .set( |
| | | "v.options", |
| | | this.conv_selected(res.allselectlist.DealerPersonnel__c) |
| | | ); |
| | | component |
| | | .find("select_purpose_type") |
| | | .set( |
| | | "v.options", |
| | | this.conv_selected(res.allselectlist.WorkRecord__c) |
| | | ); |
| | | component |
| | | .find("select_ProductClassification") |
| | | .set( |
| | | "v.options", |
| | | this.conv_selected(res.allselectlist.ProductClassification__c) |
| | | ); |
| | | component |
| | | .find("select_stageName") |
| | | .set("v.options", this.conv_selected(res.allselectlist.StageName__c)); |
| | | component.set( |
| | | "v.selected_agency_person", |
| | | res.allselectlist.AgencyPerson__c[0].label |
| | | ); |
| | | component.set("v.dialog_type", "新建"); |
| | | this.get_reports( |
| | | component, |
| | | event, |
| | | helper, |
| | | component.find("select_date").get("v.value"), |
| | | component.find("select_agency_person").get("v.value") |
| | | ); |
| | | |
| | | component.set("v.PIConfig", res.PIConfig); // 20220222 PI改造 by Bright |
| | | component.set("v.loginEdit", false); |
| | | } else { |
| | | //component.set('v.errorMessage', 'doinit failed.'); |
| | | this.error("doinit failed."); |
| | | //this.showErrorToast(component); |
| | | component.set("v.loginEdit", false); |
| | | } |
| | | }); |
| | | $A.enqueueAction(action); |
| | |
| | | date_str: date_str, |
| | | person_str: person_str |
| | | }); |
| | | component.set("v.loginEdit", true); |
| | | component.set("v.login", true); |
| | | action.setCallback(this, function (response) { |
| | | debugger; |
| | | var state = response.getState(); |
| | | if (state == "SUCCESS") { |
| | | var res = response.getReturnValue(); |
| | |
| | | m[data.object[di].dataId] = data.object[di]; |
| | | } |
| | | } |
| | | |
| | | debugger; |
| | | for (let ri in res.reports) { |
| | | if ( |
| | | res.reports[ri] && |
| | |
| | | component.set("v.report_count", res.reports.length); |
| | | } |
| | | //fy 20220414 end |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | }, |
| | | staticResourceAgencyContact.token |
| | | ); |
| | | } else { |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | } |
| | | } |
| | | } else { |
| | | component.set("v.list_message", "no_data"); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | } |
| | | } else { |
| | | //component.set('v.errorMessage', 'get_reports failed.'); |
| | | this.error("get_reports failed."); |
| | | //this.showErrorToast(component); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.errorMessage", "get_reports failed."); |
| | | this.showErrorToast(component); |
| | | component.set("v.login", false); |
| | | } |
| | | }); |
| | | $A.enqueueAction(action); |
| | |
| | | }, |
| | | //复制和编辑回显的位置 |
| | | toggle_report: function (component) { |
| | | debugger; |
| | | var modal_window = component.find("modal_window"); |
| | | var modal_bg = component.find("modal_bg"); |
| | | if ($A.util.hasClass(modal_window, "disp_none")) { |
| | |
| | | .find("select_WorkMark") |
| | | .set("v.checked", select_data["WorkMark__c"]); |
| | | } |
| | | debugger; |
| | | |
| | | var report_id = component.get("v.edit_copy_select_report_id"); |
| | | if (report_id != "") { |
| | | var select_EffectProgress1 = ""; |
| | |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | toggle_report_edit: function (component) { |
| | | var modal_window = component.find("modal_window"); |
| | | var modal_bg = component.find("modal_bg"); |
| | | if ($A.util.hasClass(modal_window, "disp_none")) { |
| | | // OPEN |
| | | $A.util.removeClass(modal_window, "disp_none"); |
| | | $A.util.removeClass(modal_bg, "disp_none"); |
| | | component.set("v.loginEdit", true); |
| | | //复制 和编辑 回显问题在这里面 |
| | | if ( |
| | | component.get("v.mode") == "edit" || |
| | | component.get("v.mode") == "copy" |
| | | ) { |
| | | var select_data = ""; |
| | | if (component.get("v.mode") == "edit") { |
| | | select_data = component.get("v.select_report_data"); |
| | | } else if (component.get("v.mode") == "copy") { |
| | | select_data = component.get("v.select_report_data_radio"); |
| | | } |
| | | var reports = component.get("v.reports"); |
| | | var Agency_Hospital_text = ""; |
| | | var Agency_Hospital_parent_id = ""; |
| | | // 医院名 |
| | | if (select_data["Agency_Hospital__c"] != "") { |
| | | for (var i = 0; i < reports.length; i++) { |
| | | if ( |
| | | reports[i]["Agency_Hospital__c"] == |
| | | select_data["Agency_Hospital__c"] |
| | | ) { |
| | | Agency_Hospital_text = reports[i]["Agency_Hospital__r"]["Name"]; |
| | | Agency_Hospital_parent_id = |
| | | reports[i]["Agency_Hospital__r"]["Hospital__c"]; |
| | | } |
| | | } |
| | | component.set("v.hospital", Agency_Hospital_text); |
| | | component.set("v.hospitalId", Agency_Hospital_parent_id); |
| | | component.set("v.hospitalLinkId", select_data["Agency_Hospital__c"]); |
| | | component.find("new_con").set("v.disabled", false); |
| | | } |
| | | //使用产品1(产品型号) |
| | | var UseProduct1Text = ""; |
| | | var UseProduct1Id = ""; |
| | | if ( |
| | | select_data["UseProduct1__c"] != "" && |
| | | select_data["UseProduct1__c"] != undefined |
| | | ) { |
| | | for (var i = 0; i < reports.length; i++) { |
| | | if (reports[i]["UseProduct1__c"] == select_data["UseProduct1__c"]) { |
| | | UseProduct1Text = |
| | | reports[i]["UseProduct1__r"]["Asset_Model_No__c"]; |
| | | UseProduct1Id = reports[i]["UseProduct1__c"]; |
| | | } |
| | | } |
| | | component.set("v.UseProduct1", UseProduct1Text); |
| | | component.set("v.UseProduct1Id", select_data["UseProduct1__c"]); |
| | | } |
| | | //使用产品2 |
| | | var UseProduct2Text = ""; |
| | | var UseProduct2Id = ""; |
| | | if ( |
| | | select_data["UseProduct2__c"] != "" && |
| | | select_data["UseProduct2__c"] != undefined |
| | | ) { |
| | | for (var i = 0; i < reports.length; i++) { |
| | | if (reports[i]["UseProduct2__c"] == select_data["UseProduct2__c"]) { |
| | | UseProduct2Text = |
| | | reports[i]["UseProduct2__r"]["Asset_Model_No__c"]; |
| | | UseProduct2Id = reports[i]["UseProduct2__c"]; |
| | | } |
| | | } |
| | | component.set("v.UseProduct2", UseProduct2Text); |
| | | component.set("v.UseProduct2Id", select_data["UseProduct2__c"]); |
| | | } |
| | | //使用产品3 |
| | | var UseProduct3Text = ""; |
| | | var UseProduct3Id = ""; |
| | | if ( |
| | | select_data["UseProduct3__c"] != "" && |
| | | select_data["UseProduct3__c"] != undefined |
| | | ) { |
| | | for (var i = 0; i < reports.length; i++) { |
| | | if (reports[i]["UseProduct3__c"] == select_data["UseProduct3__c"]) { |
| | | UseProduct3Text = |
| | | reports[i]["UseProduct3__r"]["Asset_Model_No__c"]; |
| | | UseProduct3Id = reports[i]["UseProduct3__c"]; |
| | | } |
| | | } |
| | | component.set("v.UseProduct3", UseProduct3Text); |
| | | component.set("v.UseProduct3Id", select_data["UseProduct3__c"]); |
| | | } |
| | | //活动日 |
| | | var reportDate; |
| | | if (select_data["Report_Date__c"] != "") { |
| | | for (var i = 0; i < reports.length; i++) { |
| | | if (reports[i]["Report_Date__c"] == select_data["Report_Date__c"]) { |
| | | reportDate = reports[i]["Report_Date__c"]; |
| | | } |
| | | } |
| | | component.set("v.data.Report_Date__c", reportDate); |
| | | } |
| | | // 科室 |
| | | // if (select_data['Department_Cateogy__c'] != '') { |
| | | // component.find('select_department').set('v.value',select_data['Department_Cateogy__c']); |
| | | // } |
| | | //fy Department_Cateogy_text__c |
| | | if (select_data["Department_Cateogy_text__c"] != "") { |
| | | component |
| | | .find("select_department") |
| | | .set("v.value", select_data["Department_Cateogy_text__c"]); |
| | | } |
| | | //经销商人员 |
| | | if (select_data["DealerPersonnel__c"] != "") { |
| | | this.set_selected( |
| | | component, |
| | | "select_DealerPersonnel", |
| | | select_data["DealerPersonnel__c"] |
| | | ); |
| | | } |
| | | // 活动区分 |
| | | if (select_data["WorkRecord__c"] != "") { |
| | | this.set_selected( |
| | | component, |
| | | "select_purpose_type", |
| | | select_data["WorkRecord__c"] |
| | | ); |
| | | this.selectPurposeType(component); |
| | | } |
| | | // 拜访人 |
| | | if (select_data["WorkRecord__c"] == "科室会") { |
| | | component.set( |
| | | "v.default_select_doctor_id2", |
| | | select_data["doctor3__c"] |
| | | ); |
| | | var a = component.get("v.default_select_doctor_id2"); |
| | | this.set_doctor_list_edit(component); |
| | | } else { |
| | | component.set( |
| | | "v.default_select_doctor_id", |
| | | select_data["doctor2__c"] |
| | | ); |
| | | this.set_doctor_list_edit(component); |
| | | } |
| | | //产品分类(第三分类) |
| | | if (select_data["ProductClassification__c"] != null) { |
| | | this.set_selected( |
| | | component, |
| | | "select_ProductClassification", |
| | | select_data["ProductClassification__c"] |
| | | ); |
| | | this.selectProductClassification(component); |
| | | } |
| | | // 产品1同类耗材科室月使用量 |
| | | if (select_data["ConsumptionOfConsumables__c"] != "") { |
| | | component |
| | | .find("select_ConsumptionOfConsumables") |
| | | .set("v.value", select_data["ConsumptionOfConsumables__c"]); |
| | | } |
| | | // 产品用量 |
| | | if (select_data["warlocksNumber__c"] != "") { |
| | | component |
| | | .find("select_warlocksNumber") |
| | | .set("v.value", select_data["warlocksNumber__c"]); |
| | | } |
| | | // 支援需求 |
| | | if (select_data["WorkMark__c"] != false) { |
| | | component |
| | | .find("select_WorkMark") |
| | | .set("v.checked", select_data["WorkMark__c"]); |
| | | } |
| | | var report_id = component.get("v.edit_copy_select_report_id"); |
| | | if (report_id != "") { |
| | | var select_EffectProgress1 = ""; |
| | | var WarlockClassification = ""; |
| | | var ProductCcategory = ""; |
| | | var productCategories = ""; |
| | | var i = 0; |
| | | for (i = 0; i < reports.length; i++) { |
| | | if (report_id == reports[i]["Id"]) { |
| | | select_EffectProgress1 = reports[i]["EffectProgress__c"]; |
| | | WarlockClassification = reports[i]["WarlockClassification__c"]; |
| | | ProductCcategory = reports[i]["ProductCcategory__c"]; |
| | | productCategories = reports[i]["productCategories__c"]; |
| | | break; |
| | | } |
| | | } |
| | | //效果/进度 |
| | | if (select_EffectProgress1 != null && select_EffectProgress1 != "") { |
| | | component |
| | | .find("select_EffectProgress") |
| | | .set("v.value", select_EffectProgress1); |
| | | } |
| | | //术士分类 |
| | | if (WarlockClassification != null && WarlockClassification != "") { |
| | | component |
| | | .find("select_OtherBrandConsumables") |
| | | .set("v.value", WarlockClassification); |
| | | } |
| | | //已采用其他品牌 |
| | | if (ProductCcategory != null && ProductCcategory != "") { |
| | | component |
| | | .find("select_ProductCcategory") |
| | | .set("v.value", ProductCcategory); |
| | | this.selectpurposetype(component); |
| | | } |
| | | //其他品牌产品类别 |
| | | if (productCategories != null && productCategories != "") { |
| | | component |
| | | .find("select_productCategories") |
| | | .set("v.value", productCategories); |
| | | } |
| | | component.set("v.edit_copy_select_report_id", ""); |
| | | } |
| | | } |
| | | } else { |
| | | var select_report_data = component.get("v.select_report_data"); |
| | | var Report_Date__c = component.get("v.data.Report_Date__c"); |
| | | var Agency_Hospital__c = component.get("v.hospitalLinkId"); |
| | | var UseProduct1__c = component.get("v.UseProduct1Id"); |
| | | var UseProduct2__c = component.get("v.UseProduct2Id"); |
| | | var UseProduct3__c = component.get("v.UseProduct3Id"); |
| | | var Department_Cateogy__c = component |
| | | .find("select_department") |
| | | .get("v.value"); |
| | | var ConsumptionOfConsumables__c = component |
| | | .find("select_ConsumptionOfConsumables") |
| | | .get("v.value"); |
| | | var DealerPersonnel__c = component |
| | | .find("select_DealerPersonnel") |
| | | .get("v.value"); |
| | | var doctor2__c = component.find("select_doctor").get("v.value"); |
| | | var WorkRecord__c = component.find("select_purpose_type").get("v.value"); |
| | | var EffectProgress__c = component |
| | | .find("select_EffectProgress") |
| | | .get("v.value"); |
| | | var WarlockClassification__c = component |
| | | .find("select_OtherBrandConsumables") |
| | | .get("v.value"); |
| | | var ProductCcategory__c = component |
| | | .find("select_ProductCcategory") |
| | | .get("v.value"); |
| | | var productCategories__c = component |
| | | .find("select_productCategories") |
| | | .get("v.value"); |
| | | var warlocksNumber__c = component |
| | | .find("select_warlocksNumber") |
| | | .get("v.value"); |
| | | var WorkMark__c = component.find("select_WorkMark").get("v.checked"); |
| | | if (component.get("v.mode") == "new") { |
| | | var confirm_title = "警告!"; |
| | | var confirm_text = "放弃新建日报?"; |
| | | if ( |
| | | !Report_Date__c && |
| | | !Agency_Hospital__c && |
| | | !UseProduct1__c && |
| | | !UseProduct2__c && |
| | | !UseProduct3__c && |
| | | !Department_Cateogy__c && |
| | | !ConsumptionOfConsumables__c && |
| | | !DealerPersonnel__c && |
| | | !doctor2__c && |
| | | !EffectProgress__c && |
| | | !WarlockClassification__c && |
| | | !ProductCcategory__c && |
| | | !productCategories__c && |
| | | !warlocksNumber__c && |
| | | !WorkMark__c && |
| | | !WorkRecord__c |
| | | ) { |
| | | this.allclear(component); |
| | | $A.util.addClass(modal_window, "disp_none"); |
| | | $A.util.addClass(modal_bg, "disp_none"); |
| | | this.close_confirm(component, confirm_title, confirm_text); |
| | | } else { |
| | | this.close_confirm(component, confirm_title, confirm_text); |
| | | } |
| | | } else if (component.get("v.mode") == "copy") { |
| | | var confirm_title = "警告!"; |
| | | var confirm_text = "放弃新建日报?"; |
| | | if ( |
| | | select_report_data["Report_Date__c"] == Report_Date__c && |
| | | select_report_data["Agency_Hospital__c"] == Agency_Hospital__c && |
| | | select_report_data["UseProduct1__c"] == UseProduct1__c && |
| | | select_report_data["UseProduct2__c"] == UseProduct2__c && |
| | | select_report_data["UseProduct3__c"] == UseProduct3__c && |
| | | select_report_data["Department_Cateogy__c"] == |
| | | Department_Cateogy__c && |
| | | select_report_data["ConsumptionOfConsumables__c"] == |
| | | ConsumptionOfConsumables__c && |
| | | select_report_data["DealerPersonnel__c"] == DealerPersonnel__c && |
| | | select_report_data["doctor2__c"] == doctor2__c && |
| | | select_report_data["EffectProgress__c"] == EffectProgress__c && |
| | | select_report_data["WarlockClassification__c"] == |
| | | WarlockClassification__c && |
| | | select_report_data["ProductCcategory__c"] == ProductCcategory__c && |
| | | select_report_data["productCategories__c"] == productCategories__c && |
| | | select_report_data["warlocksNumber__c"] == warlocksNumber__c && |
| | | select_report_data["WorkMark__c"] == WorkMark__c && |
| | | select_report_data["WorkRecord__c"] == WorkRecord__c |
| | | ) { |
| | | this.allclear(component); |
| | | $A.util.addClass(modal_window, "disp_none"); |
| | | $A.util.addClass(modal_bg, "disp_none"); |
| | | } else { |
| | | this.close_confirm(component, confirm_title, confirm_text); |
| | | } |
| | | } else if (component.get("v.mode") == "edit") { |
| | | var confirm_title = "警告!"; |
| | | var confirm_text = "放弃编辑日报?"; |
| | | if ( |
| | | select_report_data["Report_Date__c"] == Report_Date__c && |
| | | select_report_data["Agency_Hospital__c"] == Agency_Hospital__c && |
| | | select_report_data["UseProduct1__c"] == UseProduct1__c && |
| | | select_report_data["UseProduct2__c"] == UseProduct2__c && |
| | | select_report_data["UseProduct3__c"] == UseProduct3__c && |
| | | select_report_data["Department_Cateogy__c"] == |
| | | Department_Cateogy__c && |
| | | select_report_data["ConsumptionOfConsumables__c"] == |
| | | ConsumptionOfConsumables__c && |
| | | select_report_data["DealerPersonnel__c"] == DealerPersonnel__c && |
| | | select_report_data["doctor2__c"] == doctor2__c && |
| | | select_report_data["EffectProgress__c"] == EffectProgress__c && |
| | | select_report_data["WarlockClassification__c"] == |
| | | WarlockClassification__c && |
| | | select_report_data["ProductCcategory__c"] == ProductCcategory__c && |
| | | select_report_data["productCategories__c"] == productCategories__c && |
| | | select_report_data["warlocksNumber__c"] == warlocksNumber__c && |
| | | select_report_data["WorkMark__c"] == WorkMark__c && |
| | | select_report_data["WorkRecord__c"] == WorkRecord__c |
| | | ) { |
| | | this.allclear(component); |
| | | $A.util.addClass(modal_window, "disp_none"); |
| | | $A.util.addClass(modal_bg, "disp_none"); |
| | | } else { |
| | | this.close_confirm(component, confirm_title, confirm_text); |
| | | } |
| | | } |
| | | } |
| | | //component.set('v.loginEdit',false); |
| | | }, |
| | | //关闭页面是 小的提示框是否放弃新建日报 |
| | | close_confirm: function (component, title, text) { |
| | |
| | | var modal_bg = component.find("modal_bg"); |
| | | var modal_confirm = component.find("modal_confirm"); |
| | | var modal_confirm_bg = component.find("modal_confirm_bg"); |
| | | |
| | | debugger; |
| | | if (confirm_status == 0) { |
| | | $A.util.addClass(modal_window, "disp_none"); |
| | | $A.util.addClass(modal_bg, "disp_none"); |
| | |
| | | }, |
| | | // 复制按钮 |
| | | copy_button: function (component, event, helper) { |
| | | debugger; |
| | | this.allclear(component); |
| | | component.set("v.mode", "copy"); |
| | | component.set("v.dialog_type", "新建"); |
| | |
| | | }, |
| | | //删除按钮 |
| | | delete_button: function (component, event, helper) { |
| | | debugger; |
| | | var select_report_data = component.get("v.select_report_data_radio"); |
| | | if (confirm("是否删除该数据?")) { |
| | | debugger; |
| | | component.set("v.login", true); |
| | | var action = component.get("c.deleteAgencyReport"); |
| | | action.setParams({ |
| | |
| | | }, |
| | | //复制按钮可用 |
| | | change_report_radio: function (component, event, helper) { |
| | | debugger; |
| | | var reports = component.get("v.reports"); |
| | | for (var i = 0; i < reports.length; i++) { |
| | | if (reports[i].Name == event.getSource().get("v.label")) { |
| | |
| | | }, |
| | | //编辑按钮 |
| | | edit_button: function (component, event, helper) { |
| | | component.set("v.login", true); |
| | | debugger; |
| | | //component.set('v.loginEdit', true); |
| | | this.allclear(component); |
| | | //component.set('v.loadOpp', true); |
| | | debugger; |
| | | component.set("v.loadOpp", true); |
| | | var index = event.getSource().get("v.value"); |
| | | component.set("v.select_report_data", component.get("v.reports")[index]); |
| | | component.set("v.mode", "edit"); |
| | |
| | | "v.edit_copy_select_report_id", |
| | | component.get("v.reports")[index].Id |
| | | ); |
| | | var ret = this.create_report_header_edit( |
| | | var ret = this.create_report_header( |
| | | component, |
| | | event, |
| | | helper, |
| | |
| | | ); |
| | | // SWAG-CF58C3 fy start |
| | | this.set_aws_url(component, "Agency_Contact__c"); |
| | | //component.set('v.login', false); |
| | | // SWAG-CF58C3 fy end |
| | | }, |
| | | //保存 |
| | |
| | | .find("select_agency_person") |
| | | .get("v.value"); |
| | | } |
| | | |
| | | debugger; |
| | | // Agency_Report_Header__c |
| | | var Agency_Report_Header__c = component.get("v.agency_report_header_id"); |
| | | // 医院 |
| | |
| | | |
| | | // if (!productCategories__c) { error.push("其他品牌产品类别 不存在"); } |
| | | |
| | | //let errorMsg = ''; |
| | | for (var i = 0; i < error.length; i++) { |
| | | component.set("v.errorMessage", error[i]); |
| | | this.showErrorToast(component); |
| | | //errorMsg += '; ' + error[i] |
| | | //this.error(error[i]); |
| | | } |
| | | // if(errorMsg != '') |
| | | // this.error(errorMsg.substring(1)); |
| | | if (error.length > 0) { |
| | | component.find("save_button").set("v.disabled", false); |
| | | return false; |
| | | } |
| | | // 保存処理 |
| | | component.set("v.loginEdit", true); |
| | | component.set("v.login", true); |
| | | if (component.get("v.mode") == "edit") { |
| | | var Agency_Report__c = component.get("v.select_report_data").Id; |
| | | var action = component.get("c.editAgencyReport"); |
| | |
| | | action.setCallback(this, function (response) { |
| | | var state = response.getState(); |
| | | if (state == "SUCCESS") { |
| | | debugger; |
| | | component.set("v.successMessage", "编辑保存成功"); |
| | | this.showSuccessToast(component); |
| | | var report_id = response.getReturnValue(); |
| | |
| | | component.get("v.select_report_data").Person_In_Charge2__c |
| | | ); |
| | | component.find("save_button").set("v.disabled", false); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | } else { |
| | | //component.set('v.errorMessage', 'save_report failed.'); |
| | | this.error("保存日报失败"); |
| | | //this.showErrorToast(component); |
| | | component.set("v.errorMessage", "save_report failed."); |
| | | this.showErrorToast(component); |
| | | component.find("save_button").set("v.disabled", false); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | } |
| | | }); |
| | | $A.enqueueAction(action); |
| | |
| | | var data_list = component.find("modal_data_list_tr"); |
| | | } |
| | | } else { |
| | | // component.set('v.errorMessage', 'get_reports_now failed.'); |
| | | this.error("get_reports_now failed."); |
| | | //this.showErrorToast(component); |
| | | component.set("v.errorMessage", "get_reports_now failed."); |
| | | this.showErrorToast(component); |
| | | component.find("save_button").set("v.disabled", false); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | } |
| | | }); |
| | | $A.enqueueAction(action2); |
| | | this.allclear(component); |
| | | component.find("select_WorkMark").set("v.value", false); |
| | | component.find("save_button").set("v.disabled", false); |
| | | component.set("v.loginEdit", false); |
| | | debugger; |
| | | this.doinitSave(component, event, helper); |
| | | component.set("v.login", false); |
| | | this.doinit(component, event, helper); |
| | | } else { |
| | | var error = response.getError(); |
| | | //component.set('v.errorMessage', '保存日报失败'); |
| | | this.error("保存日报失败"); |
| | | //this.showErrorToast(component); |
| | | component.set("v.errorMessage", "saveAgencyReport failed."); |
| | | this.showErrorToast(component); |
| | | component.find("save_button").set("v.disabled", false); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | } |
| | | }); |
| | | $A.enqueueAction(action); |
| | |
| | | ) { |
| | | s_date = this.get_date_string(s_date); |
| | | if (s_date == false) { |
| | | //component.set('v.errorMessage', 'get_date_string failed.'); |
| | | this.error("get_date_string failed."); |
| | | //this.showErrorToast(component); |
| | | component.set("v.errorMessage", "get_date_string failed."); |
| | | this.showErrorToast(component); |
| | | return false; |
| | | } |
| | | var head_key = this.create_header_input_key(s_agency, s_date); |
| | | component.set("v.agency_report_header", head_key); |
| | | if (head_key == false) { |
| | | //component.set('v.errorMessage', 'create_header_input_key failed.'); |
| | | this.error("create_header_input_key failed."); |
| | | //this.showErrorToast(component); |
| | | component.set("v.errorMessage", "create_header_input_key failed."); |
| | | this.showErrorToast(component); |
| | | return false; |
| | | } |
| | | var key2 = s_date.replace(/-/g, ""); |
| | |
| | | component.set("v.login", false); |
| | | this.toggle_report(component, event, helper); |
| | | } else { |
| | | //component.set('v.errorMessage', 'createReportHeader callback failed.'); |
| | | this.error("createReportHeader callback failed."); |
| | | //this.showErrorToast(component); |
| | | component.set("v.login", false); |
| | | } |
| | | }); |
| | | $A.enqueueAction(action); |
| | | }, |
| | | create_report_header_edit: function ( |
| | | component, |
| | | event, |
| | | helper, |
| | | name, |
| | | s_agency, |
| | | s_date |
| | | ) { |
| | | s_date = this.get_date_string(s_date); |
| | | if (s_date == false) { |
| | | //component.set('v.errorMessage', 'get_date_string failed.'); |
| | | this.error("get_date_string failed."); |
| | | //this.showErrorToast(component); |
| | | return false; |
| | | } |
| | | var head_key = this.create_header_input_key(s_agency, s_date); |
| | | component.set("v.agency_report_header", head_key); |
| | | if (head_key == false) { |
| | | //component.set('v.errorMessage', 'create_header_input_key failed.'); |
| | | this.error("create_header_input_key failed."); |
| | | //this.showErrorToast(component); |
| | | return false; |
| | | } |
| | | var key2 = s_date.replace(/-/g, ""); |
| | | var action = component.get("c.createReportHeader"); |
| | | |
| | | action.setParams({ |
| | | name: name, |
| | | s_date: s_date, |
| | | s_agency: s_agency, |
| | | head_key: head_key |
| | | }); |
| | | component.set("v.login", true); |
| | | action.setCallback(this, function (response) { |
| | | var state = response.getState(); |
| | | if (state == "SUCCESS") { |
| | | var res = response.getReturnValue(); |
| | | component.set("v.agency_report_header_id", res); |
| | | component.set("v.login", false); |
| | | this.toggle_report_edit(component, event, helper); |
| | | } else { |
| | | //component.set('v.errorMessage', 'createReportHeader callback failed.'); |
| | | this.error("createReportHeader callback failed."); |
| | | //this.showErrorToast(component); |
| | | component.set("v.errorMessage", "createReportHeader callback failed."); |
| | | this.showErrorToast(component); |
| | | component.set("v.login", false); |
| | | } |
| | | }); |
| | |
| | | if (typeof s_date != "string") { |
| | | s_date = this.get_date_string(s_date); |
| | | if (s_date == false) { |
| | | //component.set('v.errorMessage', 'get_date_string in create_header_input_key.'); |
| | | this.error("get_date_string in create_header_input_key."); |
| | | //this.showErrorToast(component); |
| | | component.set( |
| | | "v.errorMessage", |
| | | "get_date_string in create_header_input_key." |
| | | ); |
| | | this.showErrorToast(component); |
| | | return false; |
| | | } |
| | | } |
| | |
| | | component.set("v.hospitalId", ""); |
| | | }, |
| | | selectHos: function (component, event, helper) { |
| | | debugger; |
| | | var hospital_list = component.find("hospital_list"); |
| | | $A.util.removeClass(hospital_list, "slds-is-open"); |
| | | var accname = event.currentTarget.dataset.accname; |
| | |
| | | component.set("v.hospitals", accname); |
| | | component.set("v.hospital", accname); |
| | | component.set("v.hospitalId", accid); |
| | | |
| | | debugger; |
| | | component.set("v.setdoctorlisthos", true); |
| | | this.set_doctor_list_edit(component, event, helper); |
| | | this.set_doctor_list(component, event, helper); |
| | | }, |
| | | |
| | | //模糊查询使用产品1(产品型号) |
| | |
| | | component.set("v.data.UseProduct1__c", ""); |
| | | }, |
| | | seletUseProduct1Change: function (component, event, helper) { |
| | | debugger; |
| | | var UseProduct1_List = component.find("UseProduct1_List"); |
| | | $A.util.removeClass(UseProduct1_List, "slds-is-open"); |
| | | var accname = event.currentTarget.dataset.accname; |
| | |
| | | component.set("v.UseProduct1s", accname); |
| | | component.set("v.UseProduct1", accname); |
| | | } else { |
| | | //component.set('v.errorMessage', '不能选择同样的产品'); |
| | | this.error("不能选择同样的产品"); |
| | | //this.showErrorToast(component); |
| | | component.set("v.errorMessage", "不能选择同样的产品"); |
| | | this.showErrorToast(component); |
| | | } |
| | | }, |
| | | //模糊查询使用产品2 |
| | |
| | | component.set("v.UseProduct2s", accname); |
| | | component.set("v.UseProduct2", accname); |
| | | } else { |
| | | //component.set('v.errorMessage', '不能选择同样的产品'); |
| | | this.error("不能选择同样的产品"); |
| | | //this.showErrorToast(component); |
| | | component.set("v.errorMessage", "不能选择同样的产品"); |
| | | this.showErrorToast(component); |
| | | } |
| | | }, |
| | | //模糊查询使用产品3 |
| | |
| | | component.set("v.UseProduct3s", accname); |
| | | component.set("v.UseProduct3", accname); |
| | | } else { |
| | | //component.set('v.errorMessage', '不能选择同样的产品'); |
| | | this.error("不能选择同样的产品"); |
| | | //this.showErrorToast(component); |
| | | component.set("v.errorMessage", "不能选择同样的产品"); |
| | | this.showErrorToast(component); |
| | | } |
| | | }, |
| | | //hospitalLinkId 经销商医院的ID 拜访人复制的地方 |
| | | doctor_change: function (component, event, helper) { |
| | | debugger; |
| | | var doctorurpose = component.find("select_purpose_type").get("v.value"); |
| | | var doctor_value = component.find("select_doctor").get("v.value"); |
| | | var doctor_list = component.get("v.doctor_list"); |
| | |
| | | component.set("v.AWSsearch", awsmap.searchUrl); |
| | | component.set("v.AWStransactionURL", awsmap.transactionURL); |
| | | } else { |
| | | // component.set('v.errorMessage', 'AWS url/token error.'); |
| | | this.error("AWS url/token error."); |
| | | //this.showErrorToast(component); |
| | | component.set("v.errorMessage", "AWS url/token error."); |
| | | this.showErrorToast(component); |
| | | component.set("v.login", false); |
| | | component.set("v.loginEdit", false); |
| | | } |
| | | }); |
| | | $A.enqueueAction(action); |
| | |
| | | helper, |
| | | hospitalName |
| | | ) { |
| | | console.log("newUrl = " + newUrl); |
| | | console.log("payload = " + payload); |
| | | console.log("token = " + token); |
| | | fetch(newUrl, { |
| | | method: "POST", |
| | | body: payload, |
| | |
| | | return data.json(); |
| | | }) |
| | | .then((result) => { |
| | | console.log("result = " + JSON.stringify(result)); |
| | | if (result.status == "0") { |
| | | $A.getCallback(function () { |
| | | helper.to_agencycontact(component, result, agencyHospitalid); |
| | |
| | | |
| | | this.to_confirm(component, token, confirmUrl, JSON.stringify(data)); |
| | | } else if (acMap.errormsg != "") { |
| | | // component.set('v.errorMessage', acMap.errormsg); |
| | | this.error(acMap.errormsg); |
| | | //this.showErrorToast(component); |
| | | component.set("v.errorMessage", acMap.errormsg); |
| | | this.showErrorToast(component); |
| | | component.set("v.login", false); |
| | | } else { |
| | | //component.set('v.errorMessage', 'agency contact insert id error.'); |
| | | this.error("agency contact insert id error."); |
| | | //this.showErrorToast(component); |
| | | component.set("v.errorMessage", "agency contact insert id error."); |
| | | this.showErrorToast(component); |
| | | component.set("v.login", false); |
| | | } |
| | | } else { |
| | | //component.set('v.errorMessage', 'agency contact insert error.'); |
| | | this.error("agency contact insert error."); |
| | | //this.showErrorToast(component); |
| | | component.set("v.errorMessage", "agency contact insert error."); |
| | | this.showErrorToast(component); |
| | | component.set("v.login", false); |
| | | } |
| | | }); |
| | |
| | | $A.util.addClass(modal_newAC, "disp_none"); |
| | | component.set("v.successMessage", ".拜访人已创建。"); |
| | | this.showSuccessToast(component); |
| | | component.set("v.login", false); |
| | | this.set_doctor_list_edit(component); |
| | | this.set_doctor_list(component); |
| | | } else { |
| | | //component.set('v.errorMessage', 'AWS confirm error.'); |
| | | this.error("AWS confirm error."); |
| | | //this.showErrorToast(component); |
| | | component.set("v.errorMessage", "AWS confirm error."); |
| | | this.showErrorToast(component); |
| | | component.set("v.login", false); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | // component.set('v.errorMessage', 'AWS confirm error.'); |
| | | this.error("AWS confirm error."); |
| | | //this.showErrorToast(component); |
| | | component.set("v.errorMessage", "AWS confirm error."); |
| | | this.showErrorToast(component); |
| | | component.set("v.login", false); |
| | | }); |
| | | }, |
| | | //SWAG-CF58C3 fy end 调用pi |
| | | |
| | | set_doctor_list: function (component) { |
| | | console.log("set_doctor_list"); |
| | | var doctor_value = component.find("select_purpose_type").get("v.value"); |
| | | var hospital_id = component.get("v.hospitalLinkId"); |
| | | console.log("hospital_id = " + hospital_id); |
| | | if (hospital_id) { |
| | | if (doctor_value == "科室会") { |
| | | component.set("v.loginEdit", true); |
| | | component.set("v.login", true); |
| | | this.set_doctor_list2(component); |
| | | } else { |
| | | component.set("v.loginEdit", true); |
| | | component.set("v.login", true); |
| | | var action = component.get("c.getDoctorList"); |
| | | action.setParams({ |
| | | hospital_id: hospital_id |
| | |
| | | action.setCallback(this, function (response) { |
| | | var state = response.getState(); |
| | | if (state == "SUCCESS") { |
| | | debugger; |
| | | var res = this.conv_selected(response.getReturnValue()); |
| | | //fy |
| | | var setdoctorlisthos = component.get("v.setdoctorlisthos"); |
| | |
| | | } |
| | | component.find("select_doctor").set("v.options", res); |
| | | component.set("v.doctor_title", doctor_title); |
| | | console.log("awsids = " + JSON.stringify(awsids)); |
| | | |
| | | if (awsids.length > 0) { |
| | | let PIConfig = component.get("v.PIConfig"); |
| | | let staticResourceAgencyContact = JSON.parse( |
| | |
| | | dataIds: awsids |
| | | }, |
| | | function (data) { |
| | | console.log("data = " + JSON.stringify(data)); |
| | | if (data && data.object && data.object.length) { |
| | | let m = {}; |
| | | for (let di in data.object) { |
| | |
| | | component.find("select_doctor").set("v.options", res); |
| | | } |
| | | |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | }, |
| | | staticResourceAgencyContact.token |
| | | ); |
| | |
| | | component.find("select_doctor").set("v.options", res); |
| | | } |
| | | |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | }, |
| | | staticResourceAgencyContact.token |
| | | ); |
| | |
| | | } |
| | | } |
| | | // component.set('v.default_select_doctor_id', ''); |
| | | |
| | | debugger; |
| | | component.set("v.doctor_list", res); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | } else { |
| | | // component.set('v.errorMessage', 'set_doctor_list failed.'); |
| | | this.error("set_doctor_list failed."); |
| | | //this.showErrorToast(component); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.errorMessage", "set_doctor_list failed."); |
| | | this.showErrorToast(component); |
| | | component.set("v.login", false); |
| | | } |
| | | }); |
| | | $A.enqueueAction(action); |
| | |
| | | component.find("select_doctor").set("v.options", ""); |
| | | } |
| | | } |
| | | component.set("v.loginEdit", false); |
| | | }, //fy 20220414 |
| | | set_doctor_list_edit: function (component) { |
| | | console.log("set_doctor_list"); |
| | | var doctor_value = component.find("select_purpose_type").get("v.value"); |
| | | var hospital_id = component.get("v.hospitalLinkId"); |
| | | console.log("hospital_id = " + hospital_id); |
| | | if (hospital_id) { |
| | | if (doctor_value == "科室会") { |
| | | component.set("v.loginEdit", true); |
| | | this.set_doctor_list2(component); |
| | | } else { |
| | | component.set("v.loginEdit", true); |
| | | var action = component.get("c.getDoctorList"); |
| | | action.setParams({ |
| | | hospital_id: hospital_id |
| | | }); |
| | | action.setCallback(this, function (response) { |
| | | var state = response.getState(); |
| | | if (state == "SUCCESS") { |
| | | var res = this.conv_selected(response.getReturnValue()); |
| | | //fy |
| | | var setdoctorlisthos = component.get("v.setdoctorlisthos"); |
| | | if (setdoctorlisthos) { |
| | | component.set("v.default_select_doctor_id", ""); |
| | | component.set("v.setdoctorlisthos", false); |
| | | } |
| | | //fy |
| | | var default_doctor = component.get("v.default_select_doctor_id"); |
| | | if (default_doctor != "" && res.length > 0) { |
| | | var doctor_title = ""; |
| | | let awsids = []; |
| | | for (var i = 0; i < res.length; i++) { |
| | | if (res[i].value == default_doctor) { |
| | | res[i].selected = true; |
| | | doctor_title = res[i].Doctor_Division1__c; |
| | | } else { |
| | | res[i].selected = false; |
| | | } |
| | | if (res[i].AWS_Data_Id__c) { |
| | | awsids.push(res[i].AWS_Data_Id__c); |
| | | } |
| | | } |
| | | component.find("select_doctor").set("v.options", res); |
| | | component.set("v.doctor_title", doctor_title); |
| | | console.log("awsids = " + JSON.stringify(awsids)); |
| | | if (awsids.length > 0) { |
| | | let PIConfig = component.get("v.PIConfig"); |
| | | let staticResourceAgencyContact = JSON.parse( |
| | | PIConfig.staticResourceAgencyContact |
| | | ); |
| | | AWSService.search( |
| | | staticResourceAgencyContact.searchUrl, |
| | | { |
| | | dataIds: awsids |
| | | }, |
| | | function (data) { |
| | | console.log("data = " + JSON.stringify(data)); |
| | | if (data && data.object && data.object.length) { |
| | | let m = {}; |
| | | for (let di in data.object) { |
| | | if (data.object[di] && data.object[di].dataId) { |
| | | m[data.object[di].dataId] = data.object[di]; |
| | | } |
| | | } |
| | | |
| | | for (let ri in res) { |
| | | if ( |
| | | res[ri] && |
| | | res[ri].AWS_Data_Id__c && |
| | | m.hasOwnProperty(res[ri].AWS_Data_Id__c) |
| | | ) { |
| | | res[ri].label = m[res[ri].AWS_Data_Id__c].name; |
| | | } |
| | | } |
| | | component.find("select_doctor").set("v.options", res); |
| | | } |
| | | |
| | | component.set("v.loginEdit", false); |
| | | }, |
| | | staticResourceAgencyContact.token |
| | | ); |
| | | } |
| | | } else { |
| | | let awsids = []; |
| | | for (var i = 0; i < res.length; i++) { |
| | | if (res[i].AWS_Data_Id__c) { |
| | | awsids.push(res[i].AWS_Data_Id__c); |
| | | } |
| | | } |
| | | component.find("select_doctor").set("v.options", res); |
| | | if (awsids.length > 0) { |
| | | let PIConfig = component.get("v.PIConfig"); |
| | | let staticResourceAgencyContact = JSON.parse( |
| | | PIConfig.staticResourceAgencyContact |
| | | ); |
| | | AWSService.search( |
| | | staticResourceAgencyContact.searchUrl, |
| | | { |
| | | dataIds: awsids |
| | | }, |
| | | function (data) { |
| | | if (data && data.object && data.object.length) { |
| | | let m = {}; |
| | | for (let di in data.object) { |
| | | if (data.object[di] && data.object[di].dataId) { |
| | | m[data.object[di].dataId] = data.object[di]; |
| | | } |
| | | } |
| | | |
| | | for (let ri in res) { |
| | | if ( |
| | | res[ri] && |
| | | res[ri].AWS_Data_Id__c && |
| | | m.hasOwnProperty(res[ri].AWS_Data_Id__c) |
| | | ) { |
| | | res[ri].label = m[res[ri].AWS_Data_Id__c].name; |
| | | } |
| | | } |
| | | component.find("select_doctor").set("v.options", res); |
| | | } |
| | | |
| | | component.set("v.loginEdit", false); |
| | | }, |
| | | staticResourceAgencyContact.token |
| | | ); |
| | | } |
| | | // component.find('select_doctor').set('v.options', res); |
| | | if (res.length > 0) { |
| | | component.set("v.doctor_title", res[0].Doctor_Division1__c); |
| | | } |
| | | } |
| | | // component.set('v.default_select_doctor_id', ''); |
| | | |
| | | component.set("v.doctor_list", res); |
| | | component.set("v.loginEdit", false); |
| | | } else { |
| | | // component.set('v.errorMessage', 'set_doctor_list failed.'); |
| | | this.error("set_doctor_list failed."); |
| | | //this.showErrorToast(component); |
| | | component.set("v.loginEdit", false); |
| | | } |
| | | }); |
| | | $A.enqueueAction(action); |
| | | } |
| | | } else { |
| | | if (doctor_value == "科室会") { |
| | | this.set_doctor_list2(component); |
| | | } else { |
| | | component.find("select_doctor").set("v.options", ""); |
| | | } |
| | | } |
| | | }, |
| | | set_doctor_list2: function (component) { |
| | | var action1 = component.get("c.selectdoctor3c"); |
| | | action1.setCallback(this, function (response) { |
| | | var state = response.getState(); |
| | | if (state == "SUCCESS") { |
| | | var res = response.getReturnValue(); |
| | | |
| | | debugger; |
| | | for (var i = 0; i < res.length; i++) { |
| | | if (res[i].selected == "true") { |
| | | res[i].selected = true; |
| | |
| | | res[i].selected = false; |
| | | } |
| | | } |
| | | |
| | | debugger; |
| | | component.find("select_doctor").set("v.options", res); |
| | | var doctor3value = component.get("v.default_select_doctor_id2"); |
| | | this.set_selected(component, "select_doctor", doctor3value); |
| | | component.set("v.login", false); |
| | | component.set("v.loginEdit", false); |
| | | } |
| | | }); |
| | | $A.enqueueAction(action1); |
| | |
| | | (p1bool && p0bool && product_category_id == pcId1) || |
| | | (p2bool && p0bool && product_category_id == pcId2) |
| | | ) { |
| | | //component.set('v.errorMessage', '不能选择同样的产品区分'); |
| | | this.error("不能选择同样的产品区分"); |
| | | //this.showErrorToast(component); |
| | | component.set("v.errorMessage", "不能选择同样的产品区分"); |
| | | this.showErrorToast(component); |
| | | component.find("select_Product1").set("v.value", ""); |
| | | } |
| | | }, |
| | |
| | | (p1bool && p0bool && product_category_id == pcId1) || |
| | | (p2bool && p0bool && product_category_id == pcId2) |
| | | ) { |
| | | //component.set('v.errorMessage', '不能选择同样的产品区分'); |
| | | this.error("不能选择同样的产品区分"); |
| | | //this.showErrorToast(component); |
| | | component.set("v.errorMessage", "不能选择同样的产品区分"); |
| | | this.showErrorToast(component); |
| | | component.set("v.UseProduct2_TEXT", ""); |
| | | } |
| | | }, |
| | |
| | | (p1bool && p0bool && product_category_id == pcId1) || |
| | | (p2bool && p0bool && product_category_id == pcId2) |
| | | ) { |
| | | //component.set('v.errorMessage', '不能选择同样的产品区分'); |
| | | this.error("不能选择同样的产品区分"); |
| | | //this.showErrorToast(component); |
| | | component.set("v.errorMessage", "不能选择同样的产品区分"); |
| | | this.showErrorToast(component); |
| | | component.find("select_Product3").set("v.value", ""); |
| | | } |
| | | }, |
| | |
| | | return obj; |
| | | }, |
| | | set_selected: function (component, aura_id_name, value) { |
| | | debugger; |
| | | var select_tmp = component.find(aura_id_name).get("v.options"); |
| | | if (select_tmp) { |
| | | for (var i = 0; i < select_tmp.length; i++) { |
| | |
| | | }, |
| | | //弹出 成功提示 |
| | | showSuccessToast: function (component) { |
| | | debugger; |
| | | $A.util.removeClass(component.find("successDiv"), "slds-hide"); |
| | | window.setTimeout( |
| | | $A.getCallback(function () { |
| | |
| | | }, |
| | | //弹出 成功提示 |
| | | showSuccessToast01: function (component) { |
| | | debugger; |
| | | $A.util.removeClass(component.find("successDiv01"), "slds-hide"); |
| | | window.setTimeout( |
| | | $A.getCallback(function () { |
| | |
| | | }, |
| | | //弹出 错误提示 |
| | | showErrorToast: function (component) { |
| | | debugger; |
| | | $A.util.removeClass(component.find("errorDiv"), "slds-hide"); |
| | | window.setTimeout( |
| | | $A.getCallback(function () { |
| | |
| | | }, |
| | | //弹出 错误提示 |
| | | showErrorToast01: function (component) { |
| | | debugger; |
| | | $A.util.removeClass(component.find("errorDiv01"), "slds-hide"); |
| | | window.setTimeout( |
| | | $A.getCallback(function () { |
| | |
| | | $A.util.addClass(modal_newAC, "disp_none"); |
| | | component.set("v.successMessage", ".拜访人已创建。"); |
| | | this.showSuccessToast(component); |
| | | this.set_doctor_list_edit(component, event, helper); |
| | | this.set_doctor_list(component, event, helper); |
| | | }, |
| | | createCancel: function (component, event, helper) { |
| | | component.set("v.truthy", false); |
| | |
| | | component.set("v.TargetFileName", output); |
| | | }; |
| | | reader.onload = function (e) { |
| | | debugger; |
| | | var data = e.target.result; |
| | | |
| | | component.set("v.fileContentData", data); |
| | |
| | | var content = |
| | | '<table class="table slds-table slds-table--bordered slds-table--cell-buffer">'; |
| | | content += '<thead><tr class="slds-text-title--caps">'; |
| | | content += '<th scope="col" style="width:100px">' + "行号" + "</th>"; |
| | | content += '<th scope="col">' + "行号" + "</th>"; |
| | | for (i = 0; i < headers.length; i++) { |
| | | if (headers[i] == "产品1同类耗材科室月使用量") { |
| | | content += |
| | | '<th scope="col" style="width:250px">' + headers[i] + "</th>"; |
| | | } else { |
| | | content += |
| | | '<th scope="col" style="width:200px">' + headers[i] + "</th>"; |
| | | } |
| | | content += '<th scope="col">' + headers[i] + "</th>"; |
| | | } |
| | | content += "</tr></thead>"; |
| | | for (var i = 1; i < allTextLines.length; i++) { |
| | |
| | | var result = response.getReturnValue(); |
| | | if (callback) callback(result); |
| | | } else { |
| | | //component.set('v.errorMessage', 'AWS url/token error.'); |
| | | this.error("AWS url/token error."); |
| | | //this.showErrorToast01(component); |
| | | component.set("v.errorMessage", "AWS url/token error."); |
| | | this.showErrorToast01(component); |
| | | component.set("v.login", false); |
| | | } |
| | | }); |
| | |
| | | }) |
| | | .catch((error) => { |
| | | console.log("AWS search error = " + JSON.stringify(error)); |
| | | // component.set('v.errorMessage', 'AWS search error.'); |
| | | this.error("AWS search error."); |
| | | //this.showErrorToast01(component); |
| | | component.set("v.errorMessage", "AWS search error."); |
| | | this.showErrorToast01(component); |
| | | component.set("v.login", false); |
| | | }); |
| | | }, |
| | | saveRecords: function (component, event, helper) { |
| | | //component.set('v.login', true); |
| | | component.set("v.modal_import_spinner", true); |
| | | component.set("v.login", true); |
| | | //fy 导入 202200506 start |
| | | var action1 = component.get("c.processDataAWSId"); |
| | | action1.setParams({ |
| | |
| | | action1.setCallback(this, function (response) { |
| | | var state = response.getState(); |
| | | if (state === "SUCCESS") { |
| | | debugger; |
| | | var ress = response.getReturnValue(); |
| | | if (ress) { |
| | | var valur = ress.split("error1"); |
| | | if (valur.length <= 1) { |
| | | var res = JSON.parse(response.getReturnValue()); |
| | | |
| | | debugger; |
| | | var dataArr = new Array(); |
| | | var dataMap = new Map(); |
| | | res.forEach((item) => { |
| | |
| | | dataMap.set(item.AWS_Data_Id__c, item.AWS_Data_Id__c); |
| | | } |
| | | }); |
| | | |
| | | debugger; |
| | | let obj = Object.create(null); |
| | | obj["dataIds"] = dataArr; |
| | | var payload = JSON.stringify(obj); |
| | |
| | | (result) => { |
| | | var token = result.token; |
| | | var searchUrl = result.searchUrl; |
| | | console.log("token = " + token); |
| | | console.log("searchUrl = " + searchUrl); |
| | | console.log("payload = " + payload); |
| | | this.search_core( |
| | | token, |
| | | searchUrl, |
| | | payload, |
| | | (result) => { |
| | | console.log("result = " + JSON.stringify(result)); |
| | | if (result.status == "0") { |
| | | if (result.object != null && result.object.length != 0) { |
| | | //component.set('v.login', true); |
| | | component.set("v.modal_import_spinner", true); |
| | | component.set("v.login", true); |
| | | this.saveRecordsEditFile( |
| | | component, |
| | | dataMap, |
| | |
| | | helper |
| | | ); |
| | | } else { |
| | | //component.set('v.errorMessage', 'AWS 查询数据为空 '); |
| | | this.error("AWS 查询数据为空 "); |
| | | //this.showErrorToast01(component); |
| | | //component.set('v.login', false); |
| | | component.set("v.modal_import_spinner", false); |
| | | component.set("v.errorMessage", "AWS search status "); |
| | | this.showErrorToast01(component); |
| | | component.set("v.login", false); |
| | | } |
| | | } else { |
| | | //component.set('v.errorMessage', 'AWS search status : ' + result.status); |
| | | this.error("AWS search status : " + result.status); |
| | | //this.showErrorToast01(component); |
| | | //component.set('v.login', false); |
| | | component.set("v.modal_import_spinner", false); |
| | | component.set( |
| | | "v.errorMessage", |
| | | "AWS search status : " + result.status |
| | | ); |
| | | this.showErrorToast01(component); |
| | | component.set("v.login", false); |
| | | } |
| | | }, |
| | | component |
| | |
| | | } |
| | | ); |
| | | } else { |
| | | //component.set('v.errorMessage', valur[1] + '\n' + "请修改后重新上传"); |
| | | this.error(valur[1] + "\n" + "请修改后重新上传"); |
| | | //this.showErrorToast01(component); |
| | | //component.set('v.login', false); |
| | | component.set("v.modal_import_spinner", false); |
| | | component.set( |
| | | "v.errorMessage", |
| | | valur[1] + "\n" + "请修改后重新上传" |
| | | ); |
| | | this.showErrorToast01(component); |
| | | component.set("v.login", false); |
| | | } |
| | | } |
| | | } |
| | |
| | | saveRecordsEditFile: function (component, dataMap, searchData, helper) { |
| | | var searchDataMap = new Map(); |
| | | for (var i = 0; i < searchData.length; i++) { |
| | | if (searchData[i].name != null) { |
| | | var sd = searchData[i]; |
| | | searchDataMap.set(sd.name.replace(" ", ""), sd.dataId); |
| | | } |
| | | } |
| | | console.log("searchDataMap=" + searchDataMap); |
| | | var error = ""; |
| | |
| | | var nameDataId = searchDataMap.get(fileName.replace(" ", "")); |
| | | if (dataMap.get(nameDataId)) { |
| | | filelist[5] = dataMap.get(nameDataId); //zhj 新方案改造 filelist[5]不再存的nameEncrpt 2022-12-21 |
| | | console.log("filelist[5] = " + filelist[5]); |
| | | } else { |
| | | error += "error1 第" + i + "行数据拜访人SF不存在"; |
| | | } |
| | |
| | | } |
| | | |
| | | if (error != "") { |
| | | console.log("zhj error = " + error); |
| | | let errorArray = error.split("error1"); |
| | | let errorDatas = []; |
| | | let errorDataRow = []; |
| | | |
| | | var fileContentData = component.get("v.fileContentData").split("\n"); |
| | | console.log("fileContentData = " + JSON.stringify(fileContentData)); |
| | | console.log("errorArray = " + JSON.stringify(errorArray)); |
| | | for (var i in errorArray) { |
| | | // if (errorArray[i] != '') { |
| | | // let errorData = {} |
| | | // errorData.errorRow = errorArray[i].trim().substring(1, 2); |
| | | // errorData.errorInfo = errorArray[i].trim().substring(5); |
| | | // errorDatas.push(errorData); |
| | | // } |
| | | if (errorArray[i] != "") { |
| | | let errorData = {}; |
| | | let index = errorDataRow.indexOf( |
| | | errorArray[i].trim().substring(1, 2) |
| | | ); |
| | | if (index == -1) { |
| | | errorData.errorRow = errorArray[i].trim().substring(1, 2); |
| | | errorDataRow.push(errorData.errorRow); |
| | | errorData.errorInfo = errorArray[i].trim().substring(5); |
| | | if (errorData.errorInfo == "拜访人AWS不存在") { |
| | | errorData.errorInfo = |
| | | "拜访人 " + |
| | | fileContentData[errorData.errorRow].split(",")[5] + |
| | | "不存在"; |
| | | } |
| | | errorDatas.push(errorData); |
| | | } else { |
| | | if (errorArray[i].trim().substring(5) == "拜访人AWS不存在") { |
| | | errorData[index].errorInfo = |
| | | "; " + |
| | | "拜访人 " + |
| | | fileContentData[errorDatas[index].errorRow].split(",")[5] + |
| | | "不存在"; |
| | | } else { |
| | | errorDatas[index].errorInfo += |
| | | "; " + errorArray[i].trim().substring(5); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | var fileContentData = component.get("v.fileContentData").split("\n"); |
| | | console.log("fileContentData = " + JSON.stringify(fileContentData)); |
| | | let errorColumns = [ |
| | | { |
| | | label: "错误行", |
| | | fieldName: "errorRow", |
| | | type: "text", |
| | | hideDefaultActions: true, |
| | | initialWidth: 100 |
| | | }, |
| | | { |
| | | label: "错误信息", |
| | | fieldName: "errorInfo", |
| | | type: "text", |
| | | hideDefaultActions: true, |
| | | initialWidth: 300, |
| | | wrapText: true |
| | | } |
| | | ]; |
| | | for (var i = 0; i < fileContentData[0].split(",").length - 1; i++) { |
| | | let initialWidth = 180; |
| | | if ( |
| | | fileContentData[0].split(",")[i] == "产品1同类耗材科室月使用量" || |
| | | fileContentData[0].split(",")[i] == "使用产品1(产品型号)" |
| | | ) { |
| | | initialWidth = 250; |
| | | } |
| | | errorColumns.push({ |
| | | label: fileContentData[0].split(",")[i], |
| | | fieldName: "field" + i, |
| | | type: "text", |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | initialWidth: initialWidth |
| | | }); |
| | | } |
| | | |
| | | for (var i = 0; i < errorDatas.length; i++) { |
| | | let data = fileContentData[errorDatas[i].errorRow]; |
| | | console.log("data = " + JSON.stringify(data)); |
| | | if (data) { |
| | | for (var j = 0; j < data.split(",").length; j++) { |
| | | let label = "field" + j; |
| | | errorDatas[i][label] = data.split(",")[j]; |
| | | } |
| | | } |
| | | } |
| | | console.log("errorDatas =" + JSON.stringify(errorDatas)); |
| | | component.set("v.errorColumns", errorColumns); |
| | | component.set("v.errorData", errorDatas); |
| | | component.set("v.showErrorInfo", true); |
| | | |
| | | component.set("v.errorMessage", error); |
| | | this.showErrorToast01(component); |
| | | console.log("error = " + error); |
| | | //component.set('v.errorMessage', error); |
| | | this.error(error); |
| | | //this.showErrorToast01(component); |
| | | console.log("error=" + error); |
| | | //component.set('v.login', false); |
| | | component.set("v.modal_import_spinner", false); |
| | | component.set("v.login", false); |
| | | return; |
| | | } |
| | | |
| | | console.log("fileStr=" + fileStr); |
| | | $A.getCallback(function () { |
| | | debugger; |
| | | helper.ImportMethod(component, fileStr, helper); |
| | | })(); |
| | | }, |
| | |
| | | if (res != "success") { |
| | | var ress = res.split("="); |
| | | console.log(ress); |
| | | let errorDatas = []; |
| | | let errorDataRow = []; |
| | | var fileContentData = component.get("v.fileContentData").split("\n"); |
| | | console.log( |
| | | "fileContentData[1].split(,)[5] = " + |
| | | fileContentData[1].split(",")[5] |
| | | ); |
| | | |
| | | for (var i = 0; i < ress.length; i++) { |
| | | res1 += ress[i].substr(7) + "\n"; |
| | | if (ress[i] != "") { |
| | | let errorData = {}; |
| | | let index = errorDataRow.indexOf( |
| | | ress[i].substr(7).substring(1, 2) |
| | | ); |
| | | if (index == -1) { |
| | | errorData.errorRow = ress[i].substr(7).substring(1, 2); |
| | | errorDataRow.push(errorData.errorRow); |
| | | errorData.errorInfo = ress[i].substr(7).substring(5); |
| | | if (errorData.errorInfo == "拜访人不存在") { |
| | | console.log("errorData.errorRow = " + errorData.errorRow); |
| | | errorData.errorInfo = |
| | | "拜访人 " + |
| | | fileContentData[errorData.errorRow].split(",")[5] + |
| | | "不存在"; |
| | | } |
| | | errorDatas.push(errorData); |
| | | } else { |
| | | if (ress[i].substr(7).substring(5) == "拜访人不存在") { |
| | | errorDatas[index].errorInfo += |
| | | "; " + |
| | | "拜访人 " + |
| | | fileContentData[errorDatas[index].errorRow].split(",")[5] + |
| | | "不存在"; |
| | | } else { |
| | | errorDatas[index].errorInfo += |
| | | "; " + ress[i].substr(7).substring(5); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | var fileContentData = component.get("v.fileContentData").split("\n"); |
| | | let errorColumns = [ |
| | | { |
| | | label: "错误行", |
| | | fieldName: "errorRow", |
| | | type: "text", |
| | | hideDefaultActions: true, |
| | | initialWidth: 100 |
| | | }, |
| | | { |
| | | label: "错误信息", |
| | | fieldName: "errorInfo", |
| | | type: "text", |
| | | hideDefaultActions: true, |
| | | initialWidth: 300, |
| | | wrapText: true |
| | | } |
| | | ]; |
| | | for (var i = 0; i < fileContentData[0].split(",").length - 1; i++) { |
| | | let initialWidth = 180; |
| | | if ( |
| | | fileContentData[0].split(",")[i] == "产品1同类耗材科室月使用量" || |
| | | fileContentData[0].split(",")[i] == "使用产品1(产品型号)" |
| | | ) { |
| | | initialWidth = 250; |
| | | } |
| | | errorColumns.push({ |
| | | label: fileContentData[0].split(",")[i], |
| | | fieldName: "field" + i, |
| | | type: "text", |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | initialWidth: initialWidth |
| | | }); |
| | | } |
| | | |
| | | for (var i = 0; i < errorDatas.length; i++) { |
| | | let data = fileContentData[errorDatas[i].errorRow]; |
| | | console.log("data = " + JSON.stringify(data)); |
| | | for (var j = 0; j < data.split(",").length; j++) { |
| | | let label = "field" + j; |
| | | errorDatas[i][label] = data.split(",")[j]; |
| | | } |
| | | } |
| | | component.set("v.errorColumns", errorColumns); |
| | | component.set("v.errorData", errorDatas); |
| | | component.set("v.showErrorInfo", true); |
| | | |
| | | console.log("==" + res1); |
| | | //component.set('v.errorMessage', res1 + "请修改后重新上传"); |
| | | this.error(res1 + "请修改后重新上传"); |
| | | //this.showErrorToast01(component); |
| | | //component.set('v.login', false); |
| | | component.set("v.modal_import_spinner", false); |
| | | component.set("v.errorMessage", res1 + "请修改后重新上传"); |
| | | this.showErrorToast01(component); |
| | | component.set("v.login", false); |
| | | } else { |
| | | component.set("v.successMessage", "导入成功"); |
| | | this.showSuccessToast01(component); |
| | | component.set("v.showMain", true); |
| | | //component.set('v.login', false); |
| | | component.set("v.modal_import_spinner", false); |
| | | component.set("v.login", false); |
| | | this.doinit(component, event, helper); |
| | | } |
| | | } else if (state === "INCOMPLETE") { |
| | | //component.set('v.login', false); |
| | | component.set("v.modal_import_spinner", false); |
| | | component.set("v.login", false); |
| | | } else if (state === "ERROR") { |
| | | var errors = response.getError(); |
| | | if (errors) { |
| | | if (errors[0] && errors[0].message) { |
| | | console.log("Error message: " + errors[0].message); |
| | | //component.set('v.login', false); |
| | | component.set("v.modal_import_spinner", false); |
| | | component.set("v.login", false); |
| | | } |
| | | } else { |
| | | console.log("Unknown error"); |
| | | //component.set('v.login', false); |
| | | component.set("v.modal_import_spinner", false); |
| | | component.set("v.login", false); |
| | | } |
| | | } |
| | | }); |
| | |
| | | component.set("v.doctor_list", res); |
| | | component.set("v.login", false); |
| | | } else { |
| | | //component.set('v.errorMessage', 'newlyBuild failed.'); |
| | | this.error("newlyBuild failed."); |
| | | //this.showErrorToast(component); |
| | | component.set("v.errorMessage", "newlyBuild failed."); |
| | | this.showErrorToast(component); |
| | | component.set("v.login", false); |
| | | } |
| | | }); |
| | |
| | | if (sc.replace(/\D/gi, "")) { |
| | | component.set("v.select_ConsumptionOfConsumables", sc); |
| | | } else { |
| | | //component.set('v.errorMessage', '产品1同类耗材科室月使用量必须输入数字!'); |
| | | this.error("产品1同类耗材科室月使用量必须输入数字!"); |
| | | //this.showErrorToast(component); |
| | | component.set( |
| | | "v.errorMessage", |
| | | "产品1同类耗材科室月使用量必须输入数字!" |
| | | ); |
| | | this.showErrorToast(component); |
| | | } |
| | | } else { |
| | | //component.set('v.errorMessage', '产品1同类耗材科室月使用量最多输入14位数字!'); |
| | | this.error("产品1同类耗材科室月使用量最多输入14位数字!"); |
| | | //this.showErrorToast(component); |
| | | component.set( |
| | | "v.errorMessage", |
| | | "产品1同类耗材科室月使用量最多输入14位数字!" |
| | | ); |
| | | this.showErrorToast(component); |
| | | } |
| | | } |
| | | }, |
| | |
| | | if (sc.replace(/\D/gi, "")) { |
| | | component.set("v.select_warlocksNumber", sc); |
| | | } else { |
| | | //component.set('v.errorMessage', '产品用量必须输入数字!'); |
| | | this.error("产品用量必须输入数字!"); |
| | | //this.showErrorToast(component); |
| | | component.set("v.errorMessage", "产品用量必须输入数字!"); |
| | | this.showErrorToast(component); |
| | | } |
| | | } else { |
| | | //component.set('v.errorMessage', '产品用量最多输入14位数字!'); |
| | | this.error("产品用量最多输入14位数字!"); |
| | | //this.showErrorToast(component); |
| | | component.set("v.errorMessage", "产品用量最多输入14位数字!"); |
| | | this.showErrorToast(component); |
| | | } |
| | | } |
| | | }, |
| | | //工作会记录 |
| | | selectPurposeType: function (component, event, helper) { |
| | | debugger; |
| | | var doctor_value = component.find("select_purpose_type").get("v.value"); |
| | | // alert(doctor_value); |
| | | if (doctor_value != "科室会") { |
| | |
| | | component.find("new_con").set("v.disabled", true); |
| | | } |
| | | if (doctor_value != "") { |
| | | this.set_doctor_list_edit(component); |
| | | this.set_doctor_list(component); |
| | | var action = component.get("c.selectPurposeTypes"); |
| | | action.setParams({ |
| | | doctor_value: doctor_value |
| | |
| | | }, |
| | | |
| | | selectProductClassification: function (component, event, helper) { |
| | | debugger; |
| | | var select_ProductClassification = component |
| | | .find("select_ProductClassification") |
| | | .get("v.value"); |
| | |
| | | var select_ProductCcategory = component |
| | | .find("select_ProductCcategory") |
| | | .get("v.value"); |
| | | |
| | | debugger; |
| | | if (select_ProductCcategory != "") { |
| | | var result = component.find("result"); |
| | | var UserProType = component.get("v.UserProType"); |
| | |
| | | $A.util.addClass(result, "disp_none"); |
| | | } |
| | | } else { |
| | | debugger; |
| | | component.find("select_productCategories").set("v.value", ""); |
| | | var result = component.find("result"); |
| | | $A.util.addClass(result, "disp_none"); |
| | |
| | | } |
| | | |
| | | $A.enqueueAction(action); |
| | | }, |
| | | } |
| | | //zhj MEBG新方案改造 2022-11-29 end |
| | | |
| | | //zhj 导出错误信息 2023-05-16 start |
| | | exportErrorInfoHelper: function (component) { |
| | | var errorData = component.get("v.errorData"); |
| | | var errorColumns = component.get("v.errorColumns"); |
| | | |
| | | var datas = []; |
| | | let errorColumnsArray = []; |
| | | for (var i in errorColumns) { |
| | | errorColumnsArray.push(errorColumns[i].label); |
| | | } |
| | | datas.push(errorColumnsArray); |
| | | //datas.push(errorColumns); |
| | | |
| | | for (var i in errorData) { |
| | | let data = []; |
| | | data.push(errorData[i].errorRow); |
| | | data.push(errorData[i].errorInfo); |
| | | for (var j = 0; j < Object.keys(errorData[i]).length - 2; j++) { |
| | | data.push(errorData[i]["field" + j]); |
| | | } |
| | | datas.push(data); |
| | | } |
| | | |
| | | console.log("datas = " + JSON.stringify(datas)); |
| | | var csv = this.convertToCSV(component, datas); |
| | | console.log("csv = " + JSON.stringify(csv)); |
| | | this.downloadCSV(component, csv); |
| | | }, |
| | | |
| | | convertToCSV: function (component, data) { |
| | | console.log("enter convertToCSV"); |
| | | console.log("data = " + data); |
| | | var csv = ""; |
| | | for (var i = 0; i < data.length; i++) { |
| | | var row = data[i]; |
| | | console.log("row = " + JSON.stringify(row)); |
| | | for (var j = 0; j < row.length; j++) { |
| | | var val = ""; |
| | | val = row[j] === null ? "" : row[j].toString(); |
| | | console.log("val = " + val); |
| | | if ( |
| | | val.indexOf(",") !== -1 || |
| | | val.indexOf('"') !== -1 || |
| | | val.indexOf("\n") !== -1 |
| | | ) { |
| | | //val = '"' + val.replace(/"/g,'""') + '"'; |
| | | } |
| | | if (j > 0) { |
| | | csv += ","; |
| | | } |
| | | csv += val; |
| | | } |
| | | csv += "\n"; |
| | | } |
| | | return csv; |
| | | }, |
| | | |
| | | downloadCSV: function (component, csv) { |
| | | var link = document.createElement("a"); |
| | | var bom = "\uFEFF"; |
| | | link.href = "data:text/csv;charset=utf-8," + encodeURIComponent(bom + csv); |
| | | link.download = "data.csv"; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | }, |
| | | error: function (message) { |
| | | // $('toastMessage.forceToastManager').css('white-space', 'pre-wrap'); |
| | | var toastEvent = $A.get("e.force:showToast"); |
| | | |
| | | toastEvent.setParams({ |
| | | title: "错误!", |
| | | message: message, |
| | | type: "error" |
| | | //"duration" : "sticky" |
| | | }); |
| | | toastEvent.fire(); |
| | | } |
| | | //zhj 导出错误信息 2023-05-16 end |
| | | }); |
| | |
| | | <aura:attribute name="doclist" type="List" /> |
| | | <aura:attribute name="docmap" type="Map" /> |
| | | <aura:attribute name="login" type="Boolean" default="false" /> |
| | | <aura:attribute name="loginEdit" type="Boolean" default="false" /> |
| | | <aura:attribute name="loadOpp" type="Boolean" default="false" /> |
| | | <aura:attribute name="reportPageData" type="Map" /> |
| | | <aura:attribute name="selectbody" type="String" /> |
| | |
| | | <aura:attribute name="contactawsurl" type="Map" /> |
| | | <aura:attribute name="allselectlistAgencyPerson" type="Map" /> |
| | | <!-- PIPL update Yin Mingjie 21/02/2022 end --> |
| | | |
| | | <!-- start DTT-zhj 增加错误信息table 2023-05-16--> |
| | | <aura:attribute name="errorData" type="Object" /> |
| | | <aura:attribute name="errorColumns" type="List" /> |
| | | <!-- show Error information --> |
| | | <aura:attribute name="showErrorInfo" type="Boolean" default="false" /> |
| | | <!-- end DTT-zhj 增加错误信息table 2023-05-16--> |
| | | |
| | | <!-- 批量添加周报 end--> |
| | | <ltng:require scripts="{! $Resource.AWSService+'/AWSService.js' }" /> |
| | | <ltng:require scripts="{! $Resource.jquery183minjs }" /> |
| | | |
| | | <!--ロード中...--> |
| | | <aura:renderIf isTrue="{!v.login}"> |
| | | <aura:renderIf isTrue="{!!v.loginEdit}"> |
| | | <!-- add by Deloitte-Link 2023-6-19 --> |
| | | <div class="weeklyReportSpinner"> |
| | | <div class="slds-spinner_container"> |
| | | <div class="slds-spinner_container height100vh"> |
| | | <div |
| | | class="slds-spinner--brand slds-spinner slds-spinner--medium" |
| | | role="alert" |
| | |
| | | <div class="slds-spinner__dot-b"></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </aura:renderIf> |
| | | </aura:renderIf> |
| | | |
| | | <div aura:id="report" id="report" class="contents_wrapper"> |
| | |
| | | /> |
| | | </div> |
| | | <div |
| | | class="tr slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-12 slds-large-size--1-of-12" |
| | | class="tr slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12" |
| | | > |
| | | <ui:button |
| | | aura:id="new_button" |
| | |
| | | /> |
| | | </div> |
| | | <div |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--3-of-12 slds-large-size--3-of-12" |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12" |
| | | > |
| | | <ui:button |
| | | aura:id="copy_button" |
| | |
| | | > |
| | | <thead> |
| | | <tr class="slds-line-height--reset"> |
| | | <th |
| | | class="table_header slds-text-title--caps" |
| | | style="width: 250px; font-size: 13px" |
| | | > |
| | | <span class="slds-truncate" title="Name">周报编号</span> |
| | | </th> |
| | | <th |
| | | class="table_header slds-text-title--caps" |
| | | style="width: 100px; font-size: 13px" |
| | | > |
| | | <th class="table_header slds-text-title--caps"></th> |
| | | <th class="table_header slds-text-title--caps"> |
| | | <span class="slds-truncate" title="Name" |
| | | >{!v.fieldsmap.Person_In_Charge2__c}</span |
| | | > |
| | | </th> |
| | | <th |
| | | class="table_header slds-text-title--caps" |
| | | style="width: 250px; font-size: 13px" |
| | | > |
| | | <th class="table_header slds-text-title--caps"> |
| | | <span class="slds-truncate" title="Name">医院</span> |
| | | </th> |
| | | <th |
| | | class="table_header slds-text-title--caps" |
| | | style="width: 100px; font-size: 13px" |
| | | > |
| | | <th class="table_header slds-text-title--caps"> |
| | | <span class="slds-truncate" title="Name" |
| | | >{!v.fieldsmap.Department_Cateogy__c}</span |
| | | > |
| | | </th> |
| | | <th |
| | | class="table_header slds-text-title--caps" |
| | | style="width: 100px; font-size: 13px" |
| | | > |
| | | <th class="table_header slds-text-title--caps"> |
| | | <!-- PIPL update Yin Mingjie 21/02/2022 start |
| | | <span class="slds-truncate" title="Name">{!v.fieldsmap.doctor2__r}</span> |
| | | PIPL update Yin Mingjie 21/02/2022 end--> |
| | | <span |
| | | class="slds-truncate" |
| | | title="Name" |
| | | style="width: 100px; font-size: 13px" |
| | | <span class="slds-truncate" title="Name" |
| | | >{!v.fieldsmap.Agency_Contact__c}</span |
| | | > |
| | | </th> |
| | | <th |
| | | class="table_header slds-text-title--caps" |
| | | style="width: 100px; font-size: 13px" |
| | | > |
| | | <th class="table_header slds-text-title--caps"> |
| | | <span class="slds-truncate" title="Name" |
| | | >{!v.fieldsmap.visitor_title__c}</span |
| | | > |
| | | </th> |
| | | <th |
| | | class="table_header slds-text-title--caps" |
| | | style="width: 100px; font-size: 13px" |
| | | > |
| | | <th class="table_header slds-text-title--caps"> |
| | | <span class="slds-truncate" title="Name" |
| | | >{!v.fieldsmap.Purpose_Type__c}</span |
| | | > |
| | |
| | | aria-labelledby="headerTarget" |
| | | > |
| | | <div class="slds-modal__container"> |
| | | <aura:renderIf isTrue="{!v.loginEdit}"> |
| | | <lightning:spinner |
| | | alternativeText="Loading" |
| | | size="medium" |
| | | style="width: 100%; height: 80%; top: 50px" |
| | | /> |
| | | </aura:renderIf> |
| | | <div class="slds-modal__header"> |
| | | <h4 id="headerTarget" class="slds-float--left"></h4> |
| | | <h2 id="headerTarget" class="slds-text-heading--medium"> |
| | |
| | | onclick="{!c.cancel}" |
| | | /> |
| | | </div> |
| | | <!-- start DTT-zhj 增加错误信息table 2023-05-16--> |
| | | <aura:if isTrue="{!v.showErrorInfo}"> |
| | | <div class="slds-p-around--large slds-align--absolute-center"> |
| | | <lightning:button |
| | | label="导出错误信息" |
| | | variant="brand" |
| | | onclick="{!c.exportErrorInfo}" |
| | | /> |
| | | </div> |
| | | <div class="slds-p-around--large slds-align--absolute-center"> |
| | | <div style="height: 300px; overflow-x: scroll"> |
| | | <lightning:datatable |
| | | keyField="id" |
| | | data="{! v.errorData }" |
| | | columns="{! v.errorColumns }" |
| | | hideCheckboxColumn="true" |
| | | /> |
| | | </div> |
| | | </div> |
| | | </aura:if> |
| | | <!-- start DTT-zhj 增加错误信息table 2023-05-16--> |
| | | </aura:set> |
| | | </aura:if> |
| | | </div> |
| | |
| | | aria-labelledby="headerTarget" |
| | | > |
| | | <div class="slds-modal__container"> |
| | | <aura:renderIf isTrue="{!v.loginEdit}"> |
| | | <lightning:spinner |
| | | alternativeText="Loading" |
| | | size="medium" |
| | | style="width: 100%; height: 80%; top: 50px" |
| | | /> |
| | | </aura:renderIf> |
| | | <div class="slds-modal__header"> |
| | | <h4 id="headerTarget" class="slds-float--left"></h4> |
| | | <h4 id="headerTarget" class="slds-float--left">{!v.dialog_type}</h4> |
| | | <h2 id="headerTarget" class="slds-text-heading--medium"> |
| | | 周报({!v.selected_date} {!v.selected_agency_person}) |
| | | </h2> |
| | |
| | | <div class="slds-box slds-theme--shade"> |
| | | <div class="slds-grid slds-wrap slds-grid--pull-padded"> |
| | | <div |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6 marginTop" |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6" |
| | | > |
| | | 活动日 |
| | | <!-- <ui:inputSelect aura:id="select_opportunity" class="slds-select"/> --> |
| | | <!-- <force:inputField value="{!v.data.Report_Date__c}" aura:id="input-report-date"/> --> |
| | | <lightning:input |
| | | type="date" |
| | | <force:inputField |
| | | value="{!v.data.Report_Date__c}" |
| | | aura:id="input-report-date" |
| | | variant="label-hidden" |
| | | /> |
| | | </div> |
| | | <!-- 医院 --> |
| | | <div |
| | | aura:id="hospital_list" |
| | | class="slds-form-element slds-lookup slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-5 marginTop" |
| | | class="slds-form-element slds-lookup slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-5" |
| | | data-select="single" |
| | | > |
| | | <!-- <ui:inputText aura:id="hospital_input_text" label="医院" class="field" value="{!v.hospital}" updateOn="keyup"/> --> |
| | | 医院 |
| | | <lightning:input |
| | | <ui:inputText |
| | | aura:id="hospital_input_text" |
| | | label="医院" |
| | | class="field" |
| | | value="{!v.hospital}" |
| | | variant="label-hidden" |
| | | updateOn="keyup" |
| | | /> |
| | | <div class="slds-lookup__menu" id="lookup-66"> |
| | |
| | | |
| | | <!-- 科室分类 --> |
| | | <div |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-8 marginTop" |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-8" |
| | | > |
| | | {!v.fieldsmap.Department_Cateogy__c} |
| | | <ui:inputSelect |
| | |
| | | |
| | | <!-- 先生 --> |
| | | <div |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-8 marginTop" |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-8" |
| | | > |
| | | {!v.fieldsmap.doctor2__c} |
| | | <ui:inputSelect |
| | |
| | | </div> |
| | | |
| | | <div |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-12 marginTop" |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-12" |
| | | > |
| | | <br /> |
| | | <ui:button |
| | |
| | | |
| | | <!-- 职位 --> |
| | | <div |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-8 marginTop" |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-8" |
| | | > |
| | | {!v.fieldsmap.visitor_title__c} |
| | | <div>{!v.doctor_title}</div> |
| | | </div> |
| | | <!-- 活动区分 --> |
| | | <div |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6 marginTop" |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6" |
| | | > |
| | | {!v.fieldsmap.Purpose_Type__c} |
| | | <ui:inputSelect |
| | |
| | | <!-- 询价 --> |
| | | <div |
| | | aura:id="input-opportunity-opp" |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--4-of-12 slds-large-size--4-of-12 marginTop" |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--4-of-12 slds-large-size--4-of-12" |
| | | > |
| | | {!v.fieldsmap.Opportunity__c} |
| | | <!-- <ui:inputSelect aura:id="select_opportunity" class="slds-select"/> --> |
| | |
| | | </div> |
| | | <div |
| | | aura:id="input-opportunity-blank" |
| | | class="lds-p-horizontal--small slds-size--1-of-1 slds-medium-size--8-of-12 slds-large-size--8-of-12 marginTop" |
| | | class="lds-p-horizontal--small slds-size--1-of-1 slds-medium-size--8-of-12 slds-large-size--8-of-12" |
| | | ></div> |
| | | <div |
| | | aura:id="input-opportunity-stage" |
| | | class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12 marginTop" |
| | | class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12" |
| | | > |
| | | {!v.fieldsmap.StageName__c} |
| | | <!-- <ui:inputSelect aura:id="select_opportunity" class="slds-select"/> --> |
| | |
| | | </div> |
| | | <div |
| | | aura:id="input-opportunity-amount1" |
| | | class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12 marginTop" |
| | | class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12" |
| | | > |
| | | {!v.fieldsmap.Amount__c} |
| | | <!-- <ui:inputSelect aura:id="select_opportunity" class="slds-select"/> --> |
| | |
| | | </div> |
| | | <div |
| | | aura:id="input-opportunity-amount2" |
| | | class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12 marginTop" |
| | | class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12" |
| | | > |
| | | {!v.fieldsmap.OCMSale_Price__c} |
| | | <!-- <ui:inputSelect aura:id="select_opportunity" class="slds-select"/> --> |
| | |
| | | </div> |
| | | <div |
| | | aura:id="input-opportunity-date" |
| | | class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12 marginTop" |
| | | class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12" |
| | | > |
| | | {!v.fieldsmap.Close_Forecasted_Date__c} |
| | | <!-- <ui:inputSelect aura:id="select_opportunity" class="slds-select"/> --> |
| | |
| | | <!-- 製品分類 --> |
| | | <div |
| | | aura:id="product_category_select1" |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--3-of-12 slds-large-size--3-of-12 marginTop" |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--3-of-12 slds-large-size--3-of-12" |
| | | > |
| | | {!v.fieldsmap.Product_Category1__c} |
| | | <!-- <force:inputField value="{!v.data.Product_Category1__c}" aura:id="input-product-category1"/> --> |
| | |
| | | </div> |
| | | <div |
| | | aura:id="product_category_select2" |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--3-of-12 slds-large-size--3-of-12 marginTop" |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--3-of-12 slds-large-size--3-of-12" |
| | | > |
| | | {!v.fieldsmap.Product_Category2__c} |
| | | <!-- <force:inputField value="{!v.data.Product_Category2__c}" aura:id="input-product-category2"/> --> |
| | |
| | | </div> |
| | | <div |
| | | aura:id="product_category_select3" |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--3-of-12 slds-large-size--3-of-12 marginTop" |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--3-of-12 slds-large-size--3-of-12" |
| | | > |
| | | {!v.fieldsmap.Product_Category3__c} |
| | | <!-- <force:inputField value="{!v.data.Product_Category3__c}" aura:id="input-product-category3"/> --> |
| | |
| | | <!--SWAG-CBX68C fy 【委托】DAMS系统周报模块内容需求增加 start--> |
| | | <!-- 支援需求 change="{!c.SupportNeeds__c}"--> |
| | | <div |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6 marginTop" |
| | | class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6" |
| | | > |
| | | {!v.fieldsmap.SupportNeeds__c} |
| | | <ui:inputSelect aura:id="SupportNeeds__c" class="slds-select" /> |
| | |
| | | <!--SWAG-CBX68C fy 【委托】DAMS系统周报模块内容需求增加 end--> |
| | | <div |
| | | aura:id="result" |
| | | class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--3-of-12 slds-large-size--3-of-12 marginTop" |
| | | class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--3-of-12 slds-large-size--3-of-12" |
| | | > |
| | | {!v.fieldsmap.Result__c} |
| | | <ui:inputSelect aura:id="select_result" class="slds-select" /> |
| | |
| | | class="disp_none slds-modal slds-fade-in-open" |
| | | > |
| | | <div class="slds-modal__container"> |
| | | <aura:renderIf isTrue="{!v.loginEdit}"> |
| | | <lightning:spinner |
| | | alternativeText="Loading" |
| | | size="medium" |
| | | style="width: 100%; height: 80%; top: 50px" |
| | | /> |
| | | </aura:renderIf> |
| | | <div class="slds-modal__header"> |
| | | <h2 id="headertest" class="slds-text-heading--medium">新建.客户人员</h2> |
| | | </div> |
| | |
| | | .THIS.height100vh { |
| | | height: 100vh; |
| | | } |
| | | /* .THIS.contents_wrapper { |
| | | .THIS.contents_wrapper { |
| | | padding-top: 50px; |
| | | width: 105%; |
| | | } */ |
| | | } |
| | | .THIS .mt5 { |
| | | margin-top: 5px; |
| | | } |
| | |
| | | margin: 0.5em 0; |
| | | } |
| | | .THIS.report_list_area { |
| | | margin: 40px 0 20px 0px; |
| | | margin: 40px 0 20px 100px; |
| | | height: 60vh; |
| | | overflow-y: scroll; |
| | | } |
| | |
| | | .THIS tr:hover .encrypt { |
| | | display: none; |
| | | } |
| | | |
| | | /* add by Deloitte-Link 2023-6-19 start*/ |
| | | .THIS .weeklyReportSpinner { |
| | | top: 100px; |
| | | } |
| | | |
| | | .THIS .weeklyReportSpinnerEdit { |
| | | top: 50px; |
| | | } |
| | | |
| | | .THIS .slds-spinner_container { |
| | | position: absolute; |
| | | top: 100px; |
| | | } |
| | | |
| | | .THIS .slds-spinner_containerEdit { |
| | | position: absolute; |
| | | top: 50px; |
| | | } |
| | | |
| | | .THIS .marginTop { |
| | | margin-top: 10px; |
| | | } |
| | | .THIS .custom-input .uiInput { |
| | | height: 2rem; |
| | | } |
| | | /* add by Deloitte-Link 2023-6-19 end*/ |
| | |
| | | ({ |
| | | doInit: function (component, event, helper) { |
| | | console.log("zhj 新方案weeklyReport"); |
| | | console.log("zhj 新方案"); |
| | | if (window.location.href.endsWith("weekly-report")) { |
| | | helper.doinit(component, event, helper); |
| | | } else { |
| | | helper.hideCmp(component, event, helper); |
| | | } |
| | | component.set("v.showErrorInfo", false); |
| | | }, |
| | | |
| | | createAopp: function (component, event, helper) { |
| | |
| | | recordTypeId: "012100000006KW7" |
| | | }); |
| | | addRecordEvent.fire(); |
| | | component.set("v.showErrorInfo", false); |
| | | }, |
| | | |
| | | new_report: function (component, event, helper) { |
| | | component.find("save_button").set("v.label", "保存并新建"); |
| | | component.set("v.data.Report_Date__c", ""); |
| | | helper.new_report(component, event, helper); |
| | | }, |
| | | |
| | |
| | | var token = component.get("v.AWStoken"); |
| | | var newUrl = component.get("v.AWSinsert") + "V2"; |
| | | |
| | | component.set("v.loginEdit", true); |
| | | component.set("v.login", true); |
| | | helper.insert_agencycontact( |
| | | component, |
| | | token, |
| | |
| | | // var fileInput = component.find("file").getElement(); |
| | | // var file = fileInput.files[0]; |
| | | helper.readFile(component, helper, files[0]); |
| | | component.set("v.showErrorInfo", false); |
| | | }, |
| | | |
| | | processFileContent: function (component, event, helper) { |
| | | helper.saveRecords(component, event, helper); |
| | | component.set("v.showErrorInfo", false); |
| | | }, |
| | | |
| | | cancel: function (component, event, helper) { |
| | |
| | | close_export: function (component, event, helper) { |
| | | component.set("v.showMain", true); |
| | | helper.close_export(component); |
| | | }, |
| | | exportErrorInfo: function (component, event, helper) { |
| | | helper.exportErrorInfoHelper(component); |
| | | } |
| | | }); |
| | |
| | | if (result.object != null) { |
| | | this.to_contact_list(result, contactData, component); |
| | | } else { |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | } |
| | | } else { |
| | | this.error("AWS search status1 : " + result.status); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | } |
| | | }, |
| | | component |
| | |
| | | } |
| | | component.find("select_agency_person").set("v.options", res); |
| | | component.set("v.allselectlistAgencyPerson", res); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | }, |
| | | |
| | | search_contact_url: function (component, sobject, callback) { |
| | |
| | | if (callback) callback(result); |
| | | } else { |
| | | this.error("AWS url/token error."); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | } |
| | | }); |
| | | $A.enqueueAction(action); |
| | |
| | | }); |
| | | $A.enqueueAction(action); |
| | | }, |
| | | get_reports_edit: function (component, event, helper, date_str, person_str) { |
| | | if (!date_str) { |
| | | return false; |
| | | } |
| | | |
| | | date_str = this.get_date_string(date_str); |
| | | |
| | | var action = component.get("c.getReports"); |
| | | action.setParams({ |
| | | date_str: date_str, |
| | | person_str: person_str |
| | | }); |
| | | |
| | | component.set("v.loginEdit", true); |
| | | action.setCallback(this, function (response) { |
| | | var state = response.getState(); |
| | | if (state == "SUCCESS") { |
| | | var res = response.getReturnValue(); |
| | | component.set("v.reports", res.reports); |
| | | |
| | | // 20220222 PI改造 by Bright--start |
| | | let dataIds = []; |
| | | let dataIds1 = []; |
| | | let mm = {}; |
| | | let b = false; |
| | | let b1 = false; |
| | | for (const rep of res.reports) { |
| | | if (rep.doctor2__r && rep.doctor2__r.AWS_Data_Id__c) { |
| | | dataIds.push(rep.doctor2__r.AWS_Data_Id__c); |
| | | } |
| | | |
| | | if ( |
| | | rep.Person_In_Charge2__r && |
| | | rep.Person_In_Charge2__r.AWS_Data_Id__c |
| | | ) { |
| | | dataIds1.push(rep.Person_In_Charge2__r.AWS_Data_Id__c); |
| | | } |
| | | } |
| | | let Foo = null; |
| | | Foo = function () { |
| | | if (b && b1) { |
| | | for (const rep of res.reports) { |
| | | if ( |
| | | rep.doctor2__r && |
| | | rep.doctor2__r.AWS_Data_Id__c && |
| | | mm.hasOwnProperty(rep.doctor2__r.AWS_Data_Id__c) |
| | | ) { |
| | | rep.doctor2__r.awsdata = mm[rep.doctor2__r.AWS_Data_Id__c]; |
| | | } |
| | | if ( |
| | | rep.Person_In_Charge2__r && |
| | | rep.Person_In_Charge2__r.AWS_Data_Id__c && |
| | | mm.hasOwnProperty(rep.Person_In_Charge2__r.AWS_Data_Id__c) |
| | | ) { |
| | | rep.Person_In_Charge2__r.awsdata = |
| | | mm[rep.Person_In_Charge2__r.AWS_Data_Id__c]; |
| | | } |
| | | } |
| | | |
| | | $A.getCallback(() => component.set("v.reports", res.reports))(); |
| | | } else { |
| | | console.log("b=" + b + ",b1=" + b1 + ",continue"); |
| | | setTimeout(Foo, 100); |
| | | } |
| | | }; |
| | | |
| | | if (dataIds.length > 0) { |
| | | let awsurl = component.get("v.awsurl"); |
| | | helper.search_core( |
| | | awsurl.token, |
| | | awsurl.searchUrl, |
| | | JSON.stringify({ |
| | | dataIds: dataIds |
| | | }), |
| | | (result) => { |
| | | if (result.status == "0") { |
| | | for (const m of result.object) { |
| | | mm[m.dataId] = m; |
| | | } |
| | | b = true; |
| | | Foo(); |
| | | } else { |
| | | //this.error('AWS search status2 : ' + result.status); |
| | | this.success("请重新刷新页面进行解密"); |
| | | } |
| | | }, |
| | | component |
| | | ); |
| | | } else { |
| | | b = true; |
| | | } |
| | | |
| | | if (dataIds1.length > 0) { |
| | | let contactawsurl = component.get("v.contactawsurl"); |
| | | helper.search_core( |
| | | contactawsurl.token, |
| | | contactawsurl.searchUrl, |
| | | JSON.stringify({ |
| | | dataIds: dataIds1 |
| | | }), |
| | | (result) => { |
| | | if (result.status == "0") { |
| | | for (const m of result.object) { |
| | | mm[m.dataId] = m; |
| | | } |
| | | b1 = true; |
| | | Foo(); |
| | | } else { |
| | | this.error("AWS search status3 : " + result.status); |
| | | } |
| | | }, |
| | | component |
| | | ); |
| | | } else { |
| | | b1 = true; |
| | | } |
| | | // 20220222 PI改造 by Bright--end |
| | | |
| | | component.set("v.report_count", res.reports.length); |
| | | |
| | | // 更新保存後のselect_data用 |
| | | var report_id = component.get("v.update_select_report_data_id"); |
| | | |
| | | if (report_id != "") { |
| | | for (i = 0; i < res.reports.length; i++) { |
| | | if (res.reports[i]["Id"] == report_id) { |
| | | component.set("v.select_report_data", res.reports[i]); |
| | | break; |
| | | } |
| | | } |
| | | component.set("v.update_select_report_data_id", ""); |
| | | } |
| | | |
| | | if (res.reports.length > 0) { |
| | | component.set("v.list_message", ""); |
| | | } else { |
| | | component.set("v.list_message", "no_data"); |
| | | } |
| | | component.set("v.loginEdit", false); |
| | | } else { |
| | | this.error("get_reports failed."); |
| | | component.set("v.loginEdit", false); |
| | | } |
| | | }); |
| | | $A.enqueueAction(action); |
| | | }, |
| | | |
| | | select_date_change: function (component, event, helper) { |
| | | this.get_reports( |
| | |
| | | // OPEN |
| | | $A.util.removeClass(modal_window, "disp_none"); |
| | | $A.util.removeClass(modal_bg, "disp_none"); |
| | | component.set("v.loginEdit", true); |
| | | |
| | | if ( |
| | | component.get("v.mode") == "edit" || |
| | | component.get("v.mode") == "copy" |
| | |
| | | } |
| | | |
| | | if (reportDate != null) { |
| | | console.log("reportDate = " + reportDate); |
| | | component.set("v.data.Report_Date__c", reportDate); |
| | | } |
| | | |
| | | component.set("v.edit_copy_select_report_id", ""); |
| | | } |
| | | } |
| | | setTimeout(function () { |
| | | component.set("v.loginEdit", false); |
| | | }, 1000); |
| | | } else { |
| | | // CLOSE |
| | | |
| | |
| | | }, |
| | | |
| | | edit_button: function (component, event, helper) { |
| | | component.set("v.login", true); |
| | | this.allclear(component); |
| | | component.set("v.loadOpp", true); |
| | | var index = event.getSource().get("v.value"); |
| | |
| | | } |
| | | |
| | | // 保存処理 |
| | | component.set("v.loginEdit", true); |
| | | component.set("v.login", true); |
| | | if (component.get("v.mode") == "edit") { |
| | | var Agency_Report__c = component.get("v.select_report_data").Id; |
| | | var action = component.get("c.editAgencyReport"); |
| | |
| | | .set("v.options", select_agency_list); |
| | | |
| | | component.set("v.update_select_report_data_id", report_id); |
| | | this.get_reports_edit( |
| | | this.get_reports( |
| | | component, |
| | | event, |
| | | helper, |
| | |
| | | ); |
| | | |
| | | component.find("save_button").set("v.disabled", false); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | } else { |
| | | // var error = response.getError(); |
| | | // alert(JSON.stringify(error)); |
| | |
| | | // } |
| | | this.error("save_report failed."); |
| | | component.find("save_button").set("v.disabled", false); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | } |
| | | }); |
| | | $A.enqueueAction(action); |
| | |
| | | var report_id = response.getReturnValue(); |
| | | component.set("v.create_agency_report_id", report_id); |
| | | |
| | | this.get_reports_edit( |
| | | this.get_reports( |
| | | component, |
| | | event, |
| | | helper, |
| | |
| | | } else { |
| | | this.error("get_reports_now failed."); |
| | | component.find("save_button").set("v.disabled", false); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | } |
| | | }); |
| | | $A.enqueueAction(action2); |
| | | |
| | | this.allclear(component); |
| | | component.find("save_button").set("v.disabled", false); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | } else { |
| | | var error = response.getError(); |
| | | // alert(JSON.stringify(error)); |
| | | this.error("saveAgencyReport failed."); |
| | | component.find("save_button").set("v.disabled", false); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | } |
| | | }); |
| | | $A.enqueueAction(action); |
| | |
| | | component.find("select_Product1").set("v.value", ""); |
| | | component.find("select_Product2").set("v.value", ""); |
| | | component.find("select_Product3").set("v.value", ""); |
| | | console.log("reportDate = 空"); |
| | | component.set("v.data.Report_Date__c", ""); |
| | | component.set("v.oppdata.Close_Forecasted_Date__c", ""); |
| | | component.set("v.oppdata.Amount__c", ""); |
| | |
| | | component.set("v.AWStransactionURL", awsmap.transactionURL); |
| | | } else { |
| | | this.error("AWS url/token error."); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | } |
| | | }); |
| | | $A.enqueueAction(action); |
| | |
| | | })(); |
| | | } else { |
| | | console.log("AWS status error:" + result); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | if (result.status == "129") { |
| | | component |
| | | .find("OppMessage") |
| | |
| | | }) |
| | | .catch((error) => { |
| | | console.log("AWS insert error:" + error); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | component.find("OppMessage").setError("AWS insert error."); |
| | | }); |
| | | }, |
| | |
| | | this.to_confirm(component, token, confirmUrl, JSON.stringify(data)); |
| | | } else if (acMap.errormsg != "") { |
| | | this.error(acMap.errormsg); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | } else { |
| | | this.error("agency contact insert id error."); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | } |
| | | } else { |
| | | this.error("agency contact insert error."); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | } |
| | | }); |
| | | $A.enqueueAction(action); |
| | |
| | | this.set_doctor_list(component); |
| | | } else { |
| | | this.error("AWS confirm error."); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | this.error("AWS confirm error."); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | }); |
| | | }, |
| | | // PIPL update Yin Mingjie 21/02/2022 end |
| | |
| | | set_doctor_list: function (component) { |
| | | var hospital_id = component.get("v.hospitalLinkId"); |
| | | if (hospital_id) { |
| | | component.set("v.loginEdit", true); |
| | | component.set("v.login", true); |
| | | var action = component.get("c.getDoctorList"); |
| | | action.setParams({ |
| | | hospital_id: hospital_id |
| | |
| | | // PIPL update Yin Mingjie 21/02/2022 end |
| | | } else { |
| | | this.error("set_doctor_list failed."); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | } |
| | | }); |
| | | $A.enqueueAction(action); |
| | |
| | | dataArr.push(key); |
| | | } |
| | | if (dataArr.length == 0) { |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | this.warning("没有找到符合条件的客户人员"); |
| | | return; |
| | | } |
| | |
| | | this.to_doctor_list(result, retMap, component); |
| | | } else { |
| | | this.error("AWS search status4 : " + result.status); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | } |
| | | }, |
| | | component |
| | |
| | | return data.json(); |
| | | }) |
| | | .then((result) => { |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | if (callback) callback(result); |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error = " + JSON.stringify(error)); |
| | | this.error("AWS search error."); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | }); |
| | | }, |
| | | |
| | |
| | | |
| | | component.set("v.default_select_doctor_id", ""); |
| | | component.set("v.doctor_list", res); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | }, |
| | | // PIPL update Yin Mingjie 21/02/2022 end |
| | | |
| | |
| | | agency_hospital_link_id: component.get("v.hospitalLinkId") |
| | | }); |
| | | |
| | | component.set("v.loginEdit", true); |
| | | component.set("v.login", true); |
| | | action.setCallback(this, function (response) { |
| | | var state = response.getState(); |
| | | if (state == "SUCCESS") { |
| | |
| | | // } else { |
| | | // component.find('input-opportunity').get("v.body")[0].set('v.selectedLabel', ''); |
| | | // } |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | return false; |
| | | } |
| | | //SWAG-CKH5M8 【委托】周报关联询价,可选择询价范围调整 fy start |
| | |
| | | ); |
| | | } |
| | | |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | } else { |
| | | this.error("selectOpportunityByIdAndHospitalLinkId failed."); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | } |
| | | }); |
| | | $A.enqueueAction(action); |
| | |
| | | }, |
| | | |
| | | saveRecords: function (component, event, helper) { |
| | | debugger; |
| | | component.set("v.loginEdit", true); |
| | | component.set("v.login", true); |
| | | //fy 导入 20220424 start |
| | | var action1 = component.get("c.processDataAWSId"); |
| | | action1.setParams({ |
| | | fileData: component.get("v.fileContentData") |
| | | }); |
| | | debugger; |
| | | action1.setCallback(this, function (response) { |
| | | console.log("response = " + JSON.stringify(response)); |
| | | var state = response.getState(); |
| | |
| | | dataMap.set(item.AWS_Data_Id__c, item.AWS_Data_Id__c); //zhj 新方案改造 2022-12-21 |
| | | } |
| | | }); |
| | | debugger; |
| | | let obj = Object.create(null); |
| | | obj["dataIds"] = dataArr; |
| | | var payload = JSON.stringify(obj); |
| | | console.log("payload zhj = " + JSON.stringify(payload)); |
| | | |
| | | this.search_contact_url( |
| | | component, |
| | | "Agency_Contact__c", |
| | |
| | | // component.set('v.login',true); |
| | | // this.ImportMethod(component,resultjson); |
| | | // } |
| | | component.set("v.loginEdit", true); |
| | | component.set("v.login", true); |
| | | this.saveRecordsEditFile( |
| | | component, |
| | | dataMap, |
| | |
| | | helper |
| | | ); |
| | | } else { |
| | | this.error("AWS 查询数据为空 "); |
| | | component.set("v.loginEdit", false); |
| | | this.error("AWS search status5 "); |
| | | component.set("v.login", false); |
| | | } |
| | | } else { |
| | | this.error("AWS search status6 : " + result.status); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | } |
| | | }, |
| | | component |
| | |
| | | // }); |
| | | // $A.enqueueAction(action); |
| | | }, |
| | | isNumber: function (str) { |
| | | return /^\d+$/.test(str); |
| | | }, |
| | | ImportMethod: function (component, fileStr) { |
| | | debugger; |
| | | var actionss = component.get("c.processData"); |
| | | var selectDate = component.find("select_date").get("v.value"); |
| | | var fieldsList = ["Name", "Phone", "AccountNumber"]; //Please write your code dynamic |
| | |
| | | if (res != "success") { |
| | | var ress = res.split("="); |
| | | console.log(ress); |
| | | let errorDatas = []; |
| | | let errorDataRow = []; |
| | | debugger; |
| | | var fileContentData = component.get("v.fileContentData").split("\n"); |
| | | for (var i = 0; i < ress.length; i++) { |
| | | res1 += ress[i].substr(7) + "\n"; |
| | | if (ress[i] != "") { |
| | | let errorData = {}; |
| | | if (!this.isNumber(ress[i].substr(7).substring(1, 2))) { |
| | | continue; |
| | | } |
| | | let index = errorDataRow.indexOf( |
| | | ress[i].substr(7).substring(1, 2) |
| | | ); |
| | | if (index == -1) { |
| | | errorData.errorRow = ress[i].substr(7).substring(1, 2); |
| | | errorDataRow.push(errorData.errorRow); |
| | | errorData.errorInfo = ress[i] |
| | | .substr(7) |
| | | .substring(5) |
| | | .replace("=", ""); |
| | | if (errorData.errorInfo == "拜访人不存在") { |
| | | console.log("errorData.errorRow = " + errorData.errorRow); |
| | | errorData.errorInfo = |
| | | "拜访人 " + |
| | | fileContentData[errorData.errorRow].split(",")[4] + |
| | | "不存在"; |
| | | } |
| | | errorDatas.push(errorData); |
| | | } else { |
| | | if (ress[i].substr(7).substring(5) == "拜访人不存在") { |
| | | errorDatas[index].errorInfo += |
| | | "; " + |
| | | "拜访人 " + |
| | | fileContentData[errorDatas[index].errorRow].split(",")[4] + |
| | | "不存在"; |
| | | } else { |
| | | errorDatas[index].errorInfo += |
| | | "; " + ress[i].substr(7).substring(5); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | let errorColumns = [ |
| | | { |
| | | label: "错误行", |
| | | fieldName: "errorRow", |
| | | type: "text", |
| | | hideDefaultActions: true, |
| | | initialWidth: 100 |
| | | }, |
| | | { |
| | | label: "错误信息", |
| | | fieldName: "errorInfo", |
| | | type: "text", |
| | | hideDefaultActions: true, |
| | | initialWidth: 300, |
| | | wrapText: true |
| | | } |
| | | ]; |
| | | for (var i = 0; i < fileContentData[0].split(",").length; i++) { |
| | | errorColumns.push({ |
| | | label: fileContentData[0].split(",")[i], |
| | | fieldName: "field" + i, |
| | | type: "text", |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | initialWidth: 120 |
| | | }); |
| | | } |
| | | |
| | | for (var i = 0; i < errorDatas.length; i++) { |
| | | let data = fileContentData[errorDatas[i].errorRow]; |
| | | console.log("data = " + JSON.stringify(data)); |
| | | if (data) { |
| | | for (var j = 0; j < data.split(",").length; j++) { |
| | | let label = "field" + j; |
| | | errorDatas[i][label] = data.split(",")[j]; |
| | | } |
| | | } |
| | | } |
| | | component.set("v.errorColumns", errorColumns); |
| | | component.set("v.errorData", errorDatas); |
| | | component.set("v.showErrorInfo", true); |
| | | // $('.forceToastManager').css('white-space', 'pre-wrap'); |
| | | console.log("==" + res1); |
| | | this.error(res1 + "请修改后重新上传"); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | } else { |
| | | component.set("v.showMain", true); |
| | | this.success("导入成功"); |
| | | // alert('saved successfully'); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | } |
| | | } else if (state === "INCOMPLETE") { |
| | | // do something |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | } else if (state === "ERROR") { |
| | | var errors = response.getError(); |
| | | if (errors) { |
| | | if (errors[0] && errors[0].message) { |
| | | console.log("Error message: " + errors[0].message); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | } |
| | | } else { |
| | | console.log("Unknown error"); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | } |
| | | } |
| | | }); |
| | |
| | | } |
| | | |
| | | if (error != "") { |
| | | console.log("zhj error = " + error); |
| | | let errorArray = error.split("error1"); |
| | | let errorDatas = []; |
| | | let errorDataRow = []; |
| | | debugger; |
| | | var fileContentData = component.get("v.fileContentData").split("\n"); |
| | | console.log("errorArray = " + JSON.stringify(errorArray)); |
| | | for (var i in errorArray) { |
| | | if (errorArray[i] != "") { |
| | | let errorData = {}; |
| | | if (!this.isNumber(errorArray[i].trim().substring(1, 2))) { |
| | | continue; |
| | | } |
| | | let index = errorDataRow.indexOf( |
| | | errorArray[i].trim().substring(1, 2) |
| | | ); |
| | | if (index == -1) { |
| | | errorData.errorRow = errorArray[i].trim().substring(1, 2); |
| | | errorDataRow.push(errorData.errorRow); |
| | | errorData.errorInfo = errorArray[i] |
| | | .trim() |
| | | .substring(5, errorArray[i].trim().length) |
| | | .replace("=", ""); |
| | | if (errorData.errorInfo == "拜访人AWS不存在") { |
| | | errorData.errorInfo = |
| | | "拜访人 " + |
| | | fileContentData[errorData.errorRow].split(",")[4] + |
| | | "不存在"; |
| | | } |
| | | errorDatas.push(errorData); |
| | | } else { |
| | | if (errorArray[i].trim().substring(5) == "拜访人AWS不存在") { |
| | | errorData[index].errorInfo = |
| | | "; " + |
| | | "拜访人 " + |
| | | fileContentData[errorDatas[index].errorRow].split(",")[4] + |
| | | "不存在"; |
| | | } else { |
| | | errorDatas[index].errorInfo += |
| | | "; " + |
| | | errorArray[i].trim().substring(5, errorArray[i].trim().length); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | var fileContentData = component.get("v.fileContentData").split("\n"); |
| | | let errorColumns = [ |
| | | { |
| | | label: "错误行", |
| | | fieldName: "errorRow", |
| | | type: "text", |
| | | hideDefaultActions: true, |
| | | initialWidth: 100 |
| | | }, |
| | | { |
| | | label: "错误信息", |
| | | fieldName: "errorInfo", |
| | | type: "text", |
| | | hideDefaultActions: true, |
| | | initialWidth: 300, |
| | | wrapText: true |
| | | } |
| | | ]; |
| | | for (var i = 0; i < fileContentData[0].split(",").length; i++) { |
| | | errorColumns.push({ |
| | | label: fileContentData[0].split(",")[i], |
| | | fieldName: "field" + i, |
| | | type: "text", |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | initialWidth: 120 |
| | | }); |
| | | } |
| | | |
| | | for (var i = 0; i < errorDatas.length; i++) { |
| | | let data = fileContentData[errorDatas[i].errorRow]; |
| | | console.log("data = " + JSON.stringify(data)); |
| | | for (var j = 0; j < data.split(",").length; j++) { |
| | | let label = "field" + j; |
| | | errorDatas[i][label] = data.split(",")[j]; |
| | | } |
| | | } |
| | | console.log("errorDatas =" + JSON.stringify(errorDatas)); |
| | | component.set("v.errorColumns", errorColumns); |
| | | component.set("v.errorData", errorDatas); |
| | | component.set("v.showErrorInfo", true); |
| | | |
| | | console.log("error = " + error); |
| | | component.set("v.errorMessage", error); |
| | | |
| | | this.error(error); |
| | | console.log("error=" + error); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | return; |
| | | } |
| | | |
| | |
| | | }, |
| | | |
| | | select_repores_date: function (component, event, helper) { |
| | | component.set("v.loginEdit", true); |
| | | component.set("v.login", true); |
| | | var reportsdate1 = component.find("input-report-date1").get("v.value"); |
| | | var reportsdate2 = component.find("input-report-date2").get("v.value"); |
| | | console.log( |
| | |
| | | if (state === "SUCCESS") { |
| | | var res = response.getReturnValue(); |
| | | console.log("输入的开始日期3" + res); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | |
| | | // PI 改造 By Bright 20220328 |
| | | if (true) { |
| | |
| | | } |
| | | helper.showExportDate(component, res); |
| | | |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | }, |
| | | awsurl.token |
| | | ); |
| | |
| | | component.set("v.reports_date", res); |
| | | } else { |
| | | alert("导出失败,请检查活动日"); |
| | | component.set("v.loginEdit", false); |
| | | component.set("v.login", false); |
| | | } |
| | | }); |
| | | $A.enqueueAction(action); |
| | |
| | | } |
| | | |
| | | $A.enqueueAction(action); |
| | | }, |
| | | } |
| | | //zhj MEBG新方案改造 2022-11-29 end |
| | | |
| | | //zhj 导出错误信息 2023-05-16 start |
| | | exportErrorInfoHelper: function (component) { |
| | | var errorData = component.get("v.errorData"); |
| | | var errorColumns = component.get("v.errorColumns"); |
| | | |
| | | var datas = []; |
| | | let errorColumnsArray = []; |
| | | for (var i in errorColumns) { |
| | | errorColumnsArray.push(errorColumns[i].label); |
| | | } |
| | | datas.push(errorColumnsArray); |
| | | //datas.push(errorColumns); |
| | | |
| | | for (var i in errorData) { |
| | | let data = []; |
| | | data.push(errorData[i].errorRow); |
| | | data.push(errorData[i].errorInfo); |
| | | for (var j = 0; j < Object.keys(errorData[i]).length - 2; j++) { |
| | | data.push(errorData[i]["field" + j]); |
| | | } |
| | | datas.push(data); |
| | | } |
| | | |
| | | console.log("datas = " + JSON.stringify(datas)); |
| | | var csv = this.convertToCSV(component, datas); |
| | | console.log("csv = " + JSON.stringify(csv)); |
| | | this.downloadCSV(component, csv); |
| | | }, |
| | | |
| | | convertToCSV: function (component, data) { |
| | | console.log("enter convertToCSV"); |
| | | console.log("data = " + data); |
| | | var csv = ""; |
| | | for (var i = 0; i < data.length; i++) { |
| | | var row = data[i]; |
| | | console.log("row = " + JSON.stringify(row)); |
| | | for (var j = 0; j < row.length; j++) { |
| | | var val = ""; |
| | | val = row[j] === null ? "" : row[j].toString(); |
| | | console.log("val = " + val); |
| | | if ( |
| | | val.indexOf(",") !== -1 || |
| | | val.indexOf('"') !== -1 || |
| | | val.indexOf("\n") !== -1 |
| | | ) { |
| | | //val = '"' + val.replace(/"/g,'""') + '"'; |
| | | } |
| | | if (j > 0) { |
| | | csv += ","; |
| | | } |
| | | csv += val; |
| | | } |
| | | csv += "\n"; |
| | | } |
| | | return csv; |
| | | }, |
| | | |
| | | downloadCSV: function (component, csv) { |
| | | var link = document.createElement("a"); |
| | | // 设置字符集和文件头 |
| | | var bom = "\uFEFF"; |
| | | link.href = "data:text/csv;charset=utf-8," + encodeURIComponent(bom + csv); |
| | | link.download = "data.csv"; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | } |
| | | //zhj 导出错误信息 2023-05-16 end |
| | | |
| | | // searchAgencyContact : function(res) { |
| | | // var agencyContacts = []; |
| | |
| | | @isTest |
| | | private class ArriveGoodsControllerTest { |
| | | @isTest |
| | | static void myUnitTest() { |
| | | // // TO DO: implement unit test |
| | | List<RecordType> rectCo = [ |
| | | SELECT Id |
| | | FROM RecordType |
| | | WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '販売店' |
| | | ]; |
| | | if (rectCo.size() == 0) { |
| | | return; |
| | | } |
| | | // Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET Email)']; |
| | | Profile prof = [ |
| | | SELECT Id |
| | | FROM Profile |
| | | WHERE Name = '901_经销商社区普通权限_2重验证(ET)' |
| | | ]; |
| | | |
| | | Account myAccount2 = new Account( |
| | | name = 'Testaccount002', |
| | | Dealer_discount__c = 20, |
| | | RecordTypeId = rectCo[0].Id, |
| | | AgentCode_Ext__c = '9999900' |
| | | ); |
| | | Account myAccount1 = new Account( |
| | | name = 'Testaccount001', |
| | | Dealer_discount__c = 30, |
| | | RecordTypeId = rectCo[0].Id |
| | | ); |
| | | insert new List<account>{ myAccount1, myAccount2 }; |
| | | |
| | | Contact core = new Contact( |
| | | email = 'jplumber@salesforce.com', |
| | | firstname = 'Joe', |
| | | lastname = 'Plumber', |
| | | accountid = myAccount1.id |
| | | ); |
| | | insert core; |
| | | user MyUser_Test = new User( |
| | | ContactId = core.id, |
| | | Alias = 'newUser', |
| | | Email = 'newuser@testorg.com', |
| | | EmailEncodingKey = 'UTF-8', |
| | | LastName = 'TestUser', |
| | | LanguageLocaleKey = 'zh_CN', |
| | | LocaleSidKey = 'zh_CN', |
| | | ProfileId = prof.Id, |
| | | TimeZoneSidKey = 'Asia/Shanghai', |
| | | UserName = 'testUser@testorg.com', |
| | | UserPro_Type__c = 'ET' |
| | | ); |
| | | System.runAs(new User(Id = UserInfo.getUserId())) { |
| | | insert MyUser_Test; |
| | | } |
| | | |
| | | // User MyUser_Test = [select id,Contact.accountid from User WHERE ProfileId = :prof.Id and IsActive = true and UserPro_Type__c = 'ET' limit 1 ]; |
| | | // Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',JANCODE__c = '04953170200311',Dealer_special_Object__c = true,Manual_Entry__c = false); |
| | | // Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',JANCODE__c = '04953170200312',Dealer_special_Object__c = true,Manual_Entry__c = false); |
| | | // insert new Product2[] {prod01,prod02}; |
| | | System.runAs(MyUser_Test) { |
| | | Product2 prod01 = new Product2( |
| | | Name = 'Test01', |
| | | ProductCode = 'Test01', |
| | | Asset_Model_No__c = 'Test01', |
| | | SFDA_Status__c = '有効', |
| | | JANCODE__c = '04953170200311', |
| | | Dealer_special_Object__c = true, |
| | | Manual_Entry__c = false |
| | | ); |
| | | Product2 prod02 = new Product2( |
| | | Name = 'Test02', |
| | | ProductCode = 'Test02', |
| | | Asset_Model_No__c = 'Test02', |
| | | SFDA_Status__c = '有効', |
| | | JANCODE__c = '04953170200312', |
| | | Dealer_special_Object__c = true, |
| | | Manual_Entry__c = false |
| | | ); |
| | | insert new List<Product2>{ prod01, prod02 }; |
| | | Product2__c pro1 = new Product2__c( |
| | | Name = 'Pro001', |
| | | OT_CODE_Text__c = 'Test001', |
| | | Product2__c = prod01.Id |
| | | ); |
| | | Product2__c pro2 = new Product2__c( |
| | | Name = 'Pro002', |
| | | OT_CODE_Text__c = 'Test002', |
| | | Product2__c = prod02.Id |
| | | ); |
| | | insert new List<Product2__c>{ pro1, pro2 }; |
| | | //订单 |
| | | Consumable_order__c Order1 = new Consumable_order__c(); |
| | | Order1.Name = 'OCM_01_001'; |
| | | Order1.Order_status__c = '批准'; |
| | | Order1.Order_type__c = '订单'; |
| | | // Order1.Dealer_Info__c = myAccount1.id; |
| | | Order1.Dealer_Info__c = myAccount1.id; |
| | | Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery; |
| | | Order1.Total_num__c = 3; |
| | | Order1.OrderNumber_arrived__c = 1; |
| | | Order1.Delivery_detail_count__c = 1; |
| | | Order1.Order_ProType__c = 'ET'; |
| | | insert Order1; |
| | | |
| | | //订单明细 |
| | | //fahuo |
| | | Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c(); |
| | | Orderdet.Name = 'OCM_01_00101'; |
| | | Orderdet.Consumable_order__c = Order1.Id; |
| | | Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order; |
| | | Orderdet.Consumable_Product__c = pro1.Id; |
| | | Orderdet.Consumable_count__c = 40; |
| | | insert Orderdet; |
| | | |
| | | //发货明细 |
| | | //到货正确信息 |
| | | Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c(); |
| | | Orderdet1.Name = 'OCM_01_001002'; |
| | | Orderdet1.Consumable_order_minor__c = Order1.Id; |
| | | Orderdet1.Consumable_Product__c = pro1.Id; |
| | | Orderdet1.Asset_Model_No__c = 'Test01'; |
| | | Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery; |
| | | Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRA'; |
| | | Orderdet1.TracingCode__c = 'BXJRA'; |
| | | |
| | | //取消产品 |
| | | Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c(); |
| | | Orderdet2.Name = 'OCM_01_001003'; |
| | | Orderdet2.Consumable_order_minor__c = Order1.Id; |
| | | Orderdet2.Consumable_Product__c = pro1.Id; |
| | | Orderdet2.Asset_Model_No__c = 'Test01'; |
| | | //Orderdet2.Consumable_Arrived_order__c = Order1.Id; |
| | | Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery; |
| | | Orderdet2.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRB'; |
| | | Orderdet2.Cancellation_Date__c = Date.today(); |
| | | Orderdet2.TracingCode__c = 'BXJRB'; |
| | | //销售产品 |
| | | Consumable_order_details2__c Orderdet3 = new Consumable_order_details2__c(); |
| | | Orderdet3.Name = 'OCM_01_001004'; |
| | | Orderdet3.Consumable_order_minor__c = Order1.Id; |
| | | Orderdet3.Consumable_Product__c = pro1.Id; |
| | | Orderdet3.Asset_Model_No__c = 'Test01'; |
| | | Orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery; |
| | | Orderdet3.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRC'; |
| | | Orderdet3.Used_date__c = Date.today(); |
| | | Orderdet3.Arrive_date__c = Date.today(); |
| | | Orderdet3.TracingCode__c = 'BXJRC'; |
| | | //Orderdet3.Box_Piece__c = '盒'; |
| | | |
| | | //出库产品 |
| | | Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c(); |
| | | Orderdet4.Name = 'OCM_01_001005'; |
| | | Orderdet4.Consumable_order_minor__c = Order1.Id; |
| | | Orderdet4.Consumable_Product__c = pro1.Id; |
| | | Orderdet4.Asset_Model_No__c = 'Test01'; |
| | | Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery; |
| | | Orderdet4.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRD'; |
| | | Orderdet4.Send_Date__c = Date.today(); |
| | | Orderdet4.Arrive_date__c = Date.today(); |
| | | Orderdet4.TracingCode__c = 'BXJRD'; |
| | | |
| | | //已到货产品 |
| | | Consumable_order_details2__c Orderdet5 = new Consumable_order_details2__c(); |
| | | Orderdet5.Name = 'OCM_01_001006'; |
| | | Orderdet5.Consumable_order_minor__c = Order1.Id; |
| | | Orderdet5.Consumable_Product__c = pro1.Id; |
| | | Orderdet5.Asset_Model_No__c = 'Test01'; |
| | | Orderdet5.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery; |
| | | Orderdet5.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRE'; |
| | | Orderdet5.Arrive_date__c = Date.today(); |
| | | Orderdet5.TracingCode__c = 'BXJRE'; |
| | | |
| | | //发货明细 |
| | | //管理编码包含数字 |
| | | Consumable_order_details2__c Orderdet6 = new Consumable_order_details2__c(); |
| | | Orderdet6.Name = 'OCM_01_001002'; |
| | | Orderdet6.Consumable_order_minor__c = Order1.Id; |
| | | Orderdet6.Consumable_Product__c = pro1.Id; |
| | | Orderdet6.Asset_Model_No__c = 'Test01'; |
| | | Orderdet6.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery; |
| | | Orderdet6.Bar_Code__c = '01049531702003111115120017181000105ZK250BX123'; |
| | | Orderdet6.TracingCode__c = 'BX123'; |
| | | |
| | | //发错库 未到货 |
| | | Consumable_order_details2__c Orderdets8 = new Consumable_order_details2__c(); |
| | | Orderdets8.Name = 'OCM_01_001011'; |
| | | Orderdets8.Consumable_order_minor__c = Order1.Id; |
| | | Orderdets8.Consumable_Product__c = pro1.Id; |
| | | Orderdets8.Asset_Model_No__c = 'Test01'; |
| | | Orderdets8.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery; |
| | | Orderdets8.Bar_Code__c = '01049531702003111115120017181000105ZK250BXsys'; |
| | | Orderdets8.Box_Piece__c = '盒'; |
| | | Orderdets8.TracingCode__c = 'BXsys'; |
| | | |
| | | insert new List<Consumable_order_details2__c>{ |
| | | Orderdet1, |
| | | Orderdet2, |
| | | Orderdet3, |
| | | Orderdet4, |
| | | Orderdet5, |
| | | Orderdet6, |
| | | Orderdets8 |
| | | }; |
| | | |
| | | List<Consumable_orderdetails__c> cod1 = [ |
| | | SELECT Id |
| | | FROM Consumable_orderdetails__c |
| | | WHERE Consumable_order__c = :Order1.Id |
| | | ]; |
| | | System.assertEquals(1, cod1.size()); |
| | | |
| | | PageReference page = new PageReference( |
| | | '/apex/ArriveGoods?Esetid=' + Order1.Id |
| | | ); |
| | | |
| | | System.Test.setCurrentPage(page); |
| | | ArriveGoodsController Controller = new ArriveGoodsController(); |
| | | //初始化测试 |
| | | System.Test.startTest(); |
| | | Controller.init(); |
| | | //排序 |
| | | Controller.barcode = ''; |
| | | Controller.SearchPro(); |
| | | Controller.barcode = '01049531702003111115120017181000105ZK250BXJRA\n01049531702003111115120017181000105ZK250BXsys\n01049531702003111115120017181000105ZK250BXsun\n01049531702003111115120017181000105ZK250BXJRB\n01049531702003111115120017181000105ZK250BXJRC\n01049531702003111115120017181000105ZK250BX111\n01049531702003111115120017181000105ZK250BXJRD\n01049531702003111115120017181000105ZK250BXJRE\n01049531702003111115120017181000105ZK250BXJRF\n01049531702003111115120017181000105ZK250BXJRG\n01049531702003111115120017181000105ZK250BX123'; |
| | | Controller.SearchPro(); |
| | | |
| | | // System.assertEquals(3, controller.ConsumableorderdetailsRecordsdummy.size()); //tcm |
| | | Controller.ArriveGoodsConfim(); |
| | | System.Test.stopTest(); |
| | | } |
| | | } |
| | | //选择等待入库,包括01 和241 |
| | | @isTest |
| | | static void arriveWithID() { |
| | |
| | | Controller.UpdateGoodsOfReturn(); |
| | | Controller.ToReturnGoodsPage(); |
| | | Controller.geterrorsize(); |
| | | System.Test.stopTest(); |
| | | } |
| | | } |
| | | |
| | | @isTest |
| | | static void makeRecordsVieweTest() { |
| | | Integer count = 1001; |
| | | List<ArriveGoodsController.ConsumableorderdetailsInfo> conList = new List<ArriveGoodsController.ConsumableorderdetailsInfo>(); |
| | | for (Integer i = 0; i < 1001; i++) { |
| | | conList.add(new ArriveGoodsController.ConsumableorderdetailsInfo()); |
| | | } |
| | | ArriveGoodsController arr = new ArriveGoodsController(); |
| | | arr.makeRecordsView(conList); |
| | | ArriveGoodsController arr1 = new ArriveGoodsController('', ''); |
| | | } |
| | | |
| | | @isTest |
| | | static void compareToTest() { |
| | | ArriveGoodsController.ConsumableorderdetailsInfo c1 = new ArriveGoodsController.ConsumableorderdetailsInfo(); |
| | | ArriveGoodsController.ConsumableorderdetailsInfo c2 = new ArriveGoodsController.ConsumableorderdetailsInfo(); |
| | | c1.compareTo(c2); |
| | | } |
| | | |
| | | @isTest |
| | | static void searchProTest1() { |
| | | List<RecordType> rectCo = [ |
| | | SELECT Id |
| | | FROM RecordType |
| | | WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '販売店' |
| | | ]; |
| | | if (rectCo.size() == 0) { |
| | | return; |
| | | } |
| | | Profile prof = [ |
| | | SELECT Id |
| | | FROM Profile |
| | | WHERE Name = '901_经销商社区普通权限_2重验证(ET)' |
| | | ]; |
| | | Account myAccount2 = new Account( |
| | | name = 'Testaccount002', |
| | | Dealer_discount__c = 20, |
| | | RecordTypeId = rectCo[0].Id, |
| | | AgentCode_Ext__c = '9999900' |
| | | ); |
| | | Account myAccount1 = new Account( |
| | | name = 'Testaccount001', |
| | | Dealer_discount__c = 30, |
| | | RecordTypeId = rectCo[0].Id |
| | | ); |
| | | insert new List<account>{ myAccount1, myAccount2 }; |
| | | Contact core = new Contact( |
| | | email = 'jplumber@salesforce.com', |
| | | firstname = 'Joe', |
| | | lastname = 'Plumber', |
| | | accountid = myAccount1.id |
| | | ); |
| | | insert core; |
| | | user MyUser_Test = new User( |
| | | ContactId = core.id, |
| | | Alias = 'newUser', |
| | | Email = 'newuser@testorg.com', |
| | | EmailEncodingKey = 'UTF-8', |
| | | LastName = 'TestUser', |
| | | LanguageLocaleKey = 'zh_CN', |
| | | LocaleSidKey = 'zh_CN', |
| | | ProfileId = prof.Id, |
| | | TimeZoneSidKey = 'Asia/Shanghai', |
| | | UserName = 'testUser@testorg.com', |
| | | UserPro_Type__c = 'ET' |
| | | ); |
| | | System.runAs(new User(Id = UserInfo.getUserId())) { |
| | | insert MyUser_Test; |
| | | } |
| | | |
| | | System.runAs(MyUser_Test) { |
| | | Product2 prod01 = new Product2( |
| | | Name = 'Test01', |
| | | ProductCode = 'Test01', |
| | | Asset_Model_No__c = 'Test01', |
| | | SFDA_Status__c = '有効', |
| | | JANCODE__c = '04953170200311', |
| | | Dealer_special_Object__c = true, |
| | | Manual_Entry__c = false |
| | | ); |
| | | Product2 prod02 = new Product2( |
| | | Name = 'Test02', |
| | | ProductCode = 'Test02', |
| | | Asset_Model_No__c = 'Test02', |
| | | SFDA_Status__c = '有効', |
| | | JANCODE__c = '04953170200312', |
| | | Dealer_special_Object__c = true, |
| | | Manual_Entry__c = false |
| | | ); |
| | | insert new List<Product2>{ prod01, prod02 }; |
| | | Product2__c pro1 = new Product2__c( |
| | | Name = 'Pro001', |
| | | OT_CODE_Text__c = 'N3047730', |
| | | Product2__c = prod01.Id |
| | | ); |
| | | Product2__c pro2 = new Product2__c( |
| | | Name = 'Pro002', |
| | | OT_CODE_Text__c = 'N3047731', |
| | | Product2__c = prod02.Id |
| | | ); |
| | | insert new List<Product2__c>{ pro1, pro2 }; |
| | | |
| | | Consumable_order__c Order1 = new Consumable_order__c(); |
| | | Order1.Name = 'OCM_01_001'; |
| | | Order1.Order_status__c = '批准'; |
| | | Order1.Order_type__c = '订单'; |
| | | Order1.Dealer_Info__c = myAccount1.id; |
| | | Order1.RecordTypeid = System.Label.RT_ConOrder_Delivery; |
| | | Order1.Order_ProType__c = 'ET'; |
| | | insert Order1; |
| | | Consumable_orderdetails__c Orderdet = new Consumable_orderdetails__c(); |
| | | Orderdet.Name = 'OCM_01_00101'; |
| | | Orderdet.Consumable_order__c = Order1.Id; |
| | | Orderdet.RecordTypeId = System.Label.RT_ConOrderDetail1_Order; |
| | | Orderdet.Consumable_Product__c = pro1.Id; |
| | | Orderdet.Consumable_count__c = 4; |
| | | insert Orderdet; |
| | | Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c(); |
| | | Orderdet1.Name = 'OCM_01_001001'; |
| | | Orderdet1.Consumable_order_minor__c = Order1.Id; |
| | | Orderdet1.Consumable_Product__c = pro1.Id; |
| | | Orderdet1.Asset_Model_No__c = 'Test01'; |
| | | Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery; |
| | | Orderdet1.Bar_Code__c = '01049531702003111115120017181000105ZK250BXJRF'; |
| | | Orderdet1.Cancellation_Date__c = null; |
| | | Orderdet1.TracingCode__c = 'BXJRF'; |
| | | Orderdet1.SerialLotNo__c = '5ZK'; |
| | | insert Orderdet1; |
| | | System.debug('Orderdet1:' + Orderdet1); |
| | | Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c(); |
| | | Orderdet2.Name = 'OCM_01_001001'; |
| | | Orderdet2.Consumable_order_minor__c = Order1.Id; |
| | | Orderdet2.Consumable_Product__c = pro1.Id; |
| | | Orderdet2.Asset_Model_No__c = 'Test01'; |
| | | Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery; |
| | | Orderdet2.Bar_Code__c = '01049531702003111115120017181234105ZK250BXJRF'; |
| | | Orderdet1.Cancellation_Date__c = null; |
| | | Orderdet2.TracingCode__c = 'BXJRF'; |
| | | Orderdet2.SerialLotNo__c = '5ZK'; |
| | | insert Orderdet2; |
| | | |
| | | PageReference page = new PageReference('/apex/ArriveGoods?ArrType=Arr'); |
| | | System.Test.setCurrentPage(page); |
| | | ArriveGoodsController Controller = new ArriveGoodsController(); |
| | | System.Test.startTest(); |
| | | Controller.init(); |
| | | Controller.barcode = '01049531702003111115120017181000105ZK250BXJRF'; |
| | | Controller.SearchPro(); |
| | | Controller.ArriveGoodsConfim(); |
| | | List<Consumable_order_details2__c> ins = [ |
| | | SELECT Id, Name |
| | | FROM Consumable_order_details2__c |
| | | ]; |
| | | System.Test.stopTest(); |
| | | } |
| | | } |
| | |
| | | public with sharing class DealerInquiryModifyStateController { |
| | | public List<OpportunityInfo> oppRecords { get; set; } |
| | | // ページレイアウトの情報を取得 |
| | | private Map<String, Map<String, String>> editLayoutItemRWMap = New Map<String, Map<String, String>>(); |
| | | private Map<String, Map<String, String>> editLayoutItemRWMap = new Map<String, Map<String, String>>(); |
| | | // private Map<String, Map<String, String>> editLayoutItemRWMapRt = null; |
| | | public List<OpportunityInfo> OPPORTList { get; set; } |
| | | /*****************検索用******************/ |
| | |
| | | public String preSortKey { get; set; } |
| | | public Boolean sortOrderAsc { get; set; } |
| | | public String[] sortOrder { get; set; } |
| | | public String[] columus = new String[] {'Id'}; |
| | | public String[] columus = new List<String>{ 'Id' }; |
| | | public String[] selColumus = null; |
| | | public Set<String> columusSet = new Set<String> {'Id'}; |
| | | |
| | |
| | | private String strColumus; |
| | | private String strRtColumus; |
| | | |
| | | //add by Link 2023-6-2 |
| | | public String remindMsg{get;set;} |
| | | |
| | | @TestVisible private String accTypeForSort = null; |
| | | @TestVisible |
| | | private String accTypeForSort = null; |
| | | private static Integer oppLimit = 500; |
| | | |
| | | public DealerInquiryModifyStateController() { |
| | |
| | | //数据字段下拉列表 |
| | | textOpts = new List<SelectOption>(); |
| | | textOpts.add(new SelectOption('', '--无--')); |
| | | textOpts.add(new SelectOption('Agency_Opportunity_No__c', '经销商询价编码')); |
| | | textOpts.add( |
| | | new SelectOption('Agency_Opportunity_No__c', '经销商询价编码') |
| | | ); |
| | | textOpts.add(new SelectOption('Agency__r.Name', '经销商')); |
| | | textOpts.add(new SelectOption('Agency_Hospital__r.Name', '经销商医院')); |
| | | textOpts.add(new SelectOption('Department_Cateogy__c', '科室分类')); |
| | |
| | | timeOpts.add(new SelectOption('Created_Day__c', '创建日')); |
| | | timeOpts.add(new SelectOption('Bid_Planned_Date__c', '预测招标日')); |
| | | timeOpts.add(new SelectOption('Forecasted_Bid_Date__c', '预测中标日')); |
| | | timeOpts.add(new SelectOption('Close_Forecasted_Date__c', '预测与OLY签约日')); |
| | | timeOpts.add( |
| | | new SelectOption('Close_Forecasted_Date__c', '预测与OLY签约日') |
| | | ); |
| | | timeOpts.add(new SelectOption('Lost_Opportunity_Date__c', '失单日期')); |
| | | timeOpts.add(new SelectOption('Deleted_Reason_Date__c', '取消日期')); |
| | | //数据字段中间连接符号 |
| | |
| | | } |
| | | |
| | | public PageReference init() { |
| | | remindMsg = ''; |
| | | PartnerSoapSforceCom.Soap soap = new PartnerSoapSforceCom.Soap(); |
| | | soap.SessionHeader = new PartnerSoapSforceCom.SessionHeader_element(); |
| | | soap.SessionHeader.sessionId = UserInfo.getSessionId(); |
| | | soap.endpoint_x = URL.getSalesforceBaseUrl().toExternalForm() + '/partner/services/Soap/u/33.0'; |
| | | soap.endpoint_x = |
| | | URL.getSalesforceBaseUrl().toExternalForm() + |
| | | '/partner/services/Soap/u/33.0'; |
| | | // soap.endpoint_x = URL.getSalesforceBaseUrl().toExternalForm() + '/services/Soap/u/33.0'; |
| | | |
| | | PartnerSoapSforceCom.DescribeLayoutResult dlr = new PartnerSoapSforceCom.DescribeLayoutResult(); |
| | |
| | | Map<String, String> rtnInner = new Map<String, String>(); |
| | | editLayoutItemRWMap.put(recordTypeId, rtnInner); |
| | | System.debug('recordTypeId=' + recordTypeId); |
| | | PartnerSoapSforceCom.DescribeLayout layout = layputMap.get(dlr.recordTypeMappings[lidx].layoutId); |
| | | for (PartnerSoapSforceCom.DescribeLayoutSection section : layout.editLayoutSections) { |
| | | PartnerSoapSforceCom.DescribeLayout layout = layputMap.get( |
| | | dlr.recordTypeMappings[lidx].layoutId |
| | | ); |
| | | for ( |
| | | PartnerSoapSforceCom.DescribeLayoutSection section : layout.editLayoutSections |
| | | ) { |
| | | for (PartnerSoapSforceCom.DescribeLayoutRow row : section.layoutRows) { |
| | | for (PartnerSoapSforceCom.DescribeLayoutItem item : row.layoutItems) { |
| | | if (item.layoutComponents != null && item.layoutComponents.size() > 0 |
| | | && String.isBlank(item.layoutComponents[0].value) == false) { |
| | | if ( |
| | | item.layoutComponents != null && |
| | | item.layoutComponents.size() > 0 && |
| | | String.isBlank(item.layoutComponents[0].value) == false |
| | | ) { |
| | | rtnInner.put(item.layoutComponents[0].value, 'r'); |
| | | if (item.editableForUpdate) { |
| | | rtnInner.put(item.layoutComponents[0].value, 'w'); |
| | |
| | | return null; |
| | | } |
| | | //用于获取经销商询价字段集和询价字段集以及相应的读写权限 |
| | | @TestVisible private void setLayoutRWInfo() { |
| | | @TestVisible |
| | | private void setLayoutRWInfo() { |
| | | if (this.sortOrder == null) { |
| | | selColumus = new String[] {}; |
| | | selColumus = new List<String>{}; |
| | | strColumus = ''; |
| | | ID accRecordTypeId = accTypeForSort; |
| | | |
| | | Map<String, String> DESC_RW = editLayoutItemRWMap.get('012100000006KW7AAM'); |
| | | Map<String, Schema.FieldSet> fsMap = Schema.getGlobalDescribe().get('Agency_Opportunity__c').getDescribe().fieldSets.getMap(); |
| | | Map<String, String> DESC_RW = editLayoutItemRWMap.get( |
| | | '012100000006KW7AAM' |
| | | ); |
| | | Map<String, Schema.FieldSet> fsMap = Schema.getGlobalDescribe() |
| | | .get('Agency_Opportunity__c') |
| | | .getDescribe() |
| | | .fieldSets.getMap(); |
| | | Schema.FieldSet fs = fsMap.get('DealerInquiryModifyState'); |
| | | List<FieldSetMember> fsmList = fs.getFields(); |
| | | titleLeft = new List<String>(); |
| | |
| | | strRtColumus = strRtColumus + ',' + s; |
| | | } |
| | | columnRightCss.add(s.replace('.', '_')); |
| | | |
| | | } |
| | | strColumus = String.join(columus, ','); |
| | | System.debug('======-======-======strColumus' + strColumus); |
| | | System.debug('======-======-======strRtColumus' + strRtColumus); |
| | | this.sortOrderAsc = true; |
| | | this.sortOrder = new String[selColumus.size()]; |
| | | for (Integer i = 0; i < selColumus.size(); i++) this.sortOrder[i] = ' '; |
| | | this.sortOrder = new List<String>(selColumus.size()); |
| | | for (Integer i = 0; i < selColumus.size(); i++) |
| | | this.sortOrder[i] = ' '; |
| | | } |
| | | } |
| | | //用于拼接SOQL语句 根据不同检索条件拼接不同SOQL语句。 |
| | |
| | | // System.debug('pppqqq333'+querySoql); |
| | | // AND Ownerid in ( '+querySoql+')' |
| | | |
| | | String soql = 'SELECT Change_To_Opportunity__r.Id , Agency_Hospital__r.Name , Product_Category1__r.Name , Product_Category2__r.Name , Product_Category3__r.Name , Agency_Person__r.Name , Agency__r.Name , Change_To_Opportunity__r.Name ,' + |
| | | strColumus + ',' + strRtColumus + |
| | | String soql = |
| | | 'SELECT Change_To_Opportunity__r.Id , Agency_Hospital__r.Name , Product_Category1__r.Name , Product_Category2__r.Name , Product_Category3__r.Name , Agency_Person__r.Name , Agency__r.Name , Change_To_Opportunity__r.Name ,' + |
| | | strColumus + |
| | | ',' + |
| | | strRtColumus + |
| | | ' FROM Agency_Opportunity__c WHERE recordType.DeveloperName = \'Opportunity\' '; |
| | | //数据字段:经销商医院 +SOQL |
| | | if (!String.isBlank(accSearch)) { |
| | | accSearch = accSearch.trim(); |
| | | // soql += 'AND Agency__r.Name ' + ' LIKE \'%' + accSearch + '%\' '; |
| | | soql += 'AND Agency_Hospital__r.Name ' + ' LIKE \'%' + accSearch + '%\' '; |
| | | soql += |
| | | 'AND Agency_Hospital__r.Name ' + |
| | | ' LIKE \'%' + |
| | | accSearch + |
| | | '%\' '; |
| | | } |
| | | //数据字段:担当人 +SOQL |
| | | if (!String.isBlank(aooSearch)) { |
| | | String newAooSearch = aooSearch.trim(); |
| | | // soql += 'AND Change_To_Opportunity__r.Owner.Alias = ' + '\'' + newAooSearch + '\'';//Name |
| | | soql += 'AND Agency_PersonName__c ' + ' LIKE \'%' + newAooSearch + '%\' '; |
| | | soql += |
| | | 'AND Agency_PersonName__c ' + |
| | | ' LIKE \'%' + |
| | | newAooSearch + |
| | | '%\' '; |
| | | } |
| | | //数据字段:03 手动填写项 准备调用makeTextSql; |
| | | if (!String.isBlank(numtext)) { |
| | |
| | | //点击排序 |
| | | // System.debug('==-=-=-=-=-=this.sortKey'+Integer.valueOf(this.sortKey)+'===titleLeft.size'+titleLeft.size()+7); |
| | | if (String.isBlank(this.sortKey)) { |
| | | soql += ' order by LastModifiedDate desc limit ' + Integer.valueOf(limits); |
| | | soql += |
| | | ' order by LastModifiedDate desc limit ' + Integer.valueOf(limits); |
| | | } else { |
| | | if (Integer.valueOf(this.sortKey) <= titleLeft.size() + 7) { |
| | | soql += ' order by ' + this.selColumus[Integer.valueOf(this.sortKey)] + ' ' + (this.sortOrderAsc == true ? 'asc nulls first' : 'desc nulls last') + ' limit ' + Integer.valueOf(limits); |
| | | soql += |
| | | ' order by ' + |
| | | this.selColumus[Integer.valueOf(this.sortKey)] + |
| | | ' ' + |
| | | (this.sortOrderAsc == true ? 'asc nulls first' : 'desc nulls last') + |
| | | ' limit ' + |
| | | Integer.valueOf(limits); |
| | | } else { |
| | | soql += ' order by Change_To_Opportunity__r.' + this.selColumus[Integer.valueOf(this.sortKey)] + ' ' + (this.sortOrderAsc == true ? 'asc nulls first' : 'desc nulls last') + ' limit ' + Integer.valueOf(limits); |
| | | soql += |
| | | ' order by Change_To_Opportunity__r.' + |
| | | this.selColumus[Integer.valueOf(this.sortKey)] + |
| | | ' ' + |
| | | (this.sortOrderAsc == true ? 'asc nulls first' : 'desc nulls last') + |
| | | ' limit ' + |
| | | Integer.valueOf(limits); |
| | | } |
| | | } |
| | | system.debug(soql); |
| | |
| | | str = '\'' + agc.Change_To_Opportunity__r.Id + '\''; |
| | | } else if (agc.Change_To_Opportunity__r.Id != null) { |
| | | str += ',\'' + agc.Change_To_Opportunity__r.Id + '\''; |
| | | |
| | | } |
| | | } |
| | | for (Agency_Opportunity__c info : InfoList) { |
| | |
| | | oppCount = oppRecords.size(); |
| | | //显示提示操作信息 |
| | | if (String.isBlank(this.saveType) && String.isBlank(this.sortKey)) { |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO, '取得最近的 ' + oppCount + ' 条数据')); |
| | | //add by Link 2023-6-2 |
| | | remindMsg = '取得最近的 ' + oppCount + ' 条数据'; |
| | | ApexPages.addmessage( |
| | | new ApexPages.message( |
| | | ApexPages.severity.INFO, |
| | | '取得最近的 ' + oppCount + ' 条数据' |
| | | ) |
| | | ); |
| | | } else if (!String.isBlank(this.sortKey)) { |
| | | if (oppCount > oppLimit) { |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO, '数据超过' + oppLimit + '件,只显示前' + oppLimit + '件')); |
| | | //add by Link 2023-6-2 |
| | | remindMsg = '数据超过' + oppLimit + '件,只显示前' + oppLimit + '件'; |
| | | ApexPages.addmessage( |
| | | new ApexPages.message( |
| | | ApexPages.severity.INFO, |
| | | '数据超过' + oppLimit + '件,只显示前' + oppLimit + '件' |
| | | ) |
| | | ); |
| | | } else { |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO, '共有 ' + oppCount + ' 条数据')); |
| | | //add by Link 2023-6-2 |
| | | remindMsg = '共有 ' + oppCount + ' 条数据'; |
| | | ApexPages.addmessage( |
| | | new ApexPages.message( |
| | | ApexPages.severity.INFO, |
| | | '共有 ' + oppCount + ' 条数据' |
| | | ) |
| | | ); |
| | | } |
| | | } else { |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO, '共有 ' + oppCount + ' 条数据')); |
| | | //add by Link 2023-6-2 |
| | | remindMsg = '共有 ' + oppCount + ' 条数据'; |
| | | ApexPages.addmessage( |
| | | new ApexPages.message( |
| | | ApexPages.severity.INFO, |
| | | '共有 ' + oppCount + ' 条数据' |
| | | ) |
| | | ); |
| | | } |
| | | } |
| | | //检索条件:数据字段1,数据字段2,数据字段3均满足进入此方法 判断多种情况 |
| | | private String makeTextSql(String textOpts, String equalOpts, String numtext) { |
| | | private String makeTextSql( |
| | | String textOpts, |
| | | String equalOpts, |
| | | String numtext |
| | | ) { |
| | | String soql = ''; |
| | | if (!String.isBlank(textOpts)) { |
| | | //寻找检索条件包含‘ ’ 空格的多重检索条件 |
| | | //system.debug('314-textOpts:'+textOpts); |
| | | if ((equalOpts == 'contains' || equalOpts == 'notcontains') && numtext.contains(',')) { |
| | | if ( |
| | | (equalOpts == 'contains' || equalOpts == 'notcontains') && |
| | | numtext.contains(',') |
| | | ) { |
| | | //system.debug('316-equalOpts:'+equalOpts); |
| | | //system.debug('316-numtext:'+numtext); |
| | | String[] vals = numtext.split(','); |
| | | String cSql = ''; |
| | | soql += ' AND ('; |
| | | for (Integer icount = 0; icount < vals.size(); icount++) { |
| | | |
| | | //精琢科技 zxk 2021-08-25 start |
| | | String val = vals[icount]; |
| | | if (equalOpts == 'contains') { |
| | |
| | | soql += ' AND '; |
| | | } |
| | | } |
| | | |
| | | } |
| | | //精琢科技 zxk 2021-08-25 end |
| | | |
| | | |
| | | // String val = vals[icount]; |
| | | // cSql = this.makeTextSqlStr(textOpts, equalOpts, val); |
| | |
| | | soql += ')'; |
| | | } |
| | | //寻找检索条件包含‘,’ 逗号的多重检索条件 |
| | | else if ((equalOpts == '=' || equalOpts == '<>') && numtext.contains(',')) { |
| | | else if ( |
| | | (equalOpts == '=' || equalOpts == '<>') && numtext.contains(',') |
| | | ) { |
| | | String[] vals = numtext.split(','); |
| | | soql += ' AND ( '; |
| | | for (Integer icount = 0; icount < vals.size(); icount++) { |
| | |
| | | soql += ')'; |
| | | } |
| | | //检索连接符为包含以及不包含 |
| | | else if (equalOpts.equals('contains') || equalOpts.equals('notcontains')) { |
| | | else if ( |
| | | equalOpts.equals('contains') || equalOpts.equals('notcontains') |
| | | ) { |
| | | if (equalOpts.equals('contains')) { |
| | | soql += ' AND ' + textOpts + ' LIKE \'%' + numtext + '%\''; |
| | | } else if (equalOpts.equals('notcontains')) { |
| | |
| | | else if (equalOpts == '=' || equalOpts == '<>') { |
| | | soql += 'AND ' + textOpts + equalOpts + '\'' + numtext + '\''; |
| | | } |
| | | |
| | | //精琢科技 zxk 2021-08-25 start |
| | | //起始字符 |
| | | else if (equalOpts == 'starts with' && numtext.contains(' ')) { |
| | |
| | | soql += ' ' + textOpts + ' LIKE \'%' + val + '%\'' ; |
| | | if (icount < vals.size() - 1) { |
| | | soql += ' OR '; |
| | | |
| | | } |
| | | } |
| | | } |
| | | soql += ')'; |
| | | |
| | | } |
| | | //精琢科技 zxk 2021-08-25 end |
| | | |
| | |
| | | return soql; |
| | | } |
| | | //检索条件:数据字段1,数据字段2,数据字段3均满足,并且进入makeTextSql()之后,内含数据字段包含多种时进入此方法。 |
| | | @TestVisible private String makeTextSqlStr(String textOpts, String equalOpts, String val) { |
| | | @TestVisible |
| | | private String makeTextSqlStr(String textOpts, String equalOpts, String val) { |
| | | String soql = ''; |
| | | if (!String.isBlank(textOpts)) { |
| | | String tmpVal = val; |
| | |
| | | } else if (equalOpts == '<>') { |
| | | soql += ' <> ' + tmpVal; |
| | | } else if (equalOpts == 'contains') { |
| | | soql += ' like \'%' + String.escapeSingleQuotes(tmpVal.replaceAll('%', '\\%')) + '%\''; |
| | | soql += |
| | | ' like \'%' + |
| | | String.escapeSingleQuotes(tmpVal.replaceAll('%', '\\%')) + |
| | | '%\''; |
| | | } else if (equalOpts == 'notcontains') { |
| | | soql += ' like \'%' + String.escapeSingleQuotes(tmpVal.replaceAll('%', '\\%')) + '%\''; |
| | | soql += |
| | | ' like \'%' + |
| | | String.escapeSingleQuotes(tmpVal.replaceAll('%', '\\%')) + |
| | | '%\''; |
| | | } else if (equalOpts == 'starts with') { |
| | | soql += ' like \'%' + String.escapeSingleQuotes(tmpVal.replaceAll('%', '\\%')) + '%\''; |
| | | soql += |
| | | ' like \'%' + |
| | | String.escapeSingleQuotes(tmpVal.replaceAll('%', '\\%')) + |
| | | '%\''; |
| | | } else { |
| | | soql += ' ' + equalOpts + ' ' + tmpVal; |
| | | } |
| | |
| | | if (oi.changeFlg == '1') { |
| | | oi.changeFlg = '0'; |
| | | updTarget.add(oi.AgcOpp); |
| | | |
| | | } |
| | | // if (oi.changeFlgRt == '1' && oi.opp.id != null) { |
| | | // oi.changeFlgRt = '0'; |
| | |
| | | // if (updOpps.size() > 0) { |
| | | // update updOpps; |
| | | // } |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO, '保存完了')); |
| | | //add by Link 2023-6-2 |
| | | remindMsg = '保存完了'; |
| | | ApexPages.addmessage( |
| | | new ApexPages.message(ApexPages.severity.INFO, '保存完了') |
| | | ); |
| | | } catch (Exception e) { |
| | | //ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, '请确定科室分类和产品区分的关系')); |
| | | } |
| | |
| | | if (String.isBlank(this.sortKey) == false) { |
| | | // 方向が変わるのみ |
| | | this.sortOrderAsc = !this.sortOrderAsc; |
| | | this.sortOrder[Integer.valueOf(this.sortKey)] = (this.sortOrderAsc == true ? '↑' : '↓'); |
| | | this.sortOrder[Integer.valueOf(this.sortKey)] = (this.sortOrderAsc == |
| | | true |
| | | ? '↑' |
| | | : '↓'); |
| | | } |
| | | } else { |
| | | this.sortOrderAsc = true; |
| | | if (String.isBlank(this.preSortKey) == false) { |
| | | this.sortOrder[Integer.valueOf(this.preSortKey)] = ' '; |
| | | } |
| | | this.sortOrder[Integer.valueOf(this.sortKey)] = (this.sortOrderAsc == true ? '↑' : '↓'); |
| | | this.sortOrder[Integer.valueOf(this.sortKey)] = (this.sortOrderAsc == true |
| | | ? '↑' |
| | | : '↓'); |
| | | } |
| | | this.preSortKey = this.sortKey; |
| | | |
| | |
| | | public Boolean ifLock { get; set; } |
| | | //public String accType { get; private set; } |
| | | public Agency_Opportunity__c AgcOpp { get; set; } |
| | | public OpportunityInfo(Agency_Opportunity__c record, Agency_Opportunity__c oppo) { |
| | | public OpportunityInfo( |
| | | Agency_Opportunity__c record, |
| | | Agency_Opportunity__c oppo |
| | | ) { |
| | | opp = oppo; |
| | | canEdit = true; |
| | | hasError = false; |
| | |
| | | opp.Name = 'GZ-SP-NFM007_1'; |
| | | opp.Trade__c = '内貿'; |
| | | opp.StageName = '引合'; |
| | | opp.CloseDate = Date.today(); |
| | | opp.CloseDate = date.newinstance(2022, 11, 30); |
| | | opp.Stock_apply_status__c = '申请中'; |
| | | insert opp; |
| | | Test.startTest(); |
| | |
| | | user.Alias = 'テユ'; |
| | | user.CommunityNickname = 'テストユーザー'; |
| | | user.SalesManager__c = UserInfo.getUserId(); |
| | | System.runAs(new User(Id = UserInfo.getUserId())) { |
| | | |
| | | insert user; |
| | | } |
| | | List<user> users = [ |
| | | SELECT Id, Name, LastName, FirstName |
| | | FROM User |
| | |
| | | <apex:page controller="DealerInquiryModifyStateController" docType="html-5.0" showHeader="false" sidebar="false" id="allPage" action="{!init}" lightningStyleSheets="true"> |
| | | <apex:page |
| | | controller="DealerInquiryModifyStateController" |
| | | showHeader="false" |
| | | sidebar="false" |
| | | id="allPage" |
| | | action="{!init}" |
| | | > |
| | | <head> |
| | | <title>经销商批量修改询价状态</title> |
| | | |
| | |
| | | display: none; |
| | | } |
| | | |
| | | div.inline { float:left; } |
| | | |
| | | .clearBoth { clear:both; } |
| | | |
| | | div.inline { |
| | | float: left; |
| | | } |
| | | .clearBoth { |
| | | clear: both; |
| | | } |
| | | div.reportBlock table.list { |
| | | width:auto; |
| | | } |
| | | |
| | | div#out_Div { /* ここにヘッダを格納 */ |
| | | div#out_Div { |
| | | /* ここにヘッダを格納 */ |
| | | position:relative; |
| | | overflow: hidden; |
| | | float:left; |
| | | width:50% !important; |
| | | width: 50.3%; |
| | | } |
| | | |
| | | div#out_Div_L { |
| | | position:relative; |
| | | overflow:hidden; |
| | | float:left; |
| | | width:50% !important; |
| | | border-right:2px solid #808383 |
| | | width: 48%; |
| | | border-right: 2px solid #000; |
| | | } |
| | | |
| | | div#in_Div {/* tbodyが入っている。ここがスクロール対象*/ |
| | | div#in_Div { |
| | | /* tbodyが入っている。ここがスクロール対象*/ |
| | | position:relative; |
| | | overflow: auto; /*スクロールバー*/ |
| | | float:left; |
| | | width:50% !important; |
| | | height: 600px; |
| | | width: 51.8%; |
| | | height: 373px; /* tbodyを表示する高さ、後でjsにて調整 */ |
| | | } |
| | | |
| | | div#in_Div_L { |
| | | position:relative; |
| | | overflow-x:auto; |
| | | overflow-y: hidden; |
| | | float:left; |
| | | width:50% !important; |
| | | height: 600px; |
| | | border-right:2px solid #808383 |
| | | width: 48%; |
| | | height: 373px; |
| | | border-right: 2px solid #000; |
| | | } |
| | | |
| | | body .pbBody table.list tr.headerRow td { |
| | | box-sizing: border-box; |
| | | text-align:center;font-weight:normal; |
| | | text-align: center; |
| | | font-weight: normal; |
| | | padding:0px 0px 0px 1px; |
| | | } |
| | | |
| | | body .pbBody table.list tr.headerRow td.header1 { |
| | | text-align:center;font-weight:normal; |
| | | text-align: center; |
| | | font-weight: normal; |
| | | padding:0px 0px 0px 0px; |
| | | } |
| | | |
| | | body .pbBody table.list tr.dataRow td { |
| | | box-sizing: border-box; |
| | | padding:0px 0px 0px 1px; border-width: 0px 0px 1px 0px; vertical-align: middle; word-break:break-all; |
| | | padding: 0px 0px 0px 1px; |
| | | border-width: 0px 0px 1px 0px; |
| | | vertical-align: middle; |
| | | word-break: break-all; |
| | | } |
| | | |
| | | body .pbBody table.list tr.dataRow td.dataCellBorder { |
| | | /* いらない、使っていない */ |
| | | padding:0px 0px 0px 1px; border-width: 0px 0px 1px 0px; vertical-align: middle; word-break:break-all; |
| | | padding: 0px 0px 0px 1px; |
| | | border-width: 0px 0px 1px 0px; |
| | | vertical-align: middle; |
| | | word-break: break-all; |
| | | } |
| | | |
| | | body .pbBody table.list tr.dataRow td.dataCellBorder1 { |
| | | padding:0px 0px 0px 1px; |
| | | border-width: 0px 0px 1px 1px; vertical-align: middle; word-break:break-all; |
| | | border-width: 0px 0px 1px 1px; |
| | | vertical-align: middle; |
| | | word-break: break-all; |
| | | } |
| | | |
| | | @-moz-document url-prefix() { |
| | | body .pbBody table.list tr.dataRow td.dataCellBorder1 {padding:0px 0px 0px 0px; border-width: 0px 0px 1px 1px; vertical-align: middle; word-break:break-all;} |
| | | body .pbBody table.list tr.dataRow td.dataCellBorder1 { |
| | | padding: 0px 0px 0px 0px; |
| | | border-width: 0px 0px 1px 1px; |
| | | vertical-align: middle; |
| | | word-break: break-all; |
| | | } |
| | | } |
| | | |
| | | table.list td {width:100px; } |
| | | |
| | | table.list td select {width:95%;} |
| | | |
| | | table.list td input {width:95%;} |
| | | |
| | | table.list td { |
| | | width: 100px; |
| | | } |
| | | table.list td select { |
| | | width: 95%; |
| | | } |
| | | table.list td input { |
| | | width: 95%; |
| | | } |
| | | table.list td textarea { |
| | | height:50px; |
| | | width:90%; |
| | | } |
| | | |
| | | table.list .col_OCSM_Opportunity_No__c {width:120px;} |
| | | table.list .col_Strategic_department_Class_Name__c{width:80px;} |
| | | table.list .col_Change_To_Opportunity_T__c {width:155px;} |
| | | table.list .col_Department_Cateogy__c {width: 90px;} |
| | | table.list .col_Department_Name_Text__c {width: 80px;} |
| | | table.list .col_Hospital_City_Master__c {width: 70px;} |
| | | table.list .col_Agency_Hospital__c {width: 146px;} |
| | | table.list .col_OCSM_Opportunity_No__c { |
| | | width: 120px; |
| | | } |
| | | table.list .col_Strategic_department_Class_Name__c { |
| | | width: 80px; |
| | | } |
| | | table.list .col_Change_To_Opportunity_T__c { |
| | | width: 155px; |
| | | } |
| | | table.list .col_Department_Cateogy__c { |
| | | width: 90px; |
| | | } |
| | | table.list .col_Department_Name_Text__c { |
| | | width: 80px; |
| | | } |
| | | table.list .col_Hospital_City_Master__c { |
| | | width: 70px; |
| | | } |
| | | table.list .col_Agency_Hospital__c { |
| | | width: 146px; |
| | | } |
| | | /*table.list .col_Oly_Forecasted_Date__c {width: 125px;}*/ |
| | | table.list .col_Oly_Forecast_this_month__c {width: 135px;} |
| | | table.list .col_Oly_NM_Forecast__c {width: 135px;} |
| | | table.list .col_Oly_Forecast_last_month__c {width: 135px;} |
| | | table.list .col_Oly_Inquiry_Stage__c {width: 95px;} |
| | | table.list .col_Oly_Authorized_DB_No__c {width: 95px;} |
| | | table.list .col_Oly_Inquiry_Status2__c {width: 95px;} |
| | | table.list .col_Oly_Inquiry_Status1__c {width: 50px;} |
| | | table.list .col_Name {width:139px;} /*客户名*/ |
| | | table.list .col_Salesdepartment_HP__c {width:95px;} /*销售本部(医院)*/ |
| | | table.list .col_State_Master__c{width:80px;} /*省*/ |
| | | table.list .col_HP_146POCM_Category_From_Dept__c {width:100px;} /*OCM分类(公式)*/ |
| | | table.list .col_Salesdepartment_DeptClass__c{width:120px;} /*销售本部(科室分类)*/ |
| | | table.list .col_OCM_man_province_HP__c{width:90px;} /*OCM管理省*/ |
| | | table.list .col_City_Master__c{width:80px;} /*市*/ |
| | | table.list .col_Grade__c {width:70px;} /*政府等级*/ |
| | | table.list .col_Attribute_Type__c{width:90px;} /*医院所属性质*/ |
| | | table.list .col_Speciality_Type__c{width:90px;} /*医院专业区分*/ |
| | | table.list .col_Service_customer__c{width:120px;} /*可签约服务合同客户*/ |
| | | table.list .col_BF_owner__c{width:100px;} /*呼吸科主担当*/ |
| | | table.list .col_ENT_owner_ID__c{width:100px;} /*耳鼻喉科主担当*/ |
| | | table.list .col_GI_Main__c{width:100px;} /*消化科主担当*/ |
| | | table.list .col_URO_owner_ID__c{width:100px;} /*泌尿科主担当*/ |
| | | table.list .col_SP_Main__c{width:100px;} /*普外科主担当*/ |
| | | table.list .col_GYN_owner__c{width:100px;} /*妇科主担当*/ |
| | | table.list .col_Hospital_name_link__c{width:100px;} /*医院名(链接)*/ |
| | | table.list .col_Segment__c{width:90px;} /*OCM科室等级*/ |
| | | table.list .col_Department_Budget_Sum_Price__c {width:128px;} /*科室预算总金额(元)*/ |
| | | table.list .col_Target_amount_CV290__c {width:118px;} /*目标数:CV-290*/ |
| | | table.list .col_OPD_CV290__c {width:118px;} /*OPD对象:CV-290*/ |
| | | table.list .col_Target_amount_EUME2__c {width:118px;} /*目标数:EU-ME2*/ |
| | | table.list .col_OPD_EUME2__c {width:118px;} /*OPD对象:EU-ME2*/ |
| | | table.list .col_Target_amount_CV170__c {width:118px;} /*目标数:CV-170*/ |
| | | table.list .col_OPD_CV170__c {width:118px;} /*OPD对象:CV-170*/ |
| | | table.list .col_Target_amount_OERAW__c {width:118px;} /*目标数:OER-AW*/ |
| | | table.list .col_OPD_OERAW__c {width:118px;} /*OPD对象:OER-AW*/ |
| | | table.list .col_Target_amount_GW__c {width:118px;} /*目标数:导丝(GW)*/ |
| | | table.list .col_OPD_GW__c {width:118px;} /*OPD对象:导丝(GW)*/ |
| | | table.list .col_Target_amount_OTVS400__c {width:118px;} /*目标数:OTV-S400*/ |
| | | table.list .col_OPD_OTVS400__c {width:118px;} /*OPD对象:OTV-S400*/ |
| | | table.list .col_Target_amount_CHS400XZ__c {width:118px;} /*目标数:CH-S400-XZ*/ |
| | | table.list .col_OPD_CHS400XZ__c {width:118px;} /*OPD对象:CH-S400-XZ*/ |
| | | table.list .col_Target_amount_3D__c {width:118px;} /*目标数:3D*/ |
| | | table.list .col_OPD_3D__c {width:118px;} /*OPD对象:3D*/ |
| | | table.list .col_Target_amount_OTVS190__c {width:118px;} /*目标数:OTV-S190*/ |
| | | table.list .col_OPD_OTVS190__c {width:118px;} /*OPD对象:OTV-S190*/ |
| | | table.list .col_Target_amount_CV190__c {width:118px;} /*目标数:CV-190*/ |
| | | table.list .col_OPD_CV190__c {width:118px;} /*OPD对象:CV-190*/ |
| | | table.list .col_Target_amount_UCES3__c {width:118px;} /*目标数:UCES-3*/ |
| | | table.list .col_OPD_UCES3__c {width:118px;} /*OPD对象:UCES-3*/ |
| | | table.list .col_Target_amount_USG400__c {width:118px;} /*目标数:USG-400*/ |
| | | table.list .col_OPD_USG400__c {width:118px;} /*OPD对象:USG-400*/ |
| | | table.list .col_Hospital_Name__c {width:139px;} /*医院名*/ |
| | | table.list .col_Department_Name__c {width:60px;} /*科室名称*/ |
| | | table.list .col_Province_formula__c {width:78px;} /*省(公式)*/ |
| | | table.list .col_X2_Largescale_Project__c {width:78px;} /****有无两年以内大项目采购*/ |
| | | table.list .col_Ideal_Image_Sales__c {width:148px;} /****拓展・开拓规划/营销方案(销售)*/ |
| | | table.list .col_Review_Sales__c {width:148px;} /****进展情况(销售)*/ |
| | | table.list .col_Submit_proposal_document__c {width:58px;} /*是否提交提案书*/ |
| | | table.list .col_OPP_Flag__c {width:58px;} |
| | | table.list .col_Sales_activity_plan__c {width:178px;} /*活动计划(销售)*/ |
| | | table.list .col_Oly_Forecast_this_month__c { |
| | | width: 135px; |
| | | } |
| | | table.list .col_Oly_NM_Forecast__c { |
| | | width: 135px; |
| | | } |
| | | table.list .col_Oly_Forecast_last_month__c { |
| | | width: 135px; |
| | | } |
| | | table.list .col_Oly_Inquiry_Stage__c { |
| | | width: 95px; |
| | | } |
| | | table.list .col_Oly_Authorized_DB_No__c { |
| | | width: 95px; |
| | | } |
| | | table.list .col_Oly_Inquiry_Status2__c { |
| | | width: 95px; |
| | | } |
| | | table.list .col_Oly_Inquiry_Status1__c { |
| | | width: 50px; |
| | | } |
| | | table.list .col_Name { |
| | | width: 139px; |
| | | } /*客户名*/ |
| | | table.list .col_Salesdepartment_HP__c { |
| | | width: 95px; |
| | | } /*销售本部(医院)*/ |
| | | table.list .col_State_Master__c { |
| | | width: 80px; |
| | | } /*省*/ |
| | | table.list .col_HP_146POCM_Category_From_Dept__c { |
| | | width: 100px; |
| | | } /*OCM分类(公式)*/ |
| | | table.list .col_Salesdepartment_DeptClass__c { |
| | | width: 120px; |
| | | } /*销售本部(科室分类)*/ |
| | | table.list .col_OCM_man_province_HP__c { |
| | | width: 90px; |
| | | } /*OCM管理省*/ |
| | | table.list .col_City_Master__c { |
| | | width: 80px; |
| | | } /*市*/ |
| | | table.list .col_Grade__c { |
| | | width: 70px; |
| | | } /*政府等级*/ |
| | | table.list .col_Attribute_Type__c { |
| | | width: 90px; |
| | | } /*医院所属性质*/ |
| | | table.list .col_Speciality_Type__c { |
| | | width: 90px; |
| | | } /*医院专业区分*/ |
| | | table.list .col_Service_customer__c { |
| | | width: 120px; |
| | | } /*可签约服务合同客户*/ |
| | | table.list .col_BF_owner__c { |
| | | width: 100px; |
| | | } /*呼吸科主担当*/ |
| | | table.list .col_ENT_owner_ID__c { |
| | | width: 100px; |
| | | } /*耳鼻喉科主担当*/ |
| | | table.list .col_GI_Main__c { |
| | | width: 100px; |
| | | } /*消化科主担当*/ |
| | | table.list .col_URO_owner_ID__c { |
| | | width: 100px; |
| | | } /*泌尿科主担当*/ |
| | | table.list .col_SP_Main__c { |
| | | width: 100px; |
| | | } /*普外科主担当*/ |
| | | table.list .col_GYN_owner__c { |
| | | width: 100px; |
| | | } /*妇科主担当*/ |
| | | table.list .col_Hospital_name_link__c { |
| | | width: 100px; |
| | | } /*医院名(链接)*/ |
| | | table.list .col_Segment__c { |
| | | width: 90px; |
| | | } /*OCM科室等级*/ |
| | | table.list .col_Department_Budget_Sum_Price__c { |
| | | width: 128px; |
| | | } /*科室预算总金额(元)*/ |
| | | table.list .col_Target_amount_CV290__c { |
| | | width: 118px; |
| | | } /*目标数:CV-290*/ |
| | | table.list .col_OPD_CV290__c { |
| | | width: 118px; |
| | | } /*OPD对象:CV-290*/ |
| | | table.list .col_Target_amount_EUME2__c { |
| | | width: 118px; |
| | | } /*目标数:EU-ME2*/ |
| | | table.list .col_OPD_EUME2__c { |
| | | width: 118px; |
| | | } /*OPD对象:EU-ME2*/ |
| | | table.list .col_Target_amount_CV170__c { |
| | | width: 118px; |
| | | } /*目标数:CV-170*/ |
| | | table.list .col_OPD_CV170__c { |
| | | width: 118px; |
| | | } /*OPD对象:CV-170*/ |
| | | table.list .col_Target_amount_OERAW__c { |
| | | width: 118px; |
| | | } /*目标数:OER-AW*/ |
| | | table.list .col_OPD_OERAW__c { |
| | | width: 118px; |
| | | } /*OPD对象:OER-AW*/ |
| | | table.list .col_Target_amount_GW__c { |
| | | width: 118px; |
| | | } /*目标数:导丝(GW)*/ |
| | | table.list .col_OPD_GW__c { |
| | | width: 118px; |
| | | } /*OPD对象:导丝(GW)*/ |
| | | table.list .col_Target_amount_OTVS400__c { |
| | | width: 118px; |
| | | } /*目标数:OTV-S400*/ |
| | | table.list .col_OPD_OTVS400__c { |
| | | width: 118px; |
| | | } /*OPD对象:OTV-S400*/ |
| | | table.list .col_Target_amount_CHS400XZ__c { |
| | | width: 118px; |
| | | } /*目标数:CH-S400-XZ*/ |
| | | table.list .col_OPD_CHS400XZ__c { |
| | | width: 118px; |
| | | } /*OPD对象:CH-S400-XZ*/ |
| | | table.list .col_Target_amount_3D__c { |
| | | width: 118px; |
| | | } /*目标数:3D*/ |
| | | table.list .col_OPD_3D__c { |
| | | width: 118px; |
| | | } /*OPD对象:3D*/ |
| | | table.list .col_Target_amount_OTVS190__c { |
| | | width: 118px; |
| | | } /*目标数:OTV-S190*/ |
| | | table.list .col_OPD_OTVS190__c { |
| | | width: 118px; |
| | | } /*OPD对象:OTV-S190*/ |
| | | table.list .col_Target_amount_CV190__c { |
| | | width: 118px; |
| | | } /*目标数:CV-190*/ |
| | | table.list .col_OPD_CV190__c { |
| | | width: 118px; |
| | | } /*OPD对象:CV-190*/ |
| | | table.list .col_Target_amount_UCES3__c { |
| | | width: 118px; |
| | | } /*目标数:UCES-3*/ |
| | | table.list .col_OPD_UCES3__c { |
| | | width: 118px; |
| | | } /*OPD对象:UCES-3*/ |
| | | table.list .col_Target_amount_USG400__c { |
| | | width: 118px; |
| | | } /*目标数:USG-400*/ |
| | | table.list .col_OPD_USG400__c { |
| | | width: 118px; |
| | | } /*OPD对象:USG-400*/ |
| | | |
| | | table.list .col_Hospital_Name__c { |
| | | width: 139px; |
| | | } /*医院名*/ |
| | | table.list .col_Department_Name__c { |
| | | width: 60px; |
| | | } /*科室名称*/ |
| | | |
| | | table.list .col_Province_formula__c { |
| | | width: 78px; |
| | | } /*省(公式)*/ |
| | | table.list .col_X2_Largescale_Project__c { |
| | | width: 78px; |
| | | } /****有无两年以内大项目采购*/ |
| | | table.list .col_Ideal_Image_Sales__c { |
| | | width: 148px; |
| | | } /****拓展・开拓规划/营销方案(销售)*/ |
| | | table.list .col_Review_Sales__c { |
| | | width: 148px; |
| | | } /****进展情况(销售)*/ |
| | | table.list .col_Submit_proposal_document__c { |
| | | width: 58px; |
| | | } /*是否提交提案书*/ |
| | | table.list .col_OPP_Flag__c { |
| | | width: 58px; |
| | | } |
| | | table.list .col_Sales_activity_plan__c { |
| | | width: 178px; |
| | | } /*活动计划(销售)*/ |
| | | /*table.list .col_Link1 {width:58px;} |
| | | table.list .col_Link2 {width:58px;} |
| | | table.list .col_Link3 {width:58px;} |
| | |
| | | table.list .col_Link6 {width:58px;} |
| | | table.list .col_Link7 {width:58px;} |
| | | table.list .col_Link8 {width:58px;}*/ |
| | | |
| | | body .pbBody table.list tr.headerRow td.colViewing { |
| | | /* デフォルト値、最小化アイコンを表示 */ |
| | | background-image:url('{!URLFOR($Resource.IconResizeMinus_5)}') ; |
| | | background-image: url("{!URLFOR($Resource.IconResizeMinus_5)}"); |
| | | background-repeat:no-repeat; |
| | | } |
| | | body .pbBody table.list tr.headerRow td.colUnHideIcon { |
| | | /* 最大化アイコンを表示 */ |
| | | background-image:url('{!URLFOR($Resource.IconResizePlus_5)}'); |
| | | background-image: url("{!URLFOR($Resource.IconResizePlus_5)}"); |
| | | background-repeat:no-repeat; |
| | | } |
| | | body .pbBody table.list tr.headerRow td.col_Scroll {width:0px; padding:0px; border-width:0px;} |
| | | body .pbBody table.list tr.dataRow td.col_Scroll {width:0px; padding:0px; border-width:0px;} |
| | | body .pbBody table.list tr.headerRow td.col_Scroll { |
| | | width: 0px; |
| | | padding: 0px; |
| | | border-width: 0px; |
| | | } |
| | | body .pbBody table.list tr.dataRow td.col_Scroll { |
| | | width: 0px; |
| | | padding: 0px; |
| | | border-width: 0px; |
| | | } |
| | | /*.zxk{ |
| | | margin-bottom: 3px; |
| | | }*/ |
| | | .buttonStyle{ |
| | | font-size: 14px !important; |
| | | font-family: 'sans-serif' !important; |
| | | font-weight:500 !important; |
| | | width: 70px !important; |
| | | height: 32px !important; |
| | | border-radius: 4px !important; |
| | | opacity: 1 !important; |
| | | background:#090F84 !important; |
| | | color:#FFFFFF !important; |
| | | |
| | | } |
| | | |
| | | |
| | | </style> |
| | | <script type="text/javascript"> |
| | | var heightAjustment = 120; |
| | | var widthAjustment = 30; |
| | | function setChangeFlgRight(cnt) { |
| | | document.getElementById('allPage:allForm:oppBlock:oppTable:' + cnt + ':changeFlgRt').value = 1; |
| | | |
| | | document.getElementById( |
| | | "allPage:allForm:oppBlock:oppTable:" + cnt + ":changeFlgRt" |
| | | ).value = 1; |
| | | } |
| | | |
| | | </script> |
| | | </head> |
| | | <apex:slds /> |
| | | <div id="spinner" class="slds-spinner_container" style="display:none;"> |
| | | <div role="status" class="slds-spinner slds-spinner_medium slds-spinner_brand"> |
| | | <span class="slds-assistive-text">Loading</span> |
| | | <div class="slds-spinner__dot-a"></div> |
| | | <div class="slds-spinner__dot-b"></div> |
| | | </div> |
| | | </div> |
| | | <apex:form id="allForm"> |
| | | <apex:actionFunction name="saveAndSearch" action="{!save}" rerender="allPanel" oncomplete="closeSpinner();expandAll();"> |
| | | <apex:actionFunction |
| | | name="saveAndSearch" |
| | | action="{!save}" |
| | | rerender="allPanel" |
| | | oncomplete="unblockUI();expandAll();" |
| | | > |
| | | <apex:param name="firstParam" assignTo="{!saveType}" value="" /> |
| | | </apex:actionFunction> |
| | | <apex:actionFunction name="saveAndSort" action="{!save}" rerender="allPanel" oncomplete="closeSpinner();expandAll();"> |
| | | <apex:actionFunction |
| | | name="saveAndSort" |
| | | action="{!save}" |
| | | rerender="allPanel" |
| | | oncomplete="unblockUI();expandAll();" |
| | | > |
| | | <apex:param name="firstParam" assignTo="{!saveType}" value="" /> |
| | | <apex:param name="secondParam" assignTo="{!sortKey}" value="" /> |
| | | </apex:actionFunction> |
| | | <apex:actionFunction name="searchOpp" action="{!chick}" rerender="allPanel" oncomplete="closeSpinner();expandAll();"/> |
| | | <apex:actionFunction name="sortTable" action="{!sortTable}" rerender="allPanel" oncomplete="closeSpinner();expandAll();"> |
| | | <apex:actionFunction |
| | | name="searchOpp" |
| | | action="{!chick}" |
| | | rerender="allPanel" |
| | | oncomplete="unblockUI();expandAll();" |
| | | /> |
| | | <apex:actionFunction |
| | | name="sortTable" |
| | | action="{!sortTable}" |
| | | rerender="allPanel" |
| | | oncomplete="unblockUI();expandAll();" |
| | | > |
| | | <apex:param name="firstParam" assignTo="{!sortKey}" value="" /> |
| | | </apex:actionFunction> |
| | | <apex:outputPanel id="allPanel"> |
| | | <div id="zxk" style="margin-bottom: -15px;"> |
| | | <div id="zxk" style="margin-bottom: -15px"> |
| | | <apex:pageBlock id="searchBlock" mode="maindetail"> |
| | | <table style="border-bottom-width: 0px; font-size:14px;color:#696969;"> |
| | | <!-- tabStyle="Report"红色 mode="maindetail" 消失 mode="edit" 变大 --> |
| | | <!-- <apex:pageMessages ></apex:pageMessages> --> |
| | | <!-- <table style="border-bottom-width: 0px; font-size:12px;"> |
| | | <tr> |
| | | <td width="283px"> |
| | | <div style="color:#696969;"> |
| | | 经销商医院 |
| | | <apex:inputText styleClass="slds-input" value="{!accSearch}" style="width:170px"/> |
| | | </div> |
| | | <td width="150px"> |
| | | <apex:commandButton action="{!save}" value="保存" rerender="allPanel" onclick="blockme();" oncomplete="unblockUI();expandAll();" style="height:30px;width:50px;"/> |
| | | <apex:commandButton value="检索" onclick="searchOppJs_Account();return false;" style="height:30px;width:70px;"/> |
| | | </td> |
| | | <td width="1000px"> |
| | | <apex:pageMessages /> |
| | | </td> |
| | | </tr> |
| | | </table> --> |
| | | <table style="border-bottom-width: 0px; font-size: 12px"> |
| | | <tr> |
| | | <!-- <td width="150px">分类 <apex:selectList value="{!accType}" size="1" style="width:80px" id="accType"><apex:selectOptions value="{!accTypeOpts}" id="accTypeOptsId"/></apex:selectList></td> --> |
| | | <td width="250px"> |
| | | <div style="color:#696969;"> |
| | | 销售担当 |
| | | <apex:inputText styleClass="slds-input" value="{!aooSearch}" style="width:150px"/> |
| | | </div> |
| | | 经销商医院 <apex:inputText |
| | | value="{!accSearch}" |
| | | style="width: 170px" |
| | | /> |
| | | </td> |
| | | <td></td> |
| | | <td width="250px"> |
| | | 销售担当 <apex:inputText |
| | | value="{!aooSearch}" |
| | | style="width: 150px" |
| | | /> |
| | | </td> |
| | | <td width="230px"> |
| | | <div style="color:#696969;"> |
| | | 显示 |
| | | <apex:selectList styleClass="slds-input slds-combobox__input" style="width:100px;" value="{!limits}" size="1" onchange="searchOppJs_Account();return false;"> |
| | | <apex:selectOptions value="{!limitOpts}"/> |
| | | </apex:selectList> |
| | | 条数据 |
| | | </div> |
| | | 显示 |
| | | <apex:selectList |
| | | value="{!limits}" |
| | | size="1" |
| | | onchange="searchOppJs_Account();return false;" |
| | | > |
| | | <apex:selectOptions value="{!limitOpts}" /></apex:selectList |
| | | > 条数据 |
| | | </td> |
| | | <td><a href="#" onclick="expandAll();return false;" style="text-decoration: underline;color:#696969;">全部展开</a></td> |
| | | <!-- <td width="10px"></td> --> |
| | | <td width="70px"> |
| | | <a |
| | | href="#" |
| | | onclick="expandAll();return false;" |
| | | style="text-decoration: underline" |
| | | >全部展开</a |
| | | > |
| | | </td> |
| | | <!-- text-decoration: underline; --> |
| | | </tr> |
| | | </table> |
| | | <p style="height:10px;"></p> |
| | | <table style="border-bottom-width: 0px; font-size:12px;font-size:14px;color:#696969;"> |
| | | <table style="border-bottom-width: 0px; font-size: 12px"> |
| | | <tr> |
| | | <td width="220px"> |
| | | <div style="color:#696969;"> |
| | | <font>数 据 字 段</font> |
| | | <apex:selectList styleClass="slds-input slds-combobox__input" value="{!numtext1}" size="1" style="width:110px"> |
| | | <apex:selectOptions value="{!textOpts}"/> |
| | | </apex:selectList> |
| | | </div> |
| | | <td width="200px"> |
| | | <font>数 据 字 段 </font> |
| | | <apex:selectList |
| | | value="{!numtext1}" |
| | | size="1" |
| | | style="width: 110px" |
| | | ><apex:selectOptions value="{!textOpts}" |
| | | /></apex:selectList> |
| | | </td> |
| | | <td width="130px"> |
| | | <apex:selectList styleClass="slds-input slds-combobox__input" value="{!numtext2}" size="1" style="width:110px"> |
| | | <apex:selectOptions value="{!equalOpts}"/> |
| | | </apex:selectList> |
| | | <apex:selectList |
| | | value="{!numtext2}" |
| | | size="1" |
| | | style="width: 110px" |
| | | ><apex:selectOptions value="{!equalOpts}" |
| | | /></apex:selectList> |
| | | </td> |
| | | <td width="183px"> |
| | | <apex:inputText styleClass="slds-input" style="width:150px" value="{!numtext}"/> |
| | | <td width="200px"> |
| | | <apex:inputText style="width: 150px" value="{!numtext}" /> |
| | | </td> |
| | | <td width="188px"> |
| | | <!-- slds-button slds-button_brand --> |
| | | <apex:commandButton styleClass="buttonStyle" value="检索" onclick="searchOppJs_Account();return false;" style="height:30px;width:70px;"/> |
| | | <apex:commandButton styleClass="buttonStyle" action="{!save}" value="保存" rerender="allPanel" onclick="showSpinner();" oncomplete="closeSpinner();expandAll();" style="height:30px;width:70px;"/> |
| | | <td width="150px"> |
| | | <apex:commandButton |
| | | value="检索" |
| | | onclick="searchOppJs_Account();return false;" |
| | | style="height: 30px; width: 50px" |
| | | /> |
| | | <apex:commandButton |
| | | action="{!save}" |
| | | value="保存" |
| | | rerender="allPanel" |
| | | onclick="blockme();" |
| | | oncomplete="unblockUI();expandAll();" |
| | | style="height: 30px; width: 50px" |
| | | /> |
| | | </td> |
| | | <td> |
| | | <!-- <apex:pageMessages /> --> |
| | | <!-- add by Link 2023-6-2 --> |
| | | <apex:outputPanel rendered="{! remindMsg != '' && remindMsg != null}"> |
| | | <div style="border: 1px solid #D4D4D4;height:32px;border-radius:5px;color:#ff6a00;font-size:18px;"> |
| | | <span class="slds-icon_container slds-icon-custom-custom53 slds-icon-text-default" > |
| | | <svg aria-hidden="true" class="slds-icon"> |
| | | <use xmlns:xlink="http://www.w3.org/1999/xlink" |
| | | xlink:href="/apexpages/slds/latest/assets/icons/custom-sprite/svg/symbols.svg#custom53"> |
| | | </use> |
| | | </svg> |
| | | <span class="slds-assistive-text">Custom 53</span> |
| | | </span> |
| | | <strong style="padding-top: 2px;"> {!remindMsg}</strong> |
| | | </div> |
| | | </apex:outputPanel> |
| | | <td width="500px"> |
| | | <apex:pageMessages /> |
| | | </td> |
| | | </tr> |
| | | <!-- <tr> |
| | | <td width="110px"> |
| | | <font> 日 期 </font> |
| | | <apex:selectList value="{!timetext1}" size="1" style="width:110px"><apex:selectOptions value="{!timeOpts}"/></apex:selectList> |
| | | </td> |
| | | <td> |
| | | 从<apex:inputField style="width:150px" value="{!tmpAO.MaxActivityDate__c}"/> --> |
| | | <!-- <apex:selectList value="{!timetext2}" size="1" style="width:110px"><apex:selectOptions value="{!timeequalOpts}"/></apex:selectList> --> |
| | | <!-- </td> |
| | | <td> |
| | | 到<apex:inputField style="width:150px" value="{!tmpBO.MaxActivityDate__c}"/> |
| | | </td> |
| | | </tr> --> |
| | | </table> |
| | | </apex:pageBlock> |
| | | </div> |
| | | <!-- <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;"> --> |
| | | <apex:pageBlock id="oppBlock" mode="maindetail"> |
| | | <apex:pageBlock id="oppBlock"> |
| | | <!-- <apex:pageblocksection columns="1" id="oppSection"> --> |
| | | <apex:outputPanel > |
| | | <apex:inputHidden id="oppCount" value="{!oppCount}"/> |
| | | |
| | | <div id="out_Div_L"> |
| | | <table class="list" style="border-bottom-width: 0px; width:1100px; font-size:14px !important; border-spacing:0;" border="" id="tableHeader"> |
| | | <table |
| | | class="list" |
| | | style=" |
| | | border-bottom-width: 0px; |
| | | width: 1100px; |
| | | font-size: 11px; |
| | | border-spacing: 0; |
| | | " |
| | | border="" |
| | | id="tableHeader" |
| | | > |
| | | <tr class="dataRow" height="1px"> |
| | | <apex:variable value="{!0}" var="cnt" /> |
| | | <apex:repeat value="{!titleRight}" var="t"> |
| | |
| | | <apex:variable value="{!0}" var="cnt" /> |
| | | <apex:repeat value="{!titleRight}" var="t"> |
| | | <td class="col_{!columnRightCss[cnt]}"> |
| | | <a href="#" onclick="sortTableJs_Account1('{!cnt + titleLeft.size}');return false;" style="text-decoration: underline;color:black;font-size:14px !important;font-weight: bold;"><apex:outputText value="{!t}"/></a>{!sortOrder[cnt + titleLeft.size]} |
| | | <a |
| | | href="#" |
| | | onclick="sortTableJs_Account1('{!cnt + titleLeft.size}');return false;" |
| | | style="text-decoration: underline" |
| | | ><apex:outputText value="{!t}" /></a |
| | | >{!sortOrder[cnt + titleLeft.size]} |
| | | </td> |
| | | <apex:variable value="{!cnt + 1}" var="cnt" /> |
| | | </apex:repeat> |
| | |
| | | </table> |
| | | </div> |
| | | <div id="out_Div"> |
| | | <table class="list" style="border-bottom-width: 0px; width:2000px; font-size:14px !important; border-spacing:0;" border="" id="tableHeader_L"> |
| | | <table |
| | | class="list" |
| | | style=" |
| | | border-bottom-width: 0px; |
| | | width: 2000px; |
| | | font-size: 11px; |
| | | border-spacing: 0; |
| | | " |
| | | border="" |
| | | id="tableHeader_L" |
| | | > |
| | | <tr class="dataRow" height="1px"> |
| | | <apex:variable value="{!0}" var="cnt" /> |
| | | <apex:repeat value="{!titleLeft}" var="t"> |
| | |
| | | <apex:variable value="{!0}" var="cnt" /> |
| | | <apex:repeat value="{!titleLeft}" var="t"> |
| | | <td class="col_{!columnLeftCss[cnt]}"> |
| | | <a href="#" onclick="sortTableJs_Account1('{!cnt}');return false;" style="text-decoration: underline;color:black;font-size:14px !important;font-weight: bold;"><apex:outputText value="{!t}"/></a>{!sortOrder[cnt]} |
| | | <a |
| | | href="#" |
| | | onclick="sortTableJs_Account1('{!cnt}');return false;" |
| | | style="text-decoration: underline" |
| | | ><apex:outputText value="{!t}" /></a |
| | | >{!sortOrder[cnt]} |
| | | </td> |
| | | <apex:variable value="{!cnt + 1}" var="cnt" /> |
| | | </apex:repeat> |
| | | <!-- <td id="cell_Scroll" class="col_Scroll"></td> --> |
| | | </tr> |
| | | </table> |
| | | |
| | | </div> <!-- out_Div --> |
| | | <div style="clear:both;height:0px;"></div> |
| | | </div> |
| | | <!-- out_Div --> |
| | | <div style="clear: both; height: 0px"></div> |
| | | <div id="in_Div_L"> |
| | | <table class="list" style="border-bottom-width: 0px;width:1100px; font-size:13px; border-spacing:0;" border="" id="tableData"> |
| | | <table |
| | | class="list" |
| | | style=" |
| | | border-bottom-width: 0px; |
| | | width: 1100px; |
| | | font-size: 11px; |
| | | border-spacing: 0; |
| | | " |
| | | border="" |
| | | id="tableData" |
| | | > |
| | | <apex:variable value="{!1}" var="cnt" /> |
| | | <apex:repeat value="{!oppRecords}" var="or" id="oppTable"> |
| | | <tr class="dataRow {!IF(MOD(cnt, 2)==0, 'odd', 'even')} {!IF(cnt==1, 'first', '')}" style="height:35px;" onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}"> |
| | | <tr |
| | | class="dataRow {!IF(MOD(cnt, 2)==0, 'odd', 'even')} {!IF(cnt==1, 'first', '')}" |
| | | onmouseover="if (window.hiOn){hiOn(this);} " |
| | | onmouseout="if (window.hiOff){hiOff(this);} " |
| | | onblur="if (window.hiOff){hiOff(this);}" |
| | | onfocus="if (window.hiOn){hiOn(this);}" |
| | | > |
| | | <apex:variable value="{!0}" var="cnt_3" /> |
| | | <apex:repeat value="{!columnsRightApi}" var="c"> |
| | | <td class="dataCellBorder1 col_{!columnRightCss[cnt_3]} {!cnt}_col_{!columnRightCss[cnt_3]}"> |
| | | |
| | | <td |
| | | class="dataCellBorder1 col_{!columnRightCss[cnt_3]} {!cnt}_col_{!columnRightCss[cnt_3]}" |
| | | > |
| | | <!-- vivek start --> |
| | | <!-- <apex:outputLink rendered="{!c[0]=='Name'}" value="/{!or.opp.Id}" target="LINK_{!or.opp.Id}"><apex:outputField rendered="{!c[0]=='Name'}" value="{!or.opp[c[0]]}" /></apex:outputLink> --> |
| | | <!-- vivek end --> |
| | | <!-- <apex:outputField id="q1111111111" rendered="{!(c.size==1 && columnRightRW[c[0]]=='r' && or.opp.Id <> null && c[0] <> 'Name' && (c[0] <> 'Opp_Changed_Field__c' ||(c[0] == 'Opp_Changed_Field__c' && |
| | | or.opp.Opp_Changed_Field__c != '询价阶段发生了变化' &&or.opp.Opp_Changed_Field__c != '预测签约日发生了变化' &&or.opp.Opp_Changed_Field__c != '医院合同金额发生了变化' && or.opp.Opp_Changed_Field__c != '订货金额发生了变化')))}" value="{!or.opp[c[0]]}" /> && or.opp.Oly_Inquiry_Status1__c <> null AgcOpp --> |
| | | <apex:outputField rendered="{!c[0] == 'Change_To_Opportunity_T__c' }" value="{!or.opp[c[0]]}" /> |
| | | <apex:outputField |
| | | rendered="{!c[0] == 'Change_To_Opportunity_T__c' }" |
| | | value="{!or.opp[c[0]]}" |
| | | /> |
| | | |
| | | <apex:outputField rendered="{!columnRightRW[c[0]]=='r' && c[0] <> 'Change_To_Opportunity_T__c' && c[0] <> 'Strategic_department_Class_Name__c' }" value="{!or.opp[c[0]]}" /> |
| | | <apex:outputField |
| | | rendered="{!columnRightRW[c[0]]=='r' && c[0] <> 'Change_To_Opportunity_T__c' && c[0] <> 'Strategic_department_Class_Name__c' }" |
| | | value="{!or.opp[c[0]]}" |
| | | /> |
| | | <!-- <apex:outputField id="q1111111111" rendered="{!( columnRightRW[c[0]]=='r' && c[0] <> 'Name' && (c[0] <> 'StageName__c' ||(c[0] == 'StageName__c' && |
| | | or.opp.Oly_Inquiry_Stage__c != '询价阶段发生了变化' &&or.opp.Oly_Inquiry_Stage__c != '预测签约日发生了变化' &&or.opp.Oly_Inquiry_Stage__c != '医院合同金额发生了变化' && or.opp.Oly_Inquiry_Stage__c != '订货金额发生了变化')))}" value="{!or.opp[c[0]]}" /> --> |
| | | <!-- <div style ="color:red"> --> |
| | |
| | | <apex:inputField value="{!or.Opp[c[0]]}" onchange="setChangeFlg('{!or.lineNo}')"/> |
| | | </div> |
| | | </apex:outputPanel> --> |
| | | <apex:outputField rendered="{!c[0] == 'Strategic_department_Class_Name__c'}" value="{!or.opp[c[0]]}" /> |
| | | <apex:outputField |
| | | rendered="{!c[0] == 'Strategic_department_Class_Name__c'}" |
| | | value="{!or.opp[c[0]]}" |
| | | /> |
| | | |
| | | <apex:inputField styleClass="slds-form-element" rendered="{!( columnRightRW[c[0]]=='w' && c[0] <> 'Strategic_department_Class_Name__c' && c[0] <> 'Change_To_Opportunity_T__c' && c[0] <> 'Name')}" value="{!or.opp[c[0]]}" onchange="setChangeFlgRight('{!or.lineNo}')"/> |
| | | <apex:outputPanel rendered="{!( columnRightRW[c[0]]=='wm' && c[0] <> 'Change_To_Opportunity_T__c' && c[0] <> 'Name' )}" layout="none"> |
| | | <apex:inputField |
| | | rendered="{!( columnRightRW[c[0]]=='w' && c[0] <> 'Strategic_department_Class_Name__c' && c[0] <> 'Change_To_Opportunity_T__c' && c[0] <> 'Name')}" |
| | | value="{!or.opp[c[0]]}" |
| | | onchange="setChangeFlgRight('{!or.lineNo}')" |
| | | /> |
| | | <apex:outputPanel |
| | | rendered="{!( columnRightRW[c[0]]=='wm' && c[0] <> 'Change_To_Opportunity_T__c' && c[0] <> 'Name' )}" |
| | | layout="none" |
| | | > |
| | | <div class="requiredInput_r"> |
| | | <div class="requiredBlock_r"></div> |
| | | <apex:inputField styleClass="slds-form-element" value="{!or.Opp[c[0]]}" onchange="setChangeFlg('{!or.lineNo}')"/> |
| | | <apex:inputField |
| | | value="{!or.Opp[c[0]]}" |
| | | onchange="setChangeFlg('{!or.lineNo}')" |
| | | /> |
| | | </div> |
| | | </apex:outputPanel> |
| | | <apex:variable value="{!cnt_3 + 1}" var="cnt_3" /> |
| | |
| | | </apex:repeat> |
| | | <td id="cell_Scroll" class="col_Scroll"> |
| | | <apex:inputHidden value="{!or.changeFlg}" id="changeFlg"/> |
| | | <apex:inputHidden value="{!or.changeFlgRt}" id="changeFlgRt"/> |
| | | <apex:inputHidden |
| | | value="{!or.changeFlgRt}" |
| | | id="changeFlgRt" |
| | | /> |
| | | <script type="text/javascript"> |
| | | if ("{!or.canEdit}" == "false") { |
| | | var right = j$("#tableData").find("tr").eq({!cnt-1}); |
| | |
| | | </table> |
| | | </div> |
| | | <div id="in_Div"> |
| | | <table class="list" style="border-bottom-width: 0px;width:2000px; font-size:13px; border-spacing:0;" border="" id="tableData_L"> |
| | | <table |
| | | class="list" |
| | | style=" |
| | | border-bottom-width: 0px; |
| | | width: 2000px; |
| | | font-size: 11px; |
| | | border-spacing: 0; |
| | | " |
| | | border="" |
| | | id="tableData_L" |
| | | > |
| | | <apex:variable value="{!1}" var="cnt_2" /> |
| | | <apex:repeat value="{!oppRecords}" var="or" id="oppTable_L"> |
| | | <tr class="dataRow {!IF(MOD(cnt, 2)==0, 'odd', 'even')} {!IF(cnt==1, 'first', '')}" style="height:35px;" onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}"> |
| | | <tr |
| | | class="dataRow {!IF(MOD(cnt, 2)==0, 'odd', 'even')} {!IF(cnt==1, 'first', '')}" |
| | | onmouseover="if (window.hiOn){hiOn(this);} " |
| | | onmouseout="if (window.hiOff){hiOff(this);} " |
| | | onblur="if (window.hiOff){hiOff(this);}" |
| | | onfocus="if (window.hiOn){hiOn(this);}" |
| | | > |
| | | <apex:variable value="{!0}" var="cnt_2" /> |
| | | <apex:repeat value="{!columnsLeftApi}" var="c"> |
| | | <td class="dataCellBorder1 col_{!columnLeftCss[cnt_2]}"> |
| | | <!-- vivek start --> |
| | | |
| | | <apex:outputLink target="_blank" rendered="{!c[0]=='Name'}" value="/{!or.AgcOpp.Id}" > |
| | | <apex:outputField rendered="{!c[0]=='Name'}" value="{!or.AgcOpp[c[0]]}" /> |
| | | <apex:outputLink |
| | | target="_blank" |
| | | rendered="{!c[0]=='Name'}" |
| | | value="/{!or.AgcOpp.Id}" |
| | | > |
| | | <apex:outputField |
| | | rendered="{!c[0]=='Name'}" |
| | | value="{!or.AgcOpp[c[0]]}" |
| | | /> |
| | | </apex:outputLink> |
| | | |
| | | <apex:outputPanel rendered="{!or.ifLock}"> |
| | | <apex:outputField rendered="{!c[0]!='Name'}" value="{!or.AgcOpp[c[0]]}"> |
| | | <apex:outputField |
| | | rendered="{!c[0]!='Name'}" |
| | | value="{!or.AgcOpp[c[0]]}" |
| | | > |
| | | </apex:outputField> |
| | | </apex:outputPanel> |
| | | <!-- 销售担当 --> |
| | |
| | | <!-- <apex:outputText rendered="{!c[0]=='Agency_PersonName__c'}" value="{!or.AgcOpp.Agency_PersonName__c }" /> --> |
| | | <!-- </apex:outputLink> --> |
| | | <!-- 经销商 --> |
| | | <apex:outputLink target="_blank" rendered="{!c[0]=='Agency__c'}" value="/{!or.AgcOpp[c[0]]}" > |
| | | <apex:outputText value="{!or.AgcOpp.Agency__r.Name }" /> |
| | | <apex:outputLink |
| | | target="_blank" |
| | | rendered="{!c[0]=='Agency__c'}" |
| | | value="/{!or.AgcOpp[c[0]]}" |
| | | > |
| | | <apex:outputText |
| | | value="{!or.AgcOpp.Agency__r.Name }" |
| | | /> |
| | | </apex:outputLink> |
| | | <!-- OCSM询价 --> |
| | | <!-- <apex:outputLink target="_blank" rendered="{!c[0]=='Change_To_Opportunity__c'}" value="/{!or.AgcOpp[c[0]]}" > |
| | |
| | | </apex:outputLink> --> |
| | | <!-- 必填字段 --> |
| | | <!-- <apex:outputField rendered="{!(c[0]<>'Name' && c[0]<>'Agency_Hospital__c' && c[0]<>'Product_Category1__c' && c[0]<>'Product_Category2__c' && c[0]<>'Product_Category3__c' && c[0]<>'Agency_Person__c' && c[0]<>'Agency__c' && c[0]<>'Change_To_Opportunity__c' && columnLeftRW[c[0]]=='wm')}" value="{!or.AgcOpp[c[0]] }"/> --> |
| | | <apex:inputField styleClass="slds-form-element" rendered="{!(c[0]<>'Name' && c[0]<>'Product_Category1__c' && c[0]<>'Product_Category2__c' && c[0]<>'Product_Category3__c' && c[0]<>'Agency_Person__c' && c[0]<>'Agency__c' && c[0]<>'Change_To_Opportunity__c' && columnLeftRW[c[0]]=='wm')}" value="{!or.AgcOpp[c[0]] }" onchange="setChangeFlg('{!or.lineNo}')"/> |
| | | <apex:inputField |
| | | rendered="{!(c[0]<>'Name' && c[0]<>'Product_Category1__c' && c[0]<>'Product_Category2__c' && c[0]<>'Product_Category3__c' && c[0]<>'Agency_Person__c' && c[0]<>'Agency__c' && c[0]<>'Change_To_Opportunity__c' && columnLeftRW[c[0]]=='wm')}" |
| | | value="{!or.AgcOpp[c[0]] }" |
| | | onchange="setChangeFlg('{!or.lineNo}')" |
| | | /> |
| | | <!-- vivek end --> |
| | | |
| | | |
| | | <apex:outputField rendered="{!(c[0]<>'Name' && c[0]<>'Product_Category1__c' && c[0]<>'Product_Category2__c' && c[0]<>'Product_Category3__c' && c[0]<>'Agency_Person__c' && c[0]<>'Agency__c' && c[0]<>'Change_To_Opportunity__c' && columnLeftRW[c[0]]=='r')}" value="{!or.AgcOpp[c[0]] }"/> |
| | | <apex:outputField |
| | | rendered="{!(c[0]<>'Name' && c[0]<>'Product_Category1__c' && c[0]<>'Product_Category2__c' && c[0]<>'Product_Category3__c' && c[0]<>'Agency_Person__c' && c[0]<>'Agency__c' && c[0]<>'Change_To_Opportunity__c' && columnLeftRW[c[0]]=='r')}" |
| | | value="{!or.AgcOpp[c[0]] }" |
| | | /> |
| | | <!-- <apex:outputField rendered="{!(c[0]<>'Name' && columnLeftRW[c[0]]<>'w')}" value="{!or.AgcOpp[c[0]] }"/> --> |
| | | <!-- 可编辑的字段 --> |
| | | <apex:inputField styleClass="slds-form-element" value="{!or.AgcOpp[c[0]]}" rendered="{!columnLeftRW[c[0]]=='w'}" onchange="setChangeFlg('{!or.lineNo}')"/> |
| | | <apex:inputField |
| | | value="{!or.AgcOpp[c[0]]}" |
| | | rendered="{!columnLeftRW[c[0]]=='w'}" |
| | | onchange="setChangeFlg('{!or.lineNo}')" |
| | | /> |
| | | </apex:outputPanel> |
| | | </td> |
| | | <apex:variable value="{!cnt_2 + 1}" var="cnt_2" /> |
| | |
| | | <apex:variable value="{!cnt + 1}" var="cnt" /> |
| | | </apex:repeat> |
| | | </table> |
| | | |
| | | </div><!-- /in_Div --> |
| | | </div> |
| | | <!-- /in_Div --> |
| | | </apex:outputPanel> |
| | | </apex:pageBlock> |
| | | <!-- </div> --> |
| | | <script type="text/javascript"> |
| | | j$(function() { |
| | | var tableWidth = 0; |
| | | j$('body .pbBody table#tableHeader tr.headerRow td').each(function() { |
| | | j$("body .pbBody table#tableHeader tr.headerRow td").each( |
| | | function () { |
| | | var colClass = getColClassName(this); |
| | | if (colClass != 'col_Scroll') { |
| | | var headerCol = j$('body .pbBody table.list tr.headerRow td.' + colClass); |
| | | if (colClass != "col_Scroll") { |
| | | var headerCol = j$( |
| | | "body .pbBody table.list tr.headerRow td." + colClass |
| | | ); |
| | | tableWidth += headerCol.width(); |
| | | } |
| | | }); |
| | | } |
| | | ); |
| | | // j$('table#tableData').css('width', (tableWidth + 2) + 'px'); |
| | | // j$('table#tableHeader').css('width', (tableWidth + 2) + 'px'); |
| | | |
| | | // list の headerRow の tdに toggleWidth() を追加 |
| | | bindTdToggleWidth(); |
| | | // j$("input").attr("styleClass","slds-input"); |
| | | }); |
| | | var elements = document.getElementsByTagName("select"); |
| | | for (i = 0; i < elements.length; i++) { |
| | | var id = elements[i].id; |
| | | if (id.length > 5 && id.substring(id.length - 5, id.length) == 'mlktp') { |
| | | if ( |
| | | id.length > 5 && |
| | | id.substring(id.length - 5, id.length) == "mlktp" |
| | | ) { |
| | | elements[i].style.display = "none"; |
| | | } |
| | | } |
| | | var tbl_l = document.getElementById("tableData_L"); |
| | | var input_l = tbl_l.getElementsByTagName("input"); |
| | | for (i = 0; i < input_l.length; i++) { |
| | | var id = input_l[i].id + '_lkid'; |
| | | var id = input_l[i].id + "_lkid"; |
| | | if (document.getElementById(id) != null) { |
| | | input_l[i].style.width = "75%"; |
| | | } |
| | |
| | | var tbl = document.getElementById("tableData"); |
| | | var input = tbl.getElementsByTagName("input"); |
| | | for (i = 0; i < input.length; i++) { |
| | | var id = input[i].id + '_lkid'; |
| | | var id = input[i].id + "_lkid"; |
| | | if (document.getElementById(id) != null) { |
| | | input[i].style.width = "75%"; |
| | | } |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexPage xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>39.0</apiVersion> |
| | | <apiVersion>35.0</apiVersion> |
| | | <availableInTouch>true</availableInTouch> |
| | | <confirmationTokenRequired>false</confirmationTokenRequired> |
| | | <label>DealerInquiryModifyState</label> |
| | |
| | | trigger ConsumableOrderDetail2Trigger on Consumable_order_details2__c (after insert, after update, after delete) { |
| | | trigger ConsumableOrderDetail2Trigger on Consumable_order_details2__c( |
| | | after insert, |
| | | after update, |
| | | after delete |
| | | ) { |
| | | Set<String> orderSet = new Set<String>(); |
| | | |
| | | if (StaticParameter.EscapeOrderDetail2Trigger) { |
| | | return ; |
| | | } |
| | | if (trigger.isInsert){ |
| | | if (Trigger.isInsert) { |
| | | for (Consumable_order_details2__c local : Trigger.New) { |
| | | if (local.Consumable_order_minor__c!=null && |
| | | local.Dealer_Returned__c == false) |
| | | if ( |
| | | local.Consumable_order_minor__c != null && |
| | | local.Dealer_Returned__c == false |
| | | ) |
| | | orderSet.add(local.Consumable_order_minor__c); |
| | | } |
| | | } |
| | | |
| | | if (trigger.isUpdate){ |
| | | if (Trigger.isUpdate) { |
| | | for (Consumable_order_details2__c local : Trigger.New) { |
| | | //if (local.Consumable_order_minor__c!=null && |
| | | // local.Dealer_Arrive__c != Trigger.oldMap.get(local.Id).get('Dealer_Arrive__c')) |
| | | if (local.Consumable_order_minor__c!=null) orderSet.add(local.Consumable_order_minor__c); |
| | | if (local.Consumable_order_minor__c != null) |
| | | orderSet.add(local.Consumable_order_minor__c); |
| | | } |
| | | } |
| | | |
| | | if (trigger.isDelete){ |
| | | if (Trigger.isDelete) { |
| | | for (Consumable_order_details2__c local : Trigger.old) { |
| | | if (local.Consumable_order_minor__c!=null) orderSet.add(local.Consumable_order_minor__c); |
| | | if (local.Consumable_order_minor__c != null) |
| | | orderSet.add(local.Consumable_order_minor__c); |
| | | } |
| | | } |
| | | |
| | | |
| | | if (orderSet.size()>0){ |
| | | // 2018年8月9日 HWAG-B3D9UV 替换 SQL start by 张玉山 |
| | | list<Consumable_order_details2__c> allresults = |
| | | [SELECT Consumable_order_minor__c, Deliver_date__c, |
| | | Dealer_Returned__c, Dealer_Arrive__c, RemoveBox_No__c,Cancellation_Date__c |
| | | list<Consumable_order_details2__c> allresults = [ |
| | | SELECT |
| | | Consumable_order_minor__c, |
| | | Deliver_date__c, |
| | | Dealer_Returned__c, |
| | | Dealer_Arrive__c, |
| | | RemoveBox_No__c, |
| | | Cancellation_Date__c |
| | | FROM Consumable_order_details2__c |
| | | WHERE Consumable_order_minor__c in :orderSet ]; |
| | | WHERE Consumable_order_minor__c IN :orderSet |
| | | ]; |
| | | // 2018年8月9日 HWAG-B3D9UV end by 张玉山 |
| | | |
| | | // 2018年8月9日 HWAG-B3D9UV 替换下面原有SQL 使用 map 完成赋值 start by 张玉山 |
| | | map<string,Integer> orderSetResults = new map<string,Integer>(); |
| | | map<string, Integer> orderSetResults = new Map<string, Integer>(); |
| | | for(Consumable_order_details2__c results1 : allresults){ |
| | | if(results1.Dealer_Arrive__c == false || results1.Dealer_Returned__c== true |
| | | || (results1.RemoveBox_No__c !=null && results1.RemoveBox_No__c !=1)){ |
| | | if ( |
| | | results1.Dealer_Arrive__c == false || |
| | | results1.Dealer_Returned__c == true || |
| | | (results1.RemoveBox_No__c != null && |
| | | results1.RemoveBox_No__c != 1) |
| | | ) { |
| | | continue; |
| | | } |
| | | string Consumable_order_minor_str = String.valueOf(results1.Consumable_order_minor__c); |
| | | string Consumable_order_minor_str = String.valueOf( |
| | | results1.Consumable_order_minor__c |
| | | ); |
| | | |
| | | if(orderSetResults.containsKey(Consumable_order_minor_str)){ |
| | | orderSetResults.put(Consumable_order_minor_str, |
| | | orderSetResults.get(Consumable_order_minor_str)+1); |
| | | orderSetResults.put( |
| | | Consumable_order_minor_str, |
| | | orderSetResults.get(Consumable_order_minor_str) + 1 |
| | | ); |
| | | }else{ |
| | | orderSetResults.put(Consumable_order_minor_str,1); |
| | | } |
| | |
| | | //更新消耗品订单的发货日期 |
| | | // 2018年8月9日 HWAG-B3D9UV 替换下面原有SQL 使用 map 完成赋值 start by 张玉山 |
| | | Set<string> resultsKeySet = new Set<String>(); |
| | | map<string,Date> DeliverdateResults = new map<string,Date>();//最新发货时间 |
| | | map<string,Date> DeliverdateminResults = new map<string,Date>();//最早发货时间 |
| | | map<string, Date> DeliverdateResults = new Map<string, Date>(); //最新发货时间 |
| | | map<string, Date> DeliverdateminResults = new Map<string, Date>(); //最早发货时间 |
| | | for(Consumable_order_details2__c results1 : allresults){ |
| | | if(results1.Dealer_Arrive__c == true || results1.Dealer_Returned__c== true){ |
| | | if ( |
| | | results1.Dealer_Arrive__c == true || |
| | | results1.Dealer_Returned__c == true |
| | | ) { |
| | | continue; |
| | | } |
| | | string Consumable_order_minor_str = String.valueOf(results1.Consumable_order_minor__c); |
| | | string Consumable_order_minor_str = String.valueOf( |
| | | results1.Consumable_order_minor__c |
| | | ); |
| | | if(DeliverdateResults.containsKey(Consumable_order_minor_str)){ |
| | | if(DeliverdateResults.get(Consumable_order_minor_str) |
| | | < results1.Deliver_date__c |
| | | if ( |
| | | DeliverdateResults.get(Consumable_order_minor_str) < |
| | | results1.Deliver_date__c |
| | | ){ |
| | | DeliverdateResults.put(Consumable_order_minor_str,results1.Deliver_date__c); |
| | | DeliverdateResults.put( |
| | | Consumable_order_minor_str, |
| | | results1.Deliver_date__c |
| | | ); |
| | | resultsKeySet.add(Consumable_order_minor_str); |
| | | } |
| | | }else{ |
| | | DeliverdateResults.put(Consumable_order_minor_str,results1.Deliver_date__c); |
| | | DeliverdateResults.put( |
| | | Consumable_order_minor_str, |
| | | results1.Deliver_date__c |
| | | ); |
| | | resultsKeySet.add(Consumable_order_minor_str); |
| | | } |
| | | //获取最早发货时间 pk part1 start |
| | | if(DeliverdateminResults.containsKey(Consumable_order_minor_str)){ |
| | | if(DeliverdateminResults.get(Consumable_order_minor_str) |
| | | > results1.Deliver_date__c |
| | | if ( |
| | | DeliverdateminResults.get(Consumable_order_minor_str) > |
| | | results1.Deliver_date__c |
| | | ){ |
| | | DeliverdateminResults.put(Consumable_order_minor_str,results1.Deliver_date__c); |
| | | DeliverdateminResults.put( |
| | | Consumable_order_minor_str, |
| | | results1.Deliver_date__c |
| | | ); |
| | | resultsKeySet.add(Consumable_order_minor_str); |
| | | } |
| | | }else{ |
| | | DeliverdateminResults.put(Consumable_order_minor_str,results1.Deliver_date__c); |
| | | DeliverdateminResults.put( |
| | | Consumable_order_minor_str, |
| | | results1.Deliver_date__c |
| | | ); |
| | | resultsKeySet.add(Consumable_order_minor_str); |
| | | } |
| | | //获取最早发货时间 pk part1 end |
| | |
| | | |
| | | //更新待确认收货数量 |
| | | // 2018年8月9日 HWAG-B3D9UV 替换下面原有SQL 使用 map 完成赋值 start by 张玉山 |
| | | map<string,Integer> resultsMap2 = new map<string,Integer>(); |
| | | map<string, Integer> resultsMap2 = new Map<string, Integer>(); |
| | | for(Consumable_order_details2__c results1 : allresults){ |
| | | if(results1.Dealer_Arrive__c == true || results1.Dealer_Returned__c== true || |
| | | results1.Cancellation_Date__c!=null){ |
| | | if ( |
| | | results1.Dealer_Arrive__c == true || |
| | | results1.Dealer_Returned__c == true || |
| | | results1.Cancellation_Date__c != null |
| | | ) { |
| | | continue; |
| | | } |
| | | string Consumable_order_minor_str = String.valueOf(results1.Consumable_order_minor__c); |
| | | string Consumable_order_minor_str = String.valueOf( |
| | | results1.Consumable_order_minor__c |
| | | ); |
| | | if(resultsMap2.containsKey(Consumable_order_minor_str)){ |
| | | resultsMap2.put(Consumable_order_minor_str, |
| | | resultsMap2.get(Consumable_order_minor_str)+1); |
| | | resultsMap2.put( |
| | | Consumable_order_minor_str, |
| | | resultsMap2.get(Consumable_order_minor_str) + 1 |
| | | ); |
| | | }else{ |
| | | resultsMap2.put(Consumable_order_minor_str,1); |
| | | } |
| | |
| | | Consumable_Order__c consumableOrder2 = new Consumable_Order__c(); |
| | | consumableOrder2.Id = strOrder; |
| | | consumableOrder2.Delivery_detail_count__c = cnt; |
| | | if(consumableOrder2.Delivery_detail_count__c == 0){consumableOrder2.More_than_seven_days__c = 0;} |
| | | if (consumableOrder2.Delivery_detail_count__c == 0) { |
| | | consumableOrder2.More_than_seven_days__c = 0; |
| | | } |
| | | consumableOrderlist.add(consumableOrder2); |
| | | } |
| | | |
| | |
| | | update consumableOrderlist; |
| | | } |
| | | } |
| | | //Back up by DTT - Li Jun 2023-06-14 Start for reduce soql times |
| | | |
| | | // 2018年8月9日 HWAG-B3D9UV 获取所有的record ID start by 张玉山 |
| | | //List<RecordType> allrtList = [select Id,DeveloperName from RecordType where SobjectType = 'Consumable_orderdetails__c']; |
| | | List<RecordType> allrtList = [ |
| | | SELECT Id, DeveloperName |
| | | FROM RecordType |
| | | WHERE SobjectType = 'Consumable_orderdetails__c' |
| | | ]; |
| | | // 2018年8月9日 HWAG-B3D9UV 获取所有的record ID end by 张玉山 |
| | | //Back up by DTT - Li Jun 2023-06-14 Start |
| | | //到货和返品时,生成或修改消费品订货明细 |
| | | Set<String> arrivedSet = new Set<String>(); |
| | | Set<String> returnSet = new Set<String>(); |
| | | if (trigger.isUpdate || trigger.isInsert || trigger.isDelete){ |
| | | if (trigger.isUpdate || trigger.isInsert){ |
| | | if (Trigger.isUpdate || Trigger.isInsert || Trigger.isDelete) { |
| | | if (Trigger.isUpdate || Trigger.isInsert) { |
| | | for (Consumable_order_details2__c detail2 : Trigger.New) { |
| | | Consumable_order_details2__c oldDetail2 = null; |
| | | if (Trigger.isUpdate) oldDetail2 = Trigger.oldMap.get(detail2.Id); |
| | | if (Trigger.isUpdate) |
| | | oldDetail2 = Trigger.oldMap.get(detail2.Id); |
| | | if (detail2.Consumable_Arrived_order__c != null) { |
| | | arrivedSet.add(detail2.Consumable_Arrived_order__c); |
| | | } |
| | | |
| | | if ((oldDetail2 == null || oldDetail2.Consumable_Return_order__c == null) && detail2.Consumable_Return_order__c != null) { |
| | | if ( |
| | | (oldDetail2 == null || |
| | | oldDetail2.Consumable_Return_order__c == null) && |
| | | detail2.Consumable_Return_order__c != null |
| | | ) { |
| | | returnSet.add(detail2.Consumable_Return_order__c); |
| | | } |
| | | } |
| | | } |
| | | if (trigger.isDelete){ |
| | | if (Trigger.isDelete) { |
| | | for (Consumable_order_details2__c det2 : Trigger.old) { |
| | | if (det2.Consumable_Arrived_order__c != null) { |
| | | arrivedSet.add(det2.Consumable_Arrived_order__c); |
| | |
| | | } |
| | | // 2018年8月14日 HWAG-B3D9UV 在进行NFM110处理时 跳过arrivedset start by 张玉山 |
| | | if (arrivedSet.size() > 0) { |
| | | Map<Id, Consumable_order__c> arrivedMap = new Map<Id, Consumable_order__c>([select Id, RecordType.DeveloperName, Name from Consumable_order__c where Id in :arrivedSet]); |
| | | List<Consumable_orderdetails__c> detail1List = [select Id, Name, Asset_Model_No__c, Consumable_count__c, Consumable_order__c from Consumable_orderdetails__c where Consumable_order__c in :arrivedSet]; |
| | | Map<Id, Consumable_order__c> arrivedMap = new Map<Id, Consumable_order__c>( |
| | | [ |
| | | SELECT Id, RecordType.DeveloperName, Name |
| | | FROM Consumable_order__c |
| | | WHERE Id IN :arrivedSet |
| | | ] |
| | | ); |
| | | List<Consumable_orderdetails__c> detail1List = [ |
| | | SELECT |
| | | Id, |
| | | Name, |
| | | Asset_Model_No__c, |
| | | Consumable_count__c, |
| | | Consumable_order__c |
| | | FROM Consumable_orderdetails__c |
| | | WHERE Consumable_order__c IN :arrivedSet |
| | | ]; |
| | | Map<String,Consumable_orderdetails__c> detail1Map = new Map<String,Consumable_orderdetails__c>(); |
| | | for (Consumable_orderdetails__c detail1 : detail1List) { |
| | | String key = '' + detail1.Consumable_order__c + detail1.Asset_Model_No__c; |
| | | String key = |
| | | '' + |
| | | detail1.Consumable_order__c + |
| | | detail1.Asset_Model_No__c; |
| | | detail1Map.put(key, detail1); |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | AggregateResult[] results = [select Consumable_Arrived_order__c, Asset_Model_No__c, count(bar_code__c) recordCount |
| | | from Consumable_order_details2__c |
| | | where Consumable_Arrived_order__c in :arrivedSet |
| | | and Dealer_Arrive__c = true |
| | | AggregateResult[] results = [ |
| | | SELECT |
| | | Consumable_Arrived_order__c, |
| | | Asset_Model_No__c, |
| | | count(bar_code__c) recordCount |
| | | FROM Consumable_order_details2__c |
| | | WHERE |
| | | Consumable_Arrived_order__c IN :arrivedSet |
| | | AND Dealer_Arrive__c = TRUE |
| | | //and Dealer_Returned__c <> true |
| | | AND (RemoveBox_No__c=null or RemoveBox_No__c=1) |
| | | group by Consumable_Arrived_order__c, Asset_Model_No__c]; |
| | | AND (RemoveBox_No__c = NULL |
| | | OR RemoveBox_No__c = 1) |
| | | GROUP BY Consumable_Arrived_order__c, Asset_Model_No__c |
| | | ]; |
| | | Map<String, Integer> keyCount = new Map<String, Integer>(); |
| | | |
| | | for(AggregateResult ar: results){ |
| | | String key = '' + ar.get('Consumable_Arrived_order__c') + ar.get('Asset_Model_No__c'); |
| | | String key = |
| | | '' + |
| | | ar.get('Consumable_Arrived_order__c') + |
| | | ar.get('Asset_Model_No__c'); |
| | | keyCount.put(key, Integer.valueOf(ar.get('recordCount'))); |
| | | } |
| | | //Back up by DTT - Li Jun 2023-06-14 Start |
| | | // 2018年8月9日 HWAG-B3D9UV 替代下面SQL select start by 张玉山 |
| | | // List<RecordType> rtList = new List<RecordType>(); |
| | | // for(RecordType rtl : allrtList){ |
| | | // if('Detail1_Arrival'.equals(rtl.DeveloperName)){ |
| | | // rtList.add(rtl); |
| | | // } |
| | | // } |
| | | List<RecordType> rtList = new List<RecordType>(); |
| | | for (RecordType rtl : allrtList) { |
| | | if ('Detail1_Arrival'.equals(rtl.DeveloperName)) { |
| | | rtList.add(rtl); |
| | | } |
| | | } |
| | | // 2018年8月9日 HWAG-B3D9UV 替代下面SQL select end by 张玉山 |
| | | //Back up by DTT - Li Jun 2023-06-14 End |
| | | |
| | | /* 2018年8月9日 HWAG-B3D9UV 原获取 recordtype start by 张玉山 |
| | | List<RecordType> rtList = [select Id from RecordType where DeveloperName = 'Detail1_Arrival' and SobjectType = 'Consumable_orderdetails__c']; |
| | | 2018年8月9日 HWAG-B3D9UV 原获取 recordtype end by 张玉山 */ |
| | | //Back up by DTT - Li Jun 2023-06-14 Start |
| | | // Id recordTypeId = null; |
| | | // if (rtList.size() > 0) recordTypeId = rtList[0].Id; |
| | | //Back up by DTT - Li Jun 2023-06-14 End |
| | | Id recordtypeId = Schema.SObjectType.Consumable_Orderdetails__c.getRecordTypeInfosByDeveloperName().get('Detail1_Arrival').getRecordTypeId(); |
| | | results = [select Consumable_order__c, count(Id) noCount |
| | | from Consumable_orderdetails__c |
| | | where Consumable_order__c in :arrivedSet |
| | | group by Consumable_order__c]; |
| | | Id recordTypeId = null; |
| | | if (rtList.size() > 0) |
| | | recordTypeId = rtList[0].Id; |
| | | |
| | | results = [ |
| | | SELECT Consumable_order__c, count(Id) noCount |
| | | FROM Consumable_orderdetails__c |
| | | WHERE Consumable_order__c IN :arrivedSet |
| | | GROUP BY Consumable_order__c |
| | | ]; |
| | | System.debug('results +++++' + results); |
| | | Map<Id, Integer> noCount = new Map<Id, Integer>(); |
| | | for(AggregateResult ar: results){ |
| | | noCount.put((Id)ar.get('Consumable_order__c'), Integer.valueOf(ar.get('noCount'))); |
| | | noCount.put( |
| | | (Id) ar.get('Consumable_order__c'), |
| | | Integer.valueOf(ar.get('noCount')) |
| | | ); |
| | | } |
| | | System.debug('noCount +++++' + noCount); |
| | | Map<String, Consumable_orderdetails__c> upsertMap = new Map<String, Consumable_orderdetails__c>(); |
| | | Map<String, Consumable_orderdetails__c> deletetMap = new Map<String, Consumable_orderdetails__c>(); |
| | | Map<String, String> assetModelNoMap = new Map<String, String>(); |
| | | if (trigger.isUpdate || trigger.isInsert){ |
| | | if (Trigger.isUpdate || Trigger.isInsert) { |
| | | for (Consumable_order_details2__c detail2 : Trigger.New) { |
| | | //Dataloaderで初期在庫登録をしたあと、データ修正が入ったときに明細1が更新されない。 |
| | | //if (trigger.isUpdate && detail2.ManualRegisteredStock__c == true) continue; |
| | | if (detail2.Consumable_Arrived_order__c == null) continue; |
| | | String key = '' + detail2.Consumable_Arrived_order__c + detail2.Asset_Model_No__c; |
| | | if (detail2.Consumable_Arrived_order__c == null) |
| | | continue; |
| | | String key = |
| | | '' + |
| | | detail2.Consumable_Arrived_order__c + |
| | | detail2.Asset_Model_No__c; |
| | | //if (upsertMap.get(key) != null) continue; |
| | | Integer count = keyCount.get(key); |
| | | Consumable_orderdetails__c detail1 = detail1Map.get(key); |
| | | |
| | | if (detail1 == null) detail1 = new Consumable_orderdetails__c(); |
| | | if (detail1 == null) |
| | | detail1 = new Consumable_orderdetails__c(); |
| | | detail1.Consumable_Arrivecount__c = count; |
| | | if (detail1.Id == null) { |
| | | Consumable_order__c co = arrivedMap.get(detail2.Consumable_Arrived_order__c); |
| | | Consumable_order__c co = arrivedMap.get( |
| | | detail2.Consumable_Arrived_order__c |
| | | ); |
| | | Integer index = noCount.get(co.Id); |
| | | if (index == null) index = 0; |
| | | if (index == null) |
| | | index = 0; |
| | | if(assetModelNoMap.containsKey(detail2.Asset_Model_No__c)){ |
| | | continue; |
| | | }else{ |
| | | assetModelNoMap.put(detail2.Asset_Model_No__c, detail2.Asset_Model_No__c); |
| | | assetModelNoMap.put( |
| | | detail2.Asset_Model_No__c, |
| | | detail2.Asset_Model_No__c |
| | | ); |
| | | noCount.put(co.Id, index + 1); |
| | | } |
| | | noCount.put(co.Id, index + 1); |
| | |
| | | detail1.RecordTypeId = recordTypeId; |
| | | //detail1.Consumable_principal__c = co.Id; |
| | | detail1.Intra_Trade_List_RMB__c = detail2.Intra_Trade_List_RMB__c; |
| | | |
| | | } |
| | | upsertMap.put(key, detail1); |
| | | } |
| | | } |
| | | |
| | | if (trigger.isUpdate){ |
| | | if (Trigger.isUpdate) { |
| | | for (Consumable_order_details2__c detail2 : Trigger.old) { |
| | | //Dataloaderで初期在庫登録をしたあと、データ修正が入ったときに明細1が更新されない。 |
| | | //if (detail2.ManualRegisteredStock__c == true) continue; |
| | | if (detail2.Consumable_Arrived_order__c == null) continue; |
| | | String key = '' + detail2.Consumable_Arrived_order__c + detail2.Asset_Model_No__c; |
| | | if (detail2.Consumable_Arrived_order__c == null) |
| | | continue; |
| | | String key = |
| | | '' + |
| | | detail2.Consumable_Arrived_order__c + |
| | | detail2.Asset_Model_No__c; |
| | | //if (upsertMap.get(key) != null) continue; |
| | | Integer count = keyCount.get(key); |
| | | Consumable_orderdetails__c detail1 = detail1Map.get(key); |
| | |
| | | deletetMap.put(key,detail1); |
| | | continue; |
| | | } |
| | | if (detail1 == null) continue; |
| | | if (detail1 == null) |
| | | continue; |
| | | detail1.Consumable_Arrivecount__c = count; |
| | | |
| | | if (detail1.Id == null) { |
| | | Consumable_order__c co = arrivedMap.get(detail2.Consumable_Arrived_order__c); |
| | | Consumable_order__c co = arrivedMap.get( |
| | | detail2.Consumable_Arrived_order__c |
| | | ); |
| | | Integer index = noCount.get(co.Id); |
| | | if (index == null) index = 0; |
| | | if (index == null) |
| | | index = 0; |
| | | System.debug('indexUp +++++' + index); |
| | | noCount.put(co.Id, index + 1); |
| | | System.debug('noCountUp +++++' + noCount); |
| | |
| | | detail1.RecordTypeId = recordTypeId; |
| | | //detail1.Consumable_principal__c = co.Id; |
| | | detail1.Intra_Trade_List_RMB__c = detail2.Intra_Trade_List_RMB__c; |
| | | |
| | | |
| | | } |
| | | upsertMap.put(key, detail1); |
| | | } |
| | | } |
| | | |
| | | if (trigger.isDelete){ |
| | | if (Trigger.isDelete) { |
| | | for (Consumable_order_details2__c detail2 : Trigger.old) { |
| | | if (detail2.Consumable_Arrived_order__c == null) continue; |
| | | String key = '' + detail2.Consumable_Arrived_order__c + detail2.Asset_Model_No__c; |
| | | if (detail2.Consumable_Arrived_order__c == null) |
| | | continue; |
| | | String key = |
| | | '' + |
| | | detail2.Consumable_Arrived_order__c + |
| | | detail2.Asset_Model_No__c; |
| | | //if (upsertMap.get(key) != null) continue; |
| | | Integer count = keyCount.get(key); |
| | | Consumable_orderdetails__c detail1 = detail1Map.get(key); |
| | |
| | | deletetMap.put(key,detail1); |
| | | continue; |
| | | } |
| | | if (detail1 == null) detail1 = new Consumable_orderdetails__c(); |
| | | if (detail1 == null) |
| | | detail1 = new Consumable_orderdetails__c(); |
| | | detail1.Consumable_Arrivecount__c = count; |
| | | |
| | | if (detail1.Id == null) { |
| | | Consumable_order__c co = arrivedMap.get(detail2.Consumable_Arrived_order__c); |
| | | Consumable_order__c co = arrivedMap.get( |
| | | detail2.Consumable_Arrived_order__c |
| | | ); |
| | | Integer index = noCount.get(co.Id); |
| | | if (index == null) index = 0; |
| | | if (index == null) |
| | | index = 0; |
| | | noCount.put(co.Id, index + 1); |
| | | String newName = co.Name+'-'; |
| | | if (index < 99) { |
| | |
| | | detail1.RecordTypeId = recordTypeId; |
| | | //detail1.Consumable_principal__c = co.Id; |
| | | detail1.Intra_Trade_List_RMB__c = detail2.Intra_Trade_List_RMB__c; |
| | | |
| | | } |
| | | upsertMap.put(key, detail1); |
| | | } |
| | |
| | | if(deletetMap.size()>0){ |
| | | Database.delete(deletetMap.values(),true); |
| | | } |
| | | |
| | | } |
| | | } |
| | | // 2018年8月14日 HWAG-B3D9UV 在进行NFM110处理时 跳过returnSet start by 张玉山 |
| | | |
| | | if (trigger.isUpdate || trigger.isInsert){ |
| | | if (Trigger.isUpdate || Trigger.isInsert) { |
| | | if (StaticParameter.EscapeConsumableOrderDetail2Trigger) { |
| | | return ; |
| | | } |
| | | // 2018年8月14日 HWAG-B3D9UV 在进行NFM110处理时 跳过returnSet start by 张玉山 |
| | | if (returnSet.size() > 0) { |
| | | Map<Id, Consumable_order__c> returnMap = new Map<Id, Consumable_order__c>([select Id, RecordType.DeveloperName, Name from Consumable_order__c where Id in :returnSet]); |
| | | List<Consumable_orderdetails__c> detail1List = [select Id, Name, Asset_Model_No__c, Consumable_count__c, Consumable_order__c from Consumable_orderdetails__c where Consumable_order__c in :returnSet]; |
| | | Map<Id, Consumable_order__c> returnMap = new Map<Id, Consumable_order__c>( |
| | | [ |
| | | SELECT Id, RecordType.DeveloperName, Name |
| | | FROM Consumable_order__c |
| | | WHERE Id IN :returnSet |
| | | ] |
| | | ); |
| | | List<Consumable_orderdetails__c> detail1List = [ |
| | | SELECT |
| | | Id, |
| | | Name, |
| | | Asset_Model_No__c, |
| | | Consumable_count__c, |
| | | Consumable_order__c |
| | | FROM Consumable_orderdetails__c |
| | | WHERE Consumable_order__c IN :returnSet |
| | | ]; |
| | | Map<String,Consumable_orderdetails__c> detail1Map = new Map<String,Consumable_orderdetails__c>(); |
| | | |
| | | for (Consumable_orderdetails__c detail1 : detail1List) { |
| | | String key = '' + detail1.Consumable_order__c + detail1.Asset_Model_No__c; |
| | | String key = |
| | | '' + |
| | | detail1.Consumable_order__c + |
| | | detail1.Asset_Model_No__c; |
| | | detail1Map.put(key, detail1); |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | AggregateResult[] results = [select Consumable_Return_order__c, Asset_Model_No__c, count(Id) recordCount |
| | | from Consumable_order_details2__c |
| | | where Consumable_Return_order__c in :returnSet |
| | | and Dealer_Returned__c = true |
| | | group by Consumable_Return_order__c, Asset_Model_No__c]; |
| | | AggregateResult[] results = [ |
| | | SELECT |
| | | Consumable_Return_order__c, |
| | | Asset_Model_No__c, |
| | | count(Id) recordCount |
| | | FROM Consumable_order_details2__c |
| | | WHERE |
| | | Consumable_Return_order__c IN :returnSet |
| | | AND Dealer_Returned__c = TRUE |
| | | GROUP BY Consumable_Return_order__c, Asset_Model_No__c |
| | | ]; |
| | | Map<String, Integer> keyCount = new Map<String, Integer>(); |
| | | for(AggregateResult ar: results){ |
| | | String key = '' + ar.get('Consumable_Return_order__c') + ar.get('Asset_Model_No__c'); |
| | | String key = |
| | | '' + |
| | | ar.get('Consumable_Return_order__c') + |
| | | ar.get('Asset_Model_No__c'); |
| | | keyCount.put(key, Integer.valueOf(ar.get('recordCount'))); |
| | | } |
| | | //Back up by DTT - Li Jun 2023-06-14 Start for reduce soql times |
| | | |
| | | // 2018年8月9日 HWAG-B3D9UV 替代下面SQL select start by 张玉山 |
| | | // List<RecordType> rtList = new List<RecordType>(); |
| | | // for(RecordType rtl : allrtList){ |
| | | // if('Detail1_ReturnGoods'.equals(rtl.DeveloperName)){ |
| | | // rtList.add(rtl); |
| | | // } |
| | | // } |
| | | List<RecordType> rtList = new List<RecordType>(); |
| | | for (RecordType rtl : allrtList) { |
| | | if ('Detail1_ReturnGoods'.equals(rtl.DeveloperName)) { |
| | | rtList.add(rtl); |
| | | } |
| | | } |
| | | // 2018年8月9日 HWAG-B3D9UV 替代下面SQL select end by 张玉山 |
| | | //Back up by DTT - Li Jun 2023-06-14 End |
| | | |
| | | /* 2018年8月9日 HWAG-B3D9UV 原获取 recordtype start by 张玉山 |
| | | List<RecordType> rtList = [select Id from RecordType where DeveloperName = 'Detail1_ReturnGoods' and SobjectType = 'Consumable_orderdetails__c']; |
| | | 2018年8月9日 HWAG-B3D9UV 原获取 recordtype end by 张玉山 */ |
| | | |
| | | Id recordTypeId = Schema.SObjectType.Consumable_Orderdetails__c.getRecordTypeInfosByDeveloperName().get('Detail1_ReturnGoods').getRecordTypeId(); |
| | | //if (rtList.size() > 0) recordTypeId = rtList[0].Id; |
| | | Id recordTypeId = null; |
| | | if (rtList.size() > 0) |
| | | recordTypeId = rtList[0].Id; |
| | | |
| | | results = [select Consumable_order__c, count(Id) noCount |
| | | from Consumable_orderdetails__c |
| | | where Consumable_order__c in :returnSet |
| | | group by Consumable_order__c]; |
| | | results = [ |
| | | SELECT Consumable_order__c, count(Id) noCount |
| | | FROM Consumable_orderdetails__c |
| | | WHERE Consumable_order__c IN :returnSet |
| | | GROUP BY Consumable_order__c |
| | | ]; |
| | | Map<Id, Integer> noCount = new Map<Id, Integer>(); |
| | | for(AggregateResult ar: results){ |
| | | noCount.put((Id)ar.get('Consumable_order__c'), Integer.valueOf(ar.get('noCount'))); |
| | | noCount.put( |
| | | (Id) ar.get('Consumable_order__c'), |
| | | Integer.valueOf(ar.get('noCount')) |
| | | ); |
| | | } |
| | | |
| | | Map<String, Consumable_orderdetails__c> upsertMap = new Map<String, Consumable_orderdetails__c>(); |
| | |
| | | |
| | | for (Consumable_order_details2__c detail2 : Trigger.New) { |
| | | Consumable_order_details2__c oldDetail2 = null; |
| | | if (detail2.Consumable_Return_order__c == null) continue; |
| | | if (detail2.Consumable_Return_order__c == null) |
| | | continue; |
| | | |
| | | String key = '' + detail2.Consumable_Return_order__c + detail2.Asset_Model_No__c; |
| | | String key = |
| | | '' + |
| | | detail2.Consumable_Return_order__c + |
| | | detail2.Asset_Model_No__c; |
| | | |
| | | if(Trigger.isUpdate) oldDetail2 = Trigger.oldMap.get(detail2.Id); |
| | | if (Trigger.isUpdate) |
| | | oldDetail2 = Trigger.oldMap.get(detail2.Id); |
| | | if (oldDetail2 != null) { |
| | | if (keyCount.containsKey(key)) { |
| | | returnCount += 1; |
| | | if (oldDetail2.Consumable_Sale_order__c != null) { |
| | | Integer sCount = updatedSaleCount.containsKey(''+oldDetail2.Consumable_Sale_order__c+detail2.Asset_Model_No__c) ? updatedSaleCount.get(''+oldDetail2.Consumable_Sale_order__c+detail2.Asset_Model_No__c) : 0; |
| | | Integer sCount = updatedSaleCount.containsKey( |
| | | '' + |
| | | oldDetail2.Consumable_Sale_order__c + |
| | | detail2.Asset_Model_No__c |
| | | ) |
| | | ? updatedSaleCount.get( |
| | | '' + |
| | | oldDetail2.Consumable_Sale_order__c + |
| | | detail2.Asset_Model_No__c |
| | | ) |
| | | : 0; |
| | | sCount += 1; |
| | | updatedSaleCount.put(''+oldDetail2.Consumable_Sale_order__c+detail2.Asset_Model_No__c, sCount); |
| | | updatedSaleCount.put( |
| | | '' + |
| | | oldDetail2.Consumable_Sale_order__c + |
| | | detail2.Asset_Model_No__c, |
| | | sCount |
| | | ); |
| | | updatedSaleId.add(oldDetail2.Consumable_Sale_order__c); |
| | | } |
| | | if (oldDetail2.Consumable_Shipment_order__c != null) { |
| | | Integer sCount = updatedShipmentCount.containsKey(''+oldDetail2.Consumable_Shipment_order__c+detail2.Asset_Model_No__c) ? updatedShipmentCount.get(''+oldDetail2.Consumable_Shipment_order__c+detail2.Asset_Model_No__c) : 0; |
| | | Integer sCount = updatedShipmentCount.containsKey( |
| | | '' + |
| | | oldDetail2.Consumable_Shipment_order__c + |
| | | detail2.Asset_Model_No__c |
| | | ) |
| | | ? updatedShipmentCount.get( |
| | | '' + |
| | | oldDetail2.Consumable_Shipment_order__c + |
| | | detail2.Asset_Model_No__c |
| | | ) |
| | | : 0; |
| | | sCount += 1; |
| | | |
| | | updatedShipmentCount.put(''+oldDetail2.Consumable_Shipment_order__c+detail2.Asset_Model_No__c, sCount); |
| | | updatedShipmentCount.put( |
| | | '' + |
| | | oldDetail2.Consumable_Shipment_order__c + |
| | | detail2.Asset_Model_No__c, |
| | | sCount |
| | | ); |
| | | updatedShipmentId.add(oldDetail2.Consumable_Shipment_order__c); |
| | | } |
| | | /*if (oldDetail2.Invoice_No__c != null) { |
| | |
| | | }*/ |
| | | } |
| | | } |
| | | if (upsertMap.get(key) != null) continue; |
| | | if (upsertMap.get(key) != null) |
| | | continue; |
| | | Integer count = keyCount.get(key); |
| | | |
| | | Consumable_orderdetails__c detail1 = detail1Map.get(key); |
| | | |
| | | if (detail1 == null) detail1 = new Consumable_orderdetails__c(); |
| | | if (detail1 == null) |
| | | detail1 = new Consumable_orderdetails__c(); |
| | | detail1.RrturnPro_count__c = count; |
| | | |
| | | if (detail1.Id == null) { |
| | | Consumable_order__c co = returnMap.get(detail2.Consumable_Return_order__c); |
| | | Consumable_order__c co = returnMap.get( |
| | | detail2.Consumable_Return_order__c |
| | | ); |
| | | Integer index = noCount.get(co.Id); |
| | | if (index == null) index = 0; |
| | | if (index == null) |
| | | index = 0; |
| | | noCount.put(co.Id, index + 1); |
| | | String newName = co.Name+'-'; |
| | | if (index < 99) { |
| | |
| | | detail1.RecordTypeId = recordTypeId; |
| | | //detail1.Consumable_principal__c = co.Id; |
| | | detail1.Intra_Trade_List_RMB__c = detail2.Intra_Trade_List_RMB__c; |
| | | |
| | | } |
| | | upsertMap.put(key, detail1); |
| | | } |
| | | |
| | | Database.upsert(upsertMap.values(), true); |
| | | // 2018年8月8日 HWAG-B3D9UV 减少 select 数量 start by 张玉山 |
| | | List<Consumable_orderdetails__c> Consumable_orderdetailsList = |
| | | [select Id, Name, Asset_Model_No__c, RrturnPro_count__c, |
| | | Consumable_order__c,Invoicedet1_OD_link__c |
| | | from Consumable_orderdetails__c |
| | | where Consumable_order__c in :updatedSaleId |
| | | or Consumable_order__c in :updatedShipmentId |
| | | or Consumable_order__c in :updatedConInvoiceId]; |
| | | List<Consumable_orderdetails__c> Consumable_orderdetailsList = [ |
| | | SELECT |
| | | Id, |
| | | Name, |
| | | Asset_Model_No__c, |
| | | RrturnPro_count__c, |
| | | Consumable_order__c, |
| | | Invoicedet1_OD_link__c |
| | | FROM Consumable_orderdetails__c |
| | | WHERE |
| | | Consumable_order__c IN :updatedSaleId |
| | | OR Consumable_order__c IN :updatedShipmentId |
| | | OR Consumable_order__c IN :updatedConInvoiceId |
| | | ]; |
| | | |
| | | List<Consumable_orderdetails__c> detail1SaleList |
| | | = new List<Consumable_orderdetails__c>(); |
| | | List<Consumable_orderdetails__c> detail1SaleList = new List<Consumable_orderdetails__c>(); |
| | | |
| | | for (Consumable_orderdetails__c orderdetails : Consumable_orderdetailsList){ |
| | | if(updatedSaleId.contains(orderdetails.id) |
| | | && 'Sale'.equals(orderdetails.Consumable_order__r.RecordType.DeveloperName)){ |
| | | for ( |
| | | Consumable_orderdetails__c orderdetails : Consumable_orderdetailsList |
| | | ) { |
| | | if ( |
| | | updatedSaleId.contains(orderdetails.id) && |
| | | 'Sale' |
| | | .equals(orderdetails.Consumable_order__r.RecordType.DeveloperName) |
| | | ) { |
| | | detail1SaleList.add(orderdetails); |
| | | } |
| | | } |
| | | |
| | | List<Consumable_orderdetails__c> detail1ShipmentList |
| | | = new List<Consumable_orderdetails__c>(); |
| | | List<Consumable_orderdetails__c> detail1ShipmentList = new List<Consumable_orderdetails__c>(); |
| | | |
| | | for (Consumable_orderdetails__c orderdetails : Consumable_orderdetailsList){ |
| | | if(updatedShipmentId.contains(orderdetails.id) |
| | | && 'Shipment'.equals(orderdetails.Consumable_order__r.RecordType.DeveloperName)){ |
| | | for ( |
| | | Consumable_orderdetails__c orderdetails : Consumable_orderdetailsList |
| | | ) { |
| | | if ( |
| | | updatedShipmentId.contains(orderdetails.id) && |
| | | 'Shipment' |
| | | .equals(orderdetails.Consumable_order__r.RecordType.DeveloperName) |
| | | ) { |
| | | detail1ShipmentList.add(orderdetails); |
| | | } |
| | | } |
| | | |
| | | List<Consumable_orderdetails__c> detail1ConInvoiceList |
| | | = new List<Consumable_orderdetails__c>(); |
| | | List<Consumable_orderdetails__c> detail1ConInvoiceList = new List<Consumable_orderdetails__c>(); |
| | | |
| | | for (Consumable_orderdetails__c orderdetails : Consumable_orderdetailsList){ |
| | | if(updatedConInvoiceId.contains(orderdetails.id) |
| | | && 'Order_Invoice'.equals(orderdetails.Consumable_order__r.RecordType.DeveloperName)){ |
| | | for ( |
| | | Consumable_orderdetails__c orderdetails : Consumable_orderdetailsList |
| | | ) { |
| | | if ( |
| | | updatedConInvoiceId.contains(orderdetails.id) && |
| | | 'Order_Invoice' |
| | | .equals(orderdetails.Consumable_order__r.RecordType.DeveloperName) |
| | | ) { |
| | | detail1ConInvoiceList.add(orderdetails); |
| | | } |
| | | } |
| | |
| | | List<Consumable_orderdetails__c> updateData = new List<Consumable_orderdetails__c>(); |
| | | |
| | | for (Consumable_orderdetails__c detail1Sale : detail1SaleList) { |
| | | Integer count = updatedSaleCount.get(''+detail1Sale.Consumable_order__c+detail1Sale.Asset_Model_No__c); |
| | | Integer count = updatedSaleCount.get( |
| | | '' + detail1Sale.Consumable_order__c + detail1Sale.Asset_Model_No__c |
| | | ); |
| | | if (count != null) { |
| | | detail1Sale.RrturnPro_count__c += count; |
| | | updateData.add(detail1Sale); |
| | | } |
| | | |
| | | } |
| | | for (Consumable_orderdetails__c detail1Shipment : detail1ShipmentList) { |
| | | Integer count = updatedShipmentCount.get(''+detail1Shipment.Consumable_order__c+detail1Shipment.Asset_Model_No__c); |
| | | Integer count = updatedShipmentCount.get( |
| | | '' + |
| | | detail1Shipment.Consumable_order__c + |
| | | detail1Shipment.Asset_Model_No__c |
| | | ); |
| | | if (count != null) { |
| | | detail1Shipment.RrturnPro_count__c += count; |
| | | updateData.add(detail1Shipment); |
| | | } |
| | | } |
| | | for (Consumable_orderdetails__c detail1ConInvoice : detail1ConInvoiceList) { |
| | | Integer count = updatedConInvoiceCount.get(''+detail1ConInvoice.Consumable_order__c+detail1ConInvoice.Invoicedet1_OD_link__c+detail1ConInvoice.Asset_Model_No__c); |
| | | if (count != null && (detail1ConInvoice.Invoicedet1_OD_link__c == shipmentIdMap.get(''+detail1ConInvoice.Invoicedet1_OD_link__c+detail1ConInvoice.Asset_Model_No__c)) ) { |
| | | for ( |
| | | Consumable_orderdetails__c detail1ConInvoice : detail1ConInvoiceList |
| | | ) { |
| | | Integer count = updatedConInvoiceCount.get( |
| | | '' + |
| | | detail1ConInvoice.Consumable_order__c + |
| | | detail1ConInvoice.Invoicedet1_OD_link__c + |
| | | detail1ConInvoice.Asset_Model_No__c |
| | | ); |
| | | if ( |
| | | count != null && |
| | | (detail1ConInvoice.Invoicedet1_OD_link__c == |
| | | shipmentIdMap.get( |
| | | '' + |
| | | detail1ConInvoice.Invoicedet1_OD_link__c + |
| | | detail1ConInvoice.Asset_Model_No__c |
| | | )) |
| | | ) { |
| | | detail1ConInvoice.RrturnPro_count__c += count; |
| | | //updateData.add(detail1ConInvoice); |
| | | } |
| | |
| | | |
| | | Database.upsert(updateData, true); |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexTrigger xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>50.0</apiVersion> |
| | | <apiVersion>40.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexTrigger> |