| | |
| | | <aura:attribute name="isSelectOtherCancel" type="boolean" default="false"/> |
| | | <aura:attribute name="isSelectOtherDelay" type="boolean" default="false"/> |
| | | <!--2021-11-11 mzy 任务管理改善 end--> |
| | | <aura:attribute name="estimatedFinishDate" type="Date" /> |
| | | <aura:handler name="init" value="{! this }" action="{! c.init }"/> |
| | | |
| | | <div> |
| | |
| | | class="buttonColor slds-m-right_small" /> |
| | | <h2 class="slds-text-heading_small ">{!v.errorMessage}</h2> |
| | | </div> |
| | | <div class="slds-notify__close"> |
| | | <button class="slds-button slds-button_icon slds-button_icon-inverse" title="Close" onclick="{! c.closeMessage }"> |
| | | <lightning:icon alternativeText="close" iconName="utility:close" size="small" /> |
| | | <span class="slds-assistive-text">Close</span> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </aura:if> |
| | | </div> |
| | | </aura:if> |
| | | |
| | | <!-- 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230804 by lc Start --> |
| | | <aura:if isTrue="{!(v.tempdata.taskType == '盘点检查计划' || v.tempdata.taskType == '温湿度检查计划')}"> |
| | | <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-1" style ="min-Height: 100px;max-width: 600px;"> |
| | | <lightning:input type="date" label="预计完成时间" name="estimatedFinishDate" value="{! v.estimatedFinishDate }" required="true" placeholder="请选择" variant="label-inline" /> |
| | | </div> |
| | | </aura:if> |
| | | <!-- 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230804 by lc End --> |
| | | |
| | | <!--###### MODAL BOX FOOTER Part Start ######--> |
| | | <footer class="slds-modal__footer" style= "max-width: 600px;"> |
| | | |
| | |
| | | <div style="padding-top: 5px;padding-left: 12px;color:#6B6D70;">延期理由(其他)</div> |
| | | <lightning:input name="delayReason" value="{! v.delayReasonOther }" placeholder="请输入延期理由(其他)"/> |
| | | </aura:if> |
| | | <!-- 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230804 by lc Start --> |
| | | <aura:if isTrue="{!(v.tempdata.taskType == '盘点检查计划' || v.tempdata.taskType == '温湿度检查计划')}"> |
| | | <lightning:input type="date" label="延期至时间" name="estimatedFinishDate" value="{! v.estimatedFinishDate }" required="true" placeholder="请选择" variant="label-inline" /> |
| | | </aura:if> |
| | | <!-- 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230804 by lc End --> |
| | | </p> |
| | | </div> |
| | | <footer class="slds-modal__footer" style ="max-width: 600px;"> |
| | |
| | | helper.checkEnquiry(cmp,tempData.id); |
| | | } |
| | | //2021-10-25 yjk 取消原因为失单,查看询价报告按钮 end |
| | | ,closeMessage : function(cmp,event,helper){ |
| | | $A.util.addClass(cmp.find('errorDiv'), 'slds-hide'); |
| | | } |
| | | |
| | | }); |
| | |
| | | { |
| | | label: "创建日期", |
| | | fieldName: "taskCreateddate", |
| | | type: "date-local", |
| | | typeAttributes:{ |
| | | weekday: "long", |
| | | year: "numeric", |
| | | month: "long", |
| | | day: "2-digit" |
| | | }, |
| | | type: "text", |
| | | // type: "date-local", |
| | | // typeAttributes:{ |
| | | // weekday: "long", |
| | | // year: "numeric", |
| | | // month: "long", |
| | | // day: "2-digit" |
| | | // }, |
| | | sortable: true , |
| | | wrapText: true, |
| | | }, |
| | |
| | | label: '合并', |
| | | name: 'Merge', |
| | | title: '合并', |
| | | disabled: { fieldName: 'confirmButtonisDisabled'}, |
| | | disabled: { fieldName: 'mergeConfirmButtonisDisabled'}, |
| | | value: 'Merge' |
| | | }, |
| | | initialWidth: 76, |
| | |
| | | { |
| | | label: "创建日期", |
| | | fieldName: "taskCreateddate", |
| | | type: "date-local", |
| | | typeAttributes:{ |
| | | weekday: "long", |
| | | year: "numeric", |
| | | month: "long", |
| | | day: "2-digit" |
| | | }, |
| | | type: "text", |
| | | // type: "date-local", |
| | | // typeAttributes:{ |
| | | // weekday: "long", |
| | | // year: "numeric", |
| | | // month: "long", |
| | | // day: "2-digit" |
| | | // }, |
| | | sortable: true |
| | | }, |
| | | { |
| | |
| | | { |
| | | label: "创建日期", |
| | | fieldName: "taskCreateddate", |
| | | type: "date-local", |
| | | typeAttributes:{ |
| | | weekday: "long", |
| | | year: "numeric", |
| | | month: "long", |
| | | day: "2-digit" |
| | | }, |
| | | type: "text", |
| | | // type: "date-local", |
| | | // typeAttributes:{ |
| | | // weekday: "long", |
| | | // year: "numeric", |
| | | // month: "long", |
| | | // day: "2-digit" |
| | | // }, |
| | | sortable: true , |
| | | wrapText: true, |
| | | }, |
| | |
| | | label: '合并', |
| | | name: 'Merge', |
| | | title: '合并', |
| | | disabled: { fieldName: 'confirmButtonisDisabled'}, |
| | | disabled: { fieldName: 'mergeConfirmButtonisDisabled'}, |
| | | value: 'Merge' |
| | | }, |
| | | initialWidth: 76, |
| | |
| | | { |
| | | label: "创建日期", |
| | | fieldName: "taskCreateddate", |
| | | type: "date-local", |
| | | typeAttributes:{ |
| | | weekday: "long", |
| | | year: "numeric", |
| | | month: "long", |
| | | day: "2-digit" |
| | | }, |
| | | type: "text", |
| | | // type: "date-local", |
| | | // typeAttributes:{ |
| | | // weekday: "long", |
| | | // year: "numeric", |
| | | // month: "long", |
| | | // day: "2-digit" |
| | | // }, |
| | | sortable: true , |
| | | wrapText: true, |
| | | }, |
| | |
| | | label: '合并', |
| | | name: 'Merge', |
| | | title: '合并', |
| | | disabled: { fieldName: 'confirmButtonisDisabled'}, |
| | | disabled: { fieldName: 'mergeConfirmButtonisDisabled'}, |
| | | value: 'Merge' |
| | | }, |
| | | initialWidth: 76, |
| | |
| | | var state = response.getState(); |
| | | if (state === "SUCCESS") { |
| | | var res = response.getReturnValue(); |
| | | // 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230804 by lc Start |
| | | for(var rowIndex = 0 ;rowIndex<res.myTasks.length;rowIndex++){ |
| | | if (res.myTasks[rowIndex].taskType == '盘点检查计划' || res.myTasks[rowIndex].taskType == '温湿度检查计划') { |
| | | res.myTasks[rowIndex]['cancelButtonisDisabled'] = true ; |
| | | res.myTasks[rowIndex]['assignButtonisDisabled_Owner'] = true ; |
| | | res.myTasks[rowIndex]['mergeConfirmButtonisDisabled'] = true ; |
| | | } |
| | | }; |
| | | |
| | | for(var rowIndex = 0 ;rowIndex<res.subTasks.length;rowIndex++){ |
| | | if (res.subTasks[rowIndex].taskType == '盘点检查计划' || res.subTasks[rowIndex].taskType == '温湿度检查计划') { |
| | | res.subTasks[rowIndex]['cancelButtonisDisabled'] = true ; |
| | | res.subTasks[rowIndex]['assignButtonisDisabled_Owner'] = true ; |
| | | res.subTasks[rowIndex]['mergeConfirmButtonisDisabled'] = true ; |
| | | } |
| | | }; |
| | | // 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230804 by lc End |
| | | cmp.set('v.data',res.myTasks); |
| | | cmp.set('v.data2',res.subTasks); |
| | | cmp.set('v.dataCopy',res.myTasks); |
| | |
| | | //后台方法的回调函数 |
| | | }, |
| | | //20210105 CHAN-BWX3YU you end |
| | | |
| | | // 排序逻辑设定 |
| | | sortBy: function(field, reverse, primer) { |
| | | var key = primer ? function(x) { |
| | |
| | | if (state === "SUCCESS") { |
| | | var res = response.getReturnValue(); |
| | | |
| | | // 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230804 by lc Start |
| | | for(var rowIndex = 0 ;rowIndex<res.myTasks.length;rowIndex++){ |
| | | if (res.myTasks[rowIndex].taskType == '盘点检查计划' || res.myTasks[rowIndex].taskType == '温湿度检查计划') { |
| | | res.myTasks[rowIndex]['cancelButtonisDisabled'] = true ; |
| | | res.myTasks[rowIndex]['assignButtonisDisabled_Owner'] = true ; |
| | | res.myTasks[rowIndex]['mergeConfirmButtonisDisabled'] = true ; |
| | | } |
| | | }; |
| | | cmp.set('v.data',res.myTasks); |
| | | cmp.set('v.dataCopy',res.myTasks); |
| | | // 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230804 by lc End |
| | | } |
| | | this.hideSpinner(cmp); |
| | | }); |
| | |
| | | Accept:function (cmp, row, action) { |
| | | cmp.set('v.ActivityDate',null); |
| | | cmp.set('v.feedbackPlanDate',null); |
| | | cmp.set('v.estimatedFinishDate', ''); |
| | | //除了记录类型为其他,且任务区分为上级分配任务时,其他都跳转事件页面 |
| | | if('其他'!=row.taskType){ |
| | | cmp.set("v.IsEventDefault", true); |
| | |
| | | } |
| | | //check end |
| | | //2021-10-19 mzy 任务管理改善 end |
| | | |
| | | // 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230804 by lc Start |
| | | // var estimatedFinishDate = cmp.get("v.estimatedFinishDate"); |
| | | var estimatedFinishDate = new Date(cmp.get("v.estimatedFinishDate")); |
| | | if (row.taskType == '盘点检查计划' || row.taskType == '温湿度检查计划') { |
| | | var estimatedFinishDate = cmp.get("v.estimatedFinishDate"); |
| | | |
| | | if (!estimatedFinishDate) { |
| | | alert('请输入预计完成时间!'); |
| | | return; |
| | | } |
| | | |
| | | var latestFinishDate = row.latestFinishDate; |
| | | if (estimatedFinishDate > latestFinishDate) { |
| | | alert('预计完成时间不能超过最晚完成日('+latestFinishDate+')'); |
| | | return; |
| | | } |
| | | } |
| | | // 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230804 by lc End |
| | | |
| | | var action = cmp.get("c.confirmOrDelay"); |
| | | action.setParams({ |
| | | "taskID" : row.id, |
| | |
| | | "delayReason" : '', |
| | | "IsGeneratePlan":IsGeneratePlan, //2021-10-20 mzy 任务管理改善 |
| | | "ActivityDate" : activityDate, //2021-10-20 mzy 任务管理改善 |
| | | "feedbackPlanDate" : feedbackPlanDate |
| | | "feedbackPlanDate" : feedbackPlanDate, |
| | | "estimatedFinishDate" : estimatedFinishDate, |
| | | "delayReasonOther" : '' |
| | | }); |
| | | //2021-10-20 mzy 任务管理改善 start |
| | | //需要生成计划才会跳转到事件页面,将任务Id带到事件页面 |
| | | if(IsGeneratePlan==true){ |
| | | // 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230804 by lc Start |
| | | if (row.taskType != '盘点检查计划' && row.taskType != '温湿度检查计划') { |
| | | window.open('/apex/SimpleEventRegister?taskId=' + row.id,'_blank'); |
| | | } |
| | | // 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230804 by lc End |
| | | } |
| | | //2021-10-20 mzy 任务管理改善 end |
| | | this.showSpinner(cmp); |
| | |
| | | rows[rowIndex]['taskStatus'] = '02 接受' ; |
| | | rows[rowIndex]['cancelButtonisDisabled'] = true ; |
| | | rows[rowIndex]['confirmButtonisDisabled'] = true ; |
| | | rows[rowIndex]['mergeConfirmButtonisDisabled'] = true ; |
| | | rows[rowIndex]['delayButtonisDisabled'] = true ; |
| | | rows[rowIndex]['assignButtonisDisabled_Owner'] = true ; //2021-10-20 mzy 任务管理改善 |
| | | cmp.set('v.data', rows); |
| | |
| | | cmp.set('v.tempisFSE',row.isFSE); |
| | | cmp.set('v.delayReason', ''); |
| | | cmp.set('v.delayReasonOther', ''); |
| | | cmp.set('v.estimatedFinishDate', ''); |
| | | cmp.set('v.delayIsOpen', true); |
| | | }, |
| | | //确认取消 |
| | |
| | | rows[rowIndex]['taskStatus'] = '04 取消' ; |
| | | rows[rowIndex]['cancelButtonisDisabled'] = true ; |
| | | rows[rowIndex]['confirmButtonisDisabled'] = true ; |
| | | rows[rowIndex]['mergeConfirmButtonisDisabled'] = true ; |
| | | rows[rowIndex]['delayButtonisDisabled'] = true ; |
| | | rows[rowIndex]['assignButtonisDisabled_Owner'] = true ; //2021-10-20 mzy 任务管理改善 |
| | | cmp.set('v.data', rows); |
| | |
| | | if(delayReason == '其他' && !delayReasonOther){ |
| | | alert('延期理由(选项)为其他时请输入延期理由(其他)!'); |
| | | return; |
| | | |
| | | } |
| | | // 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230804 by lc Start |
| | | // var estimatedFinishDate = cmp.get("v.estimatedFinishDate"); |
| | | var estimatedFinishDate = new Date(cmp.get("v.estimatedFinishDate")); |
| | | if (tempdata.taskType == '盘点检查计划' || tempdata.taskType == '温湿度检查计划') { |
| | | var estimatedFinishDate = cmp.get("v.estimatedFinishDate"); |
| | | |
| | | if (!estimatedFinishDate) { |
| | | alert('请输入延期至时间!'); |
| | | return; |
| | | } |
| | | |
| | | var createdAfter3Month = tempdata.createdAfter3Month; |
| | | if (estimatedFinishDate > createdAfter3Month) { |
| | | alert('延期至时间不能超过('+createdAfter3Month+')'); |
| | | return; |
| | | } |
| | | } |
| | | // 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230804 by lc End |
| | | |
| | | var action = cmp.get("c.confirmOrDelay"); |
| | | action.setParams({ |
| | | "taskID" : tempdata.id, |
| | | "isDelay" : true, |
| | | "delayReason" : delayReason, |
| | | "delayReasonOther" : delayReasonOther, |
| | | "estimatedFinishDate" : estimatedFinishDate, |
| | | }); |
| | | this.showSpinner(cmp); |
| | | action.setCallback(this, function(response) { |
| | |
| | | rows[rowIndex]['taskStatus'] = '05 延期' ; |
| | | rows[rowIndex]['cancelButtonisDisabled'] = true ; |
| | | rows[rowIndex]['confirmButtonisDisabled'] = true ; |
| | | rows[rowIndex]['mergeConfirmButtonisDisabled'] = true ; |
| | | rows[rowIndex]['delayButtonisDisabled'] = true ; |
| | | rows[rowIndex]['assignButtonisDisabled_Owner'] = true ; //2021-11-11 mzy 任务管理改善 |
| | | cmp.set('v.data', rows); |
| | |
| | | }); |
| | | $A.enqueueAction(action); |
| | | |
| | | |
| | | // 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230804 by lc Start |
| | | if (tempdata.taskType != '盘点检查计划' && tempdata.taskType != '温湿度检查计划') { |
| | | window.open('/apex/SimpleEventRegister?isDelay=true&taskId=' + tempdata.id ,'_blank'); |
| | | |
| | | } |
| | | // 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230804 by lc End |
| | | }, |
| | | // 确认重新分配 |
| | | ConfirmAssign: function(cmp, event) { |
| | |
| | | rows[rowIndex]['taskAssigneeName'] = res.assigneeName ; |
| | | rows[rowIndex]['cancelButtonisDisabled'] = true ; |
| | | rows[rowIndex]['confirmButtonisDisabled'] = true ; |
| | | rows[rowIndex]['mergeConfirmButtonisDisabled'] = true ; |
| | | rows[rowIndex]['delayButtonisDisabled'] = true ; |
| | | rows[rowIndex]['assignButtonisDisabled_Owner'] = true ; |
| | | cmp.set('v.data', rows); |
| | |
| | | //弹出 错误提示 |
| | | showErrorToast : function(cmp) { |
| | | $A.util.removeClass(cmp.find('errorDiv'), 'slds-hide'); |
| | | window.setTimeout($A.getCallback(function() { |
| | | $A.util.addClass(cmp.find('errorDiv'), 'slds-hide'); |
| | | }), |
| | | 5000 |
| | | ); |
| | | // window.setTimeout($A.getCallback(function() { |
| | | // $A.util.addClass(cmp.find('errorDiv'), 'slds-hide'); |
| | | // }), |
| | | // 5000 |
| | | // ); |
| | | }, |
| | | //弹出 错误提示 文字较多,显示持续10秒 - 2021-11-12 yjk |
| | | showErrorToastLongTime : function(cmp) { |
| | | $A.util.removeClass(cmp.find('errorDiv'), 'slds-hide'); |
| | | window.setTimeout($A.getCallback(function() { |
| | | $A.util.addClass(cmp.find('errorDiv'), 'slds-hide'); |
| | | }), |
| | | 10000 |
| | | ); |
| | | // window.setTimeout($A.getCallback(function() { |
| | | // $A.util.addClass(cmp.find('errorDiv'), 'slds-hide'); |
| | | // }), |
| | | // 10000 |
| | | // ); |
| | | }, |
| | | // function automatic called by aura:waiting event |
| | | showSpinner: function(cmp) { |
| | |
| | | }, |
| | | //wangweipeng 获取url的参数 2021/09/27 start |
| | | getURLParameterValue: function() { |
| | | var querystring = location.search.substr(1); |
| | | var querystring = window.location.search.substr(1); |
| | | var paramValue = {}; |
| | | querystring.split("&").forEach(function(part) { |
| | | var param = part.split("="); |
| | |
| | | * @Description: |
| | | * @version: |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-09-09 13:27:58 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-12 17:40:11 |
| | | */ |
| | | /* |
| | | * @Description: |
| | | * @version: |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-12 11:16:07 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-08 16:57:51 |
| | | * @LastEditTime: 2023-09-08 16:58:57 |
| | | */ |
| | | public with sharing class OpportunityLightingButtonController { |
| | | @AuraEnabled |
| | |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static Id queryForProfileId(){ |
| | | |
| | | return UserInfo.getProfileId(); |
| | | } |
| | | @AuraEnabled |
| | | public static InitData initForPredictedDateChangeButton(String recordId){ |
| | | InitData res = new InitData(); |
| | |
| | | public integer secondNum {get; set;} |
| | | // add tcm 20211122 end |
| | | |
| | | public Decimal InclusionUltrasound {get; set;} //20230506 lt DB202304618804 包含超声 add |
| | | |
| | | |
| | | // 竞争对手对照关系表,key是品牌名字,value是ID |
| | | public map<string,id> CompetitionMap; |
| | |
| | | Lost_reason_main__c, |
| | | Lost_Reason_Sub__c,Lost_By_Company__c, |
| | | LostTotalAmount__c,LostType__c, |
| | | TotalAmountLost__c, //20230215 lt DB202302247719 |
| | | InclusionUltrasound__c, //20230506 lt DB202304618804 包含超声 |
| | | ModifyAfterApproval__c,Approved_Day__c,//20230814 lt DB202308068183 失单报告审批节点增加助理审批节点 add |
| | | Report_Status__c,Sales_assistant__c, |
| | | Opportunity__c, Opportunity__r.Sales_assistant_ID__c, |
| | | Opportunity__r.Sales_manager_departmentID__c, |
| | |
| | | pageStatus = null; |
| | | return; |
| | | } |
| | | |
| | | InclusionUltrasound = lostReportList[0].InclusionUltrasound__c; //20230506 lt DB202304618804 包含超声 |
| | | |
| | | lostReportList[0].Sales_assistant__c = |
| | | lostReportList[0].Opportunity__r.Sales_assistant_ID__c; |
| | | lostReportList[0].Manager_sales__c = |
| | |
| | | lostReportList[0].LostType__c ='部分失单'; |
| | | } |
| | | // 权限,如果当前状态不是草案中,那么需要跳转到只读页面 |
| | | if(!'草案'.equals(lostReportList[0].Report_Status__c) && userinfo.getProfileId() != (ID) '00e10000000Y3o5AAC') { |
| | | // 20230814 lt DB202308068183 失单报告审批节点增加助理审批节点 strat 改if条件 |
| | | //原:!'草案'.equals(lostReportList[0].Report_Status__c) && userinfo.getProfileId() != (ID) '00e10000000Y3o5AAC' |
| | | if( |
| | | !('草案'.equals(lostReportList[0].Report_Status__c) |
| | | || userinfo.getProfileId() == (ID) '00e10000000Y3o5AAC' |
| | | ||('批准'.equals(lostReportList[0].Report_Status__c) && |
| | | System.Label.PCLReportProfileId.contains(userinfo.getProfileId())) |
| | | ) |
| | | ) { |
| | | // 20230814 lt DB202308068183 失单报告审批节点增加助理审批节点 end 改if条件 |
| | | pageStatus = 'View'; |
| | | } |
| | | oppId = lostReportList[0].Opportunity__c; |
| | |
| | | list<PCLLostBrand__c> selectlostBrandList = |
| | | [ |
| | | select id, LostPrice__c, Lost_By_Company__c, |
| | | LostPrices_ThousandY__c, //20230215 lt DB202302247719 |
| | | Lost_reason_main__c,Lost_Reason_Sub__c,Name,Agency__c, AgencyMannual__c, |
| | | // ProductCategory__c,ProductClass__c, |
| | | Lost_cancel_report__c,Lost_By_Company_Mannual__c, |
| | |
| | | system.debug('check products:'+ (templostBrand.PCLLostBrandProduct__r != null) + '|' + (templostBrand.PCLLostBrandProduct__r.size() > 0)); |
| | | if (templostBrand.PCLLostBrandProduct__r != null && templostBrand.PCLLostBrandProduct__r.size() > 0) { |
| | | for( PCLLostProduct__c tempProduct: templostBrand.PCLLostBrandProduct__r) { |
| | | |
| | | tempProductList.add(new PCLLostProducts(productCount,tempProduct)); |
| | | productCount++; |
| | | } |
| | |
| | | } |
| | | // 编辑 只有系统管理员或者草案中可以编辑 |
| | | public PageReference edit2(){ |
| | | //20230814 lt DB202308068183 失单报告审批节点增加助理审批节点 start |
| | | if( userinfo.getProfileId() == (ID) '00e10000000Y3o5AAC' || |
| | | '草案'.equals(LostReport.LostReport.Report_Status__c) |
| | | '草案'.equals(LostReport.LostReport.Report_Status__c) || |
| | | ('批准'.equals(LostReport.LostReport.Report_Status__c) && |
| | | System.Label.PCLReportProfileId.contains(userinfo.getProfileId()) |
| | | ) |
| | | ) { |
| | | //20230814 lt DB202308068183 失单报告审批节点增加助理审批节点 end |
| | | pageStatus = 'Edit'; |
| | | init(); |
| | | } |
| | |
| | | } |
| | | // 当失单品牌名为其他时,报错字段为失单对手型号(手动) thh 2022-01-17 end |
| | | // update tcm 20211123 end |
| | | // 20230418 ljh DB202304320022 start |
| | | String LostBrandNameS = tempLostBrand.lostBrand.Lost_By_Company__c != '其他'?tempLostBrand.lostBrand.Lost_By_Company__c:tempLostBrand.lostBrand.Lost_By_Company_Mannual__c; |
| | | String LostBrandName = temlostProduct.LostProductss.LostBrandName__c; |
| | | if(LostBrandNameS != LostBrandName){ |
| | | temlostProduct.LostProductss.LostBrandName__c.addError('失单品牌名不一致,请确认'); |
| | | dataCheck = false; |
| | | } |
| | | // 20230418 ljh DB202304320022 end |
| | | |
| | | } |
| | | // 当失单品牌名为其他时,报错字段为失单对手型号(手动) thh 2022-01-17 start |
| | | if (productCount == 0 && tempLostBrand.LostProducts != null && tempLostBrand.LostProducts.size() > 0) { |
| | |
| | | // 设置记录类型 |
| | | LostReport.lostReport.recordTypeID = LostReport.lostReport.LostType__c== '失单'?Schema.SObjectType.Lost_cancel_report__c.getRecordTypeInfosByDeveloperName().get('PCL_Lost_report').getRecordTypeId() : Schema.SObjectType.Lost_cancel_report__c.getRecordTypeInfosByDeveloperName().get('PCL_PartLost_report').getRecordTypeId(); |
| | | LostReport.lostReport.LostTotalAmount__c = 0; |
| | | LostReport.lostReport.TotalAmountLost__c = 0; //20230215 lt DB202302247719 |
| | | LostReport.lostReport.of_lost_system_processor__c = 0; |
| | | LostReport.lostReport.Lost_reason_main__c = null; |
| | | LostReport.lostReport.Lost_Reason_Sub__c = null; |
| | | LostReport.lostReport.Lost_By_Company__c = null; |
| | | //20230814 lt DB202308068183 失单报告审批节点增加助理审批节点 start |
| | | //批准日不为空时给修改后再批准赋值 |
| | | if(LostReport.lostReport.Approved_Day__c != null){ |
| | | LostReport.lostReport.ModifyAfterApproval__c = true; |
| | | } |
| | | //20230814 lt DB202308068183 失单报告审批节点增加助理审批节点 end |
| | | for(LostBrand tempLostBrand : LostReport.LostBrands) { |
| | | if(string.isNotBlank(tempLostBrand.lostBrand.Lost_By_Company__c)) { |
| | | LostReport.lostReport.LostTotalAmount__c += tempLostBrand.lostBrand.LostPrice__c; |
| | | //20230215 lt DB202302247719 start |
| | | Decimal med = tempLostBrand.lostBrand.LostPrice__c/1.13/1000; |
| | | Decimal med1 = med.setScale(2); |
| | | // System.debug('---lt123不含税数值(人工)Decimal---'+med); |
| | | // System.debug('---lt123不含税数值(人工)Decimal两位小数---'+med1); |
| | | LostReport.lostReport.TotalAmountLost__c += med1; |
| | | //LostReport.lostReport.TotalAmountLost__c += tempLostBrand.lostBrand.LostPrices_ThousandY__c; //20230215 lt DB202302247719 |
| | | // LostReport.lostReport.TotalAmountLost__c += tempLostBrand.lostBrand.LostPrice__c/1.13/1000; //20230215 lt DB202302247719 |
| | | //20230215 lt DB202302247719 en |
| | | |
| | | LostReport.lostReport.Lost_reason_main__c = |
| | | LostReport.lostReport.Lost_reason_main__c == null |
| | | ? tempLostBrand.lostBrand.Lost_reason_main__c |
| | |
| | | LostReport.lostReport = templostReport; |
| | | LostReport.LostBrands = tempBrands; |
| | | // 这里需要写一些报错信息 |
| | | System.debug('---lt123---'+ex.getLineNumber()); |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error,ex.getMessage())); |
| | | return false; |
| | | } |
| | |
| | | } |
| | | // 提交 |
| | | public PageReference submit(){ |
| | | if(!'草案'.equals(LostReport.LostReport.Report_Status__c) ) { |
| | | //20230814 lt DB202308068183 失单报告审批节点增加助理审批节点 update |
| | | //&& LostReport.LostReport.ModifyAfterApproval__c == false |
| | | if(!'草案'.equals(LostReport.LostReport.Report_Status__c) && LostReport.LostReport.ModifyAfterApproval__c == false) { |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, '只有在草案中才能提交申请!')); |
| | | return null; |
| | | } |
| | | |
| | | // 20230629 wkx DB202306242764 start |
| | | //20230814 lt DB202308068183 失单报告审批节点增加助理审批节点 add lcrlist1 |
| | | //DB202308068183 add (不等于当前失单报告,批准后再修改用) |
| | | list<Lost_cancel_report__c> lcrlist1=[select id,Opportunity__c from Lost_cancel_report__c where Opportunity__c=:oppid and id!=:lostReportId limit 1]; |
| | | list<opportunity> opplist1=[select id,cnt_lost_cancel_report__c,cnt_lost_cancel_draft__c from Opportunity where id=:oppid limit 1]; |
| | | if (opplist1[0].cnt_lost_cancel_report__c - opplist1[0].cnt_lost_cancel_draft__c > 0 && lcrlist1.size() > 0) { |
| | | ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, '已存在 询价失单/取消 报告!')); |
| | | return null; |
| | | } |
| | | // 20230629 wkx DB202306242764 end |
| | | |
| | | Savepoint sp = Database.setSavepoint(); |
| | | try{ |
| | | LostReport.lostReport.Report_Status__c = '提交'; |
| | | update LostReport.lostReport; |
| | | Approval.ProcessSubmitRequest psr = new Approval.ProcessSubmitRequest(); |
| | | psr.setObjectId(lostReportId); |
| | | Approval.ProcessResult submitResult = Approval.process(psr); |
| | | //20230814 lt DB202308068183 失单报告审批节点增加助理审批节点 start 注释 |
| | | //DB202308068183 进 进程生成器 |
| | | // Approval.ProcessSubmitRequest psr = new Approval.ProcessSubmitRequest(); |
| | | // psr.setObjectId(lostReportId); |
| | | // Approval.ProcessResult submitResult = Approval.process(psr); |
| | | //20230814 lt DB202308068183 失单报告审批节点增加助理审批节点 end 注释 |
| | | PageReference page = new PageReference('/apex/PCLLostReportPage'); |
| | | page.getParameters().put('Id', lostReportId); |
| | | page.getParameters().put('pageStatus', 'View'); |
| | |
| | | system.debug('brandNo:'+brandNo); |
| | | LostBrand tempLostBrand = LostReport.LostBrands.get(brandNo); |
| | | // PCLLostProduct__c plp = new PCLLostProduct__c(Competitor__c=CompetitionMap.get(LostReport.LostBrands[brandNo].lostBrand.Lost_By_Company__c)); |
| | | string brandName = tempLostBrand.lostBrand.Lost_By_Company__c; |
| | | // 20230418 ljh DB202304320022 start |
| | | // string brandName = tempLostBrand.lostBrand.Lost_By_Company__c; |
| | | string brandName = tempLostBrand.lostBrand.Lost_By_Company__c != '其他'?tempLostBrand.lostBrand.Lost_By_Company__c:tempLostBrand.lostBrand.Lost_By_Company_Mannual__c; |
| | | // 20230418 ljh DB202304320022 end |
| | | PCLLostProduct__c plp = new PCLLostProduct__c(); |
| | | plp.LostBrandName__c = brandName; |
| | | tempLostBrand.LostProducts.add(new PCLLostProducts(tempLostBrand.LostProducts.size(),plp)); |
| | |
| | | } |
| | | |
| | | public void updateSolutionProgrammeAndProjectStatus(){ |
| | | system.debug('beforeUpdate'); |
| | | Map<Id,SolutionProjectRequirements__c> solutionProJectMap = new Map<Id,SolutionProjectRequirements__c>(); |
| | | List<SolutionProjectRequirements__c> solutionProJectList = [select id,Status__c,First_Proposal_Time__c from SolutionProjectRequirements__c where id = :solProjectId]; |
| | | for(SolutionProjectRequirements__c solProject : solutionProJectList){ |
| | |
| | | if(solutionPro.RejectedInvalid__c == true){ |
| | | solutionPro.addError('请填写反馈结果,并按审批按钮'); |
| | | } |
| | | if(solutionPro.ProcessOfApproval__c == true && (solutionPro.Confirmation_Result__c == null || solutionPro.Confirmation_Result__c == '')){ |
| | | solutionPro.addError('批准之前必须填写反馈结果!'); |
| | | } |
| | | // if(solutionPro.ProcessOfApproval__c == true && (solutionPro.Confirmation_Result__c == null || solutionPro.Confirmation_Result__c == '')){ |
| | | // solutionPro.addError('批准之前必须填写反馈结果!'); |
| | | // } |
| | | if(solutionPro.ProcessOfApproval__c == true && solutionPro.Confirmation_Result__c != null && solutionPro.Confirmation_Result__c != ''){ |
| | | if(solutionPro.Confirmation_Result__c == '01采纳/部分采纳'){ |
| | | system.debug('01采纳/部分采纳'); |
| | | solutionPro.Status__c = '03采纳/部分采纳'; |
| | | // solutionPro.Scheme_Type__c = '结案'; |
| | | solutionPro.ProcessOfApproval__c = false; |
| | |
| | | } |
| | | } |
| | | if(solutionPro.Confirmation_Result__c == '02未采纳'){ |
| | | system.debug('02未采纳'); |
| | | solutionPro.Status__c = '04未采纳'; |
| | | // solutionPro.Scheme_Type__c = '结案'; |
| | | solutionPro.ProcessOfApproval__c = false; |
| | |
| | | public with sharing class lexAccountController { |
| | | @AuraEnabled |
| | | public static InitData init(String recordId){ |
| | | InitData res = new InitData(); |
| | | try { |
| | | Account acc = [ |
| | | select |
| | | Name |
| | | from Account where Id =: recordId |
| | | ]; |
| | | res.name = acc.Name; |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | return res; |
| | | } |
| | | @AuraEnabled |
| | | public static InitData initForNewSolutonProButton(String recordId){ |
| | | InitData res = new InitData(); |
| | | try { |
| | |
| | | public String recordTypeId; |
| | | @AuraEnabled |
| | | public String hospitalDepartmentClass; |
| | | @AuraEnabled |
| | | public String name; |
| | | } |
| | | } |
| New file |
| | |
| | | public with sharing class lexAgencyHospitalLinkController { |
| | | @AuraEnabled |
| | | public static string initForCreateAgencyContact(String recordId){ |
| | | |
| | | try { |
| | | |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>58.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | public with sharing class lexLostCancelReportController { |
| | | @AuraEnabled |
| | | public static InitData initSubmitReportButton(String recordId){ |
| | | InitData res = new InitData(); |
| | | try { |
| | | Lost_Cancel_Report__c report = [ |
| | | select |
| | | Opportunity__c |
| | | from Lost_Cancel_Report__c where Id =: recordId |
| | | ]; |
| | | Opportunity opp = [ |
| | | select |
| | | Cnt_Lost_cancel_report__c, |
| | | Cnt_Lost_cancel_Draft__c |
| | | from Opportunity where Id =: report.Opportunity__c |
| | | ]; |
| | | res.cntLostCancelDraft = opp.Cnt_Lost_cancel_Draft__c; |
| | | res.cntLostCancelReport = opp.Cnt_Lost_cancel_report__c; |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | return res; |
| | | } |
| | | @AuraEnabled |
| | | public static InitData initForEditCancelReport(String recordId){ |
| | | InitData res = new InitData(); |
| | | try { |
| | | Lost_cancel_report__c report = [ |
| | | select Id, |
| | | RecordTypeId, |
| | | Opportunity__c, |
| | | LostType__c , |
| | | Report_Status__c from Lost_cancel_report__c where id =: recordId |
| | | ]; |
| | | res.recordTypeId = report.RecordTypeId; |
| | | res.lostType = report.LostType__c; |
| | | res.reportStatus = report.Report_Status__c; |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | return res; |
| | | } |
| | | @AuraEnabled |
| | | public static string updateSubmitReportButton(String recordId){ |
| | | Savepoint sp = Database.setSavepoint(); |
| | | Lost_cancel_report__c report = new Lost_cancel_report__c(); |
| | | try { |
| | | report.Id = recordId; |
| | | report.Report_Status__c = '提交'; |
| | | update report; |
| | | // Approval.ProcessSubmitRequest psr = new Approval.ProcessSubmitRequest(); |
| | | // psr.setObjectId(report.Id); |
| | | // Approval.ProcessResult submitResult = Approval.process(psr); |
| | | return null; |
| | | } catch (Exception e) { |
| | | Database.rollback(sp); |
| | | if (e.getMessage().contains(',')) { |
| | | System.debug(LoggingLevel.INFO, '*** e: ' + e); |
| | | String exc = '' + e.getMessage(); |
| | | Integer left = exc.indexOf(':') + 1; |
| | | Integer right = exc.lastIndexOf(':'); |
| | | String str = exc.substring(left,right); |
| | | left = str.indexOf(',') + 1; |
| | | String newStr = str.substring(left); |
| | | return newStr; |
| | | }else { |
| | | return e.getMessage(); |
| | | } |
| | | } |
| | | } |
| | | class InitData { |
| | | @AuraEnabled |
| | | public Decimal cntLostCancelReport; |
| | | @AuraEnabled |
| | | public Decimal cntLostCancelDraft; |
| | | @AuraEnabled |
| | | public String recordTypeId; |
| | | @AuraEnabled |
| | | public String lostType; |
| | | @AuraEnabled |
| | | public String reportStatus; |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>58.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | |
| | | LostTotalAmount__c,LostType__c, |
| | | Report_Status__c,Sales_assistant__c, |
| | | InclusionUltrasound__c, //20230506 lt DB202304618804 包含超声 |
| | | ModifyAfterApproval__c,Approved_Day__c,//20230814 lt DB202308068183 失单报告审批节点增加助理审批节点 add |
| | | Opportunity__c, Opportunity__r.Sales_assistant_ID__c, |
| | | Opportunity__r.Sales_manager_departmentID__c, |
| | | Manager_sales__c,recordtypeid,recordtype.DeveloperName |
| | |
| | | report.lostReport.Lost_reason_main__c = null; |
| | | report.lostReport.Lost_Reason_Sub__c = null; |
| | | report.lostReport.Lost_By_Company__c = null; |
| | | //批准日不为空时给修改后再批准赋值 |
| | | if(LostReport.lostReport.Approved_Day__c != null){ |
| | | LostReport.lostReport.ModifyAfterApproval__c = true; |
| | | } |
| | | for(LostBrand tempLostBrand : report.LostBrands) { |
| | | if(string.isNotBlank(tempLostBrand.lostBrand.Lost_By_Company__c)) { |
| | | report.lostReport.LostTotalAmount__c += tempLostBrand.lostBrand.LostPrice__c; |
| | |
| | | public static Map<string,Object> submit(String report1,String reportId){ |
| | | LostReport report = (LostReport)JSON.deserialize(report1, LostReport.class); |
| | | Map<string,string> messages = new Map<string,string>(); |
| | | if(!'草案'.equals(report.lostReport.Report_Status__c) ) { |
| | | if(!'草案'.equals(report.lostReport.Report_Status__c) && LostReport.LostReport.ModifyAfterApproval__c == false) { |
| | | messages.put('error', '只有在草案中才能提交申请!'); |
| | | return messages; |
| | | } |
| | |
| | | update so; |
| | | return ''; |
| | | } catch (Exception e) { |
| | | if(e.getMessage().contains(':')){ |
| | | String eMsg = e.getMessage(); |
| | | Integer left = eMsg.indexOf(',')+1; |
| | | Integer right = eMsg.lastindexOf('。')+1; |
| | | return eMsg.substring(left,right); |
| | | }else{ |
| | | return e.getMessage(); |
| | | } |
| | | } |
| | | } |
| | | //提交审批 |
| | | @AuraEnabled |
| | | public static String submitApproval(String recordId){ |
| | |
| | | res.departmentClassId = so.Department_Class__c; |
| | | res.productLeader = so.Product_Leader__c; |
| | | res.userId = UserInfo.getUserId(); |
| | | res.userName = UserInfo.getUserName(); |
| | | res.userName = [select Name from User where Id =: res.userId].Name; |
| | | maps.put('res', res); |
| | | } catch (Exception e) { |
| | | String message = e.getMessage(); |
| | |
| | | } |
| | | // 确认或者延期 |
| | | @AuraEnabled |
| | | public static string confirmOrDelay(boolean isDelay, string delayReason, string delayReasonOther, string taskID,Boolean IsGeneratePlan,Date ActivityDate,Date feedbackPlanDate) { |
| | | public static string confirmOrDelay(boolean isDelay, string delayReason, string delayReasonOther, string taskID,Boolean IsGeneratePlan,Date ActivityDate,Date feedbackPlanDate,Date estimatedFinishDate) { |
| | | //2021-07-30 mzy SWAG-C5DAX8 update start |
| | | UserResult u = UserInfo_Owner(); |
| | | //2021-07-30 mzy SWAG-C5DAX8 update end |
| | |
| | | tempTask.feedbackPlanDate__c = feedbackPlanDate; |
| | | } |
| | | //2021-10-20 mzy 任务管理改善 end |
| | | |
| | | // 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230804 by lc Start |
| | | Task__c tempObj = [SELECT Id, taskType__c FROM Task__c WHERE Id =: taskID]; |
| | | if (tempObj.taskType__c == '盘点检查计划' || tempObj.taskType__c == '温湿度检查计划') { |
| | | if (isDelay) { |
| | | tempTask.taskStatus__c = '05 延期'; |
| | | tempTask.delayDate__c = Date.today(); |
| | | tempTask.delayToDate__c = estimatedFinishDate; |
| | | } else { |
| | | tempTask.taskStatus__c = '02 接受'; |
| | | tempTask.ConfirmDate__c = Date.today(); |
| | | tempTask.Estimated_Finish_Date__c = estimatedFinishDate; |
| | | } |
| | | } |
| | | // 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230804 by lc End |
| | | |
| | | update tempTask; |
| | | //成功返回更新成功 |
| | |
| | | //2021-11-25 mzy 任务管理改善 start |
| | | 'HopeCompletionDate__c,'+ |
| | | //2021-11-25 mzy 任务管理改善 end |
| | | // 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230804 by lc Start |
| | | 'Estimated_Finish_Date__c,LatestFinishDate__c,'+ |
| | | // 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230804 by lc End |
| | | 'taskStatus__c,taskType__c,Assignment_Date__c from task__c where assignee__c =: userIDList and mergeTaskMain__c = null ' + |
| | | //2021-1-4 yjk 增加任务区分,只查询被动和上级分配 |
| | | //' and TaskDifferent__c != \'主动任务\' '; |
| | |
| | | tempTaskWrapper.assignButtonisDisabled = false; |
| | | //20210111 CHAN-BWX3YU you start |
| | | tempTaskWrapper.assignButtonisDisabled_Owner = false; |
| | | |
| | | //【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230804 by lc Start |
| | | tempTaskWrapper.createdAfter3Month = tempTask.CreateDate__c.addMonths(3); |
| | | tempTaskWrapper.latestFinishDate = tempTask.LatestFinishDate__c; |
| | | //【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230804 by lc End |
| | | |
| | | Date d2 = date.today().addDays(-2); |
| | | Date createdate1= date.newinstance(tempTask.CreateDate__c.year(), tempTask.CreateDate__c.month(), tempTask.CreateDate__c.day()); |
| | |
| | | @AuraEnabled |
| | | public Date HopeCompletionDate; |
| | | //2021-11-25 任务管理改善 mzy |
| | | //【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230804 by lc Start |
| | | @AuraEnabled |
| | | public Date createdAfter3Month; |
| | | @AuraEnabled |
| | | public Date latestFinishDate; |
| | | //【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230804 by lc End |
| | | } |
| | | public class pickerWrapper { |
| | | @AuraEnabled |
| | |
| | | /* |
| | | * @Description: |
| | | * @version: |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-09-09 13:31:12 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-11 14:43:12 |
| | | */ |
| | | import { LightningElement,wire,track,api} from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | |
| | | const defaultValues = encodeDefaultFieldValues({ |
| | | old_Project_No__c: this.recordId, |
| | | Department_Class__c: this.departmentClassId, |
| | | Hospital__c: this.hospitalId |
| | | Hospital__c: this.hospitalId, |
| | | Name: '*' |
| | | }); |
| | | this[NavigationMixin.Navigate]({ |
| | | type: 'standard__objectPage', |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-13 15:55:45 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-04-13 16:04:14 |
| | | * @LastEditTime: 2023-09-11 15:50:12 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-07 09:02:03 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-05-09 17:42:28 |
| | | * @LastEditTime: 2023-09-11 14:32:05 |
| | | */ |
| | | import { LightningElement,wire,track,api} from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-07 09:02:03 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-04-11 11:18:36 |
| | | * @LastEditTime: 2023-09-11 13:53:55 |
| | | */ |
| | | import { LightningElement,wire,track,api} from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-05-15 13:17:26 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-06-02 10:59:13 |
| | | * @LastEditTime: 2023-09-11 15:53:23 |
| | | */ |
| | | /* |
| | | * @Description: |
| | |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-21 14:32:09 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-06-05 11:09:35 |
| | | * @LastEditTime: 2023-09-12 11:39:47 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import init from '@salesforce/apex/OpportunityLightingButtonController.initForCopyWithAssetButton'; |
| | | import initCopy from '@salesforce/apex/OpportunityLightingButtonController.initCopy'; |
| | | import { NavigationMixin } from 'lightning/navigation'; |
| | | import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils'; |
| | | export default class LexCopyWithAsset extends NavigationMixin(LightningElement) { |
| | |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | |
| | | copyWithAsset(){ |
| | | if(this.sapSendOK){ |
| | | this.showToast("询价已经WIN,不能进行拆单","error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } else { |
| | | // window.open( |
| | | // "/" |
| | |
| | | // + this.isAuthorized |
| | | // + "&00N10000008pnmd=1&00N10000002Cb9P=&00N10000002DItz=&00N10000003O9oO=&00N10000003O9o4=&00N10000002CYHy=&00Np00000030gzb=&00Np0000002ajGe=&00Np00000034Qlb"); |
| | | |
| | | const defaultValues = encodeDefaultFieldValues({ |
| | | Old_Opportunity_ID__c: this.recordId, |
| | | IsAuthorized__c: this.isAuthorized |
| | | }); |
| | | initCopy({ |
| | | recordId: this.recordId |
| | | }).then(result=>{ |
| | | var changeData = 'Old_Opportunity_ID__c=' + this.recordId |
| | | + ',IsAuthorized__c=' + this.isAuthorized |
| | | + ',SeparateBillMark__c=1' |
| | | + ',NotesApprovedNo__c=' |
| | | + ',Assistant_Applied_Date__c=' |
| | | + ',Contract_DB_SalesDept_complite_day__c=' |
| | | + ',Closing_Bid_Date__c='; |
| | | console.log(result); |
| | | this[NavigationMixin.Navigate]({ |
| | | type: 'standard__objectPage', |
| | | attributes: { |
| | | objectApiName: 'Opportunity', |
| | | actionName: 'clone', |
| | | recordId: this.recordId |
| | | actionName: 'new', |
| | | objectApiName: 'Opportunity' |
| | | }, |
| | | state: { |
| | | nooverride: '1', |
| | | defaultFieldValues: defaultValues |
| | | defaultFieldValues: result + ',' + changeData |
| | | } |
| | | }); |
| | | } |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | import { createElement } from 'lwc'; |
| | | import LexCreateAgencyContact from 'c/lexCreateAgencyContact'; |
| | | |
| | | describe('c-lex-create-agency-contact', () => { |
| | | afterEach(() => { |
| | | // The jsdom instance is shared across test cases in a single file so reset the DOM |
| | | while (document.body.firstChild) { |
| | | document.body.removeChild(document.body.firstChild); |
| | | } |
| | | }); |
| | | |
| | | it('TODO: test case generated by CLI command, please fill in test logic', () => { |
| | | // Arrange |
| | | const element = createElement('c-lex-create-agency-contact', { |
| | | is: LexCreateAgencyContact |
| | | }); |
| | | |
| | | // Act |
| | | document.body.appendChild(element); |
| | | |
| | | // Assert |
| | | // const div = element.shadowRoot.querySelector('div'); |
| | | expect(1).toBe(1); |
| | | }); |
| | | }); |
| New file |
| | |
| | | <template> |
| | | |
| | | </template> |
| New file |
| | |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { NavigationMixin } from 'lightning/navigation'; |
| | | import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils'; |
| | | |
| | | export default class LexCreateAgencyContact extends NavigationMixin(LightningElement) { |
| | | @api recordId; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | | console.log(111); |
| | | console.log(currentPageReference); |
| | | |
| | | if (currentPageReference) { |
| | | const urlValue = currentPageReference.state.recordId; |
| | | if (urlValue) { |
| | | let str = `${urlValue}`; |
| | | console.log("str"); |
| | | console.log(str); |
| | | this.recordId = str; |
| | | } |
| | | } |
| | | } |
| | | connectedCallback(){ |
| | | const defaultValues = encodeDefaultFieldValues({ |
| | | Agency_Hospital__c: this.recordId |
| | | }); |
| | | |
| | | this[NavigationMixin.Navigate]({ |
| | | type: 'standard__objectPage', |
| | | attributes: { |
| | | objectApiName: 'Agency_Contact__c', |
| | | actionName: 'new' |
| | | }, |
| | | state: { |
| | | // nooverride: '1', |
| | | defaultFieldValues: defaultValues |
| | | } |
| | | }); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>54.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-07 09:02:03 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-04-11 11:23:37 |
| | | * @LastEditTime: 2023-09-11 13:53:31 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| New file |
| | |
| | | import { createElement } from 'lwc'; |
| | | import LexEditCancelReport from 'c/lexEditCancelReport'; |
| | | |
| | | describe('c-lex-edit-cancel-report', () => { |
| | | afterEach(() => { |
| | | // The jsdom instance is shared across test cases in a single file so reset the DOM |
| | | while (document.body.firstChild) { |
| | | document.body.removeChild(document.body.firstChild); |
| | | } |
| | | }); |
| | | |
| | | it('TODO: test case generated by CLI command, please fill in test logic', () => { |
| | | // Arrange |
| | | const element = createElement('c-lex-edit-cancel-report', { |
| | | is: LexEditCancelReport |
| | | }); |
| | | |
| | | // Act |
| | | document.body.appendChild(element); |
| | | |
| | | // Assert |
| | | // const div = element.shadowRoot.querySelector('div'); |
| | | expect(1).toBe(1); |
| | | }); |
| | | }); |
| New file |
| | |
| | | <template> |
| | | <div class="Holder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | import { LightningElement, track, wire, api } from 'lwc'; |
| | | import {CurrentPageReference} from 'lightning/navigation'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { NavigationMixin } from 'lightning/navigation'; |
| | | import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils'; |
| | | import init from '@salesforce/apex/lexLostCancelReportController.initForEditCancelReport'; |
| | | |
| | | export default class LexEditCancelReport extends NavigationMixin(LightningElement) { |
| | | @api recordId; |
| | | IsLoading = true; |
| | | recordTypeId; |
| | | lostType; |
| | | reportStatus; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference){ |
| | | console.log("进入页面"); |
| | | console.log(currentPageReference); |
| | | if(currentPageReference){ |
| | | const urvalue=currentPageReference.state.recordId; |
| | | if(urvalue){ |
| | | let str=`${urvalue}`; |
| | | console.log('str'); |
| | | console.log(str); |
| | | this.recordId=str; |
| | | } |
| | | } |
| | | } |
| | | connectedCallback(){ |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result=>{ |
| | | this.recordTypeId = result.recordTypeId; |
| | | this.lostType = result.lostType; |
| | | this.reportStatus = result.reportStatus; |
| | | this.editCancelReport(); |
| | | }); |
| | | |
| | | } |
| | | editCancelReport(){ |
| | | this[NavigationMixin.Navigate]({ |
| | | type: 'standard__recordPage', |
| | | attributes: { |
| | | recordId: this.recordId, |
| | | actionName: 'edit' |
| | | } |
| | | }); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | <!-- |
| | | * @Description: |
| | | * @version: |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-09-08 16:18:50 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-08 16:32:07 |
| | | --> |
| | | <template> |
| | | <div class="lexLoseReportHolder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { updateRecord } from 'lightning/uiRecordApi'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import init from '@salesforce/apex/OpportunityLightingButtonController.queryForEditLostButton'; |
| | | import queryForProfileId from '@salesforce/apex/OpportunityLightingButtonController.queryForProfileId'; |
| | | import PCLReportProfileId from '@salesforce/label/c.PCLReportProfileId'; |
| | | export default class LexEditLost extends LightningElement { |
| | | @api recordId; |
| | | lostlist; |
| | | AprofileId; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | | console.log(111); |
| | | console.log(currentPageReference); |
| | | |
| | | if (currentPageReference) { |
| | | const urlValue = currentPageReference.state.recordId; |
| | | if (urlValue) { |
| | | let str = `${urlValue}`; |
| | | console.log("str"); |
| | | console.log(str); |
| | | this.recordId = str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | connectedCallback(){ |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result=>{ |
| | | this.lostlist = result; |
| | | queryForProfileId().then() |
| | | this.AprofileId = PCLReportProfileId.includes(this.profileId); |
| | | this.editLost(); |
| | | }); |
| | | } |
| | | editLost(){ |
| | | if (this.lostlist.size < 0){ |
| | | alert('请先创建失单报告'); |
| | | return; |
| | | }else if(this.lostlist.size > 1){ |
| | | //alert('1'); |
| | | for(var lost of lostlist ){ |
| | | //alert('3'); |
| | | //alert(lost.RecordTypeId); |
| | | if(lost.RecordTypeId == '01210000000R4hMAAS'){ |
| | | //alert('4'); |
| | | if(lost.Report_Status__c == '草案' || profileId == '00e10000000Y3o5' || (lost.Report_Status__c == '批准' && AprofileId)){ |
| | | //alert('5'); |
| | | window.open("/apex/PCLLostReportPageLwc?pageStatus=Edit&Id="+lost.Id); |
| | | }else{ |
| | | window.open("/apex/PCLLostReportPageLwc?pageStatus=View&Id="+lost.Id); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | else{ |
| | | //alert('2'); |
| | | //var status = lostlist[0].Report_Status__c; |
| | | if(lostlist[0].Report_Status__c == '草案' || profileId == '00e10000000Y3o5' || (lostlist[0].Report_Status__c == '批准' && AprofileId)){ |
| | | window.open("/apex/PCLLostReportPageLwc?pageStatus=Edit&Id="+lostlist[0].Id); |
| | | }else{ |
| | | window.open("/apex/PCLLostReportPageLwc?pageStatus=View&Id="+lostlist[0].Id); |
| | | } |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>54.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | import { createElement } from 'lwc'; |
| | | import LexInventoryReport from 'c/lexInventoryReport'; |
| | | |
| | | describe('c-lex-inventory-report', () => { |
| | | afterEach(() => { |
| | | // The jsdom instance is shared across test cases in a single file so reset the DOM |
| | | while (document.body.firstChild) { |
| | | document.body.removeChild(document.body.firstChild); |
| | | } |
| | | }); |
| | | |
| | | it('TODO: test case generated by CLI command, please fill in test logic', () => { |
| | | // Arrange |
| | | const element = createElement('c-lex-inventory-report', { |
| | | is: LexInventoryReport |
| | | }); |
| | | |
| | | // Act |
| | | document.body.appendChild(element); |
| | | |
| | | // Assert |
| | | // const div = element.shadowRoot.querySelector('div'); |
| | | expect(1).toBe(1); |
| | | }); |
| | | }); |
| New file |
| | |
| | | <template> |
| | | |
| | | </template> |
| New file |
| | |
| | | /* |
| | | * @Description: |
| | | * @version: |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-09-12 16:22:13 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-12 16:22:50 |
| | | */ |
| | | import { LightningElement,api,wire } from 'lwc'; |
| | | import { CloseActionScreenEvent } from "lightning/actions"; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | | import Inventory_Report from "@salesforce/label/c.Inventory_Report"; |
| | | import init from '@salesforce/apex/lexAccountController.init'; |
| | | |
| | | export default class LexInventoryReport extends LightningElement { |
| | | @api recordId; |
| | | name; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | | if (currentPageReference) { |
| | | this.url = currentPageReference.state.backgroundContext; |
| | | const urlValue = currentPageReference.state.recordId; |
| | | if (urlValue) { |
| | | let str = `${urlValue}`; |
| | | this.recordId = str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | connectedCallback() { |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result=>{ |
| | | this.name = result.name; |
| | | window.open('/lightning/r/Report/' + Inventory_Report + '/view?fv0=' + this.name); |
| | | this.closeAction(); |
| | | }); |
| | | |
| | | } |
| | | |
| | | closeAction() { |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>54.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-05-08 14:36:33 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-05-24 16:24:28 |
| | | * @LastEditTime: 2023-09-11 16:46:08 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-06-29 13:45:26 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-07-07 09:12:29 |
| | | * @LastEditTime: 2023-09-10 13:00:26 |
| | | */ |
| | | /* |
| | | * @Description: |
| | |
| | | value: rt.recordTypeId |
| | | })); |
| | | } else if (error) { |
| | | console.log(error); |
| | | // 处理操作失败的错误 |
| | | } |
| | | } |
| | |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-06-29 16:43:08 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-06-29 17:07:54 |
| | | * @LastEditTime: 2023-09-11 15:35:43 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-08-29 14:42:25 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-08-29 14:42:44 |
| | | * @LastEditTime: 2023-09-11 15:32:14 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-06-26 11:10:52 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-07-10 14:11:57 |
| | | * @LastEditTime: 2023-09-11 15:23:16 |
| | | */ |
| | | |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | |
| | | }); |
| | | } |
| | | newSolutionProgramma(){ |
| | | this.profileId = this.m2profileId; |
| | | this.girWindowDirectorApproved = true; |
| | | console.log(this.profileId != this.m2profileId); |
| | | console.log(this.girWindowDirectorApproved); |
| | | if(this.profileId != this.m2profileId){ |
| | | this.showToast('只有GIR窗口才能新建方案','error'); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-03-28 15:59:44 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-05-24 16:09:50 |
| | | * @LastEditTime: 2023-09-11 13:53:14 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-07 09:02:03 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-05-24 16:16:57 |
| | | * @LastEditTime: 2023-09-11 13:53:04 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-13 13:15:52 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-05-24 16:28:23 |
| | | * @LastEditTime: 2023-09-11 16:53:01 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-06-09 16:41:45 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-07-06 09:26:09 |
| | | * @LastEditTime: 2023-09-11 13:49:57 |
| | | */ |
| | | import { LightningElement,api, track, wire } from 'lwc'; |
| | | import {CurrentPageReference} from 'lightning/navigation'; |
| | |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-07 09:02:03 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-04-11 11:27:14 |
| | | * @LastEditTime: 2023-09-11 13:52:47 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | |
| | | <template> |
| | | <div class="lexOpporSpliteHolder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | <div class="opdToSISHolder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="min"></lightning-spinner> |
| | | <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button> |
| | | </div> |
| | | </template> |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-23 10:09:31 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-05-15 11:06:07 |
| | | * @LastEditTime: 2023-09-12 14:14:04 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | import { updateRecord } from 'lightning/uiRecordApi'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import init from '@salesforce/apex/OpportunityLightingButtonController.initForOpporSpliteButton'; |
| | | |
| | | export default class LexOpporSplite extends LightningElement { |
| | | import initCopy from '@salesforce/apex/OpportunityLightingButtonController.initCopy'; |
| | | import { NavigationMixin } from 'lightning/navigation'; |
| | | import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils'; |
| | | export default class LexOpporSplite extends NavigationMixin(LightningElement) { |
| | | @api recordId; |
| | | authorizedDBNo; |
| | | estimationDecision; |
| | |
| | | }) |
| | | } |
| | | opporSplite(){ |
| | | this.authorizedDBNo = 'test'; |
| | | if(this.recordId == '已终止'){ |
| | | this.showToast("需求表已终止,不能拆单","error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else if(this.authorizedDBNo == ''){ |
| | | this.showToast("没有合同授权编码,不能拆单","error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else if(this.estimationDecision == true){ |
| | | this.showToast("报价已经Decided,不能拆单","error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else if(this.siDecideID == ''){ |
| | | this.showToast("需求表未批准,不能拆单","error"); |
| | | }else if(this.recordId != '草案中' && this.recordId != '已提交' && this.recordId != '已终止'){ |
| | | console.log("sss"); |
| | | window.open( |
| | | "/" |
| | | + this.recordId |
| | | + "/e?clone=1&retURL=%2F" |
| | | + this.recordId + "&00N10000002Cbwh=*&CF00N10000006qHai=" |
| | | + this.name + "&00Np0000001DOwi=***&00Np0000001CxmR=" |
| | | + this.opportunityNo + "&CF00N10000006qHai_lkid=" |
| | | + this.recordId + "&00N10000006qHav=" |
| | | + this.opportunityNo + "&00N10000009Glvn=" |
| | | + this.isAuthorized + "&00N10000008pnmd=1&00N10000002DXkZ=&00N10000002DXke=&00N10000002CmTf=&00N10000002Cb9P=&00N10000002DItz=&00N10000003O9oO=&00N10000003O9o4=&00N10000002CYHy=&00Np00000030gzb=&00Np0000002ajGe=&00Np00000034Qlb" |
| | | ); |
| | | } |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else if(this.recordId != '草案中' && this.recordId != '已提交' && this.recordId != '已终止'){ |
| | | initCopy({ |
| | | recordId: this.recordId |
| | | }).then(result=>{ |
| | | var changeData = 'Opportunity_No__c=*,Old_Opportunity_ID__c=' + this.recordId |
| | | + ',old_Oppo_No__c=' + this.opportunityNo |
| | | + ',IsAuthorized__c=' + this.isAuthorized |
| | | + ',SeparateBillMark__c=1,Estimation_No__c=,Estimation_Name__c=,Estimation_List_Price__c=,NotesApprovedNo__c=,Assistant_Applied_Date__c=,Contract_DB_SalesDept_complite_day__c=,Contract_DB_complite_day__c=,Closing_Bid_Date__c='; |
| | | this[NavigationMixin.Navigate]({ |
| | | type: 'standard__objectPage', |
| | | attributes: { |
| | | actionName: 'new', |
| | | objectApiName: 'Opportunity' |
| | | }, |
| | | state: { |
| | | defaultFieldValues: result + ',' + changeData |
| | | } |
| | | }); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }); |
| | | |
| | | } |
| | | } |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-20 17:16:48 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-06 15:43:06 |
| | | * @LastEditTime: 2023-09-13 13:42:39 |
| | | --> |
| | | <template> |
| | | <div class="holder" if:true={IsLoading}> |
| | |
| | | <lightning-layout-item size="4" padding="horizontal-small"> |
| | | <lightning-input name={i} value={brand.lostBrand.AgencyMannual__c} type="text" label="中标经销商(手动):" class="searchField" onchange={handleAgencyMannualOutChange}></lightning-input> |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item size="4" padding="horizontal-small"> |
| | | <lightning-combobox name={i} label="渠道具体原因:" value={brand.lostBrand.ChannelSpecificReasons__c} options={reasonOptions} |
| | | onchange={handleChannelSpecificReasonChange} placeholder="--无--"></lightning-combobox> |
| | | </lightning-layout-item> |
| | | </lightning-layout> |
| | | <lightning-layout> |
| | | <lightning-layout-item flexibility="auto" padding="around-small"> |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-20 15:04:03 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-07 14:46:02 |
| | | * @LastEditTime: 2023-09-13 13:45:33 |
| | | */ |
| | | let columns2=[ |
| | | { label: '--无--', value: '' }, |
| | |
| | | {label : "失单对手型号(手动)",fieldName : "LostProductMannual__c"}, |
| | | {label : "失单产品类别",fieldName : "ProductClass__c"}, |
| | | {label : "失单产品区分",fieldName : "ProductCategory__c"} |
| | | ]; |
| | | const reasonOptions = [ |
| | | { label: '--无--', value: '' }, |
| | | { label: '特约与客户关系不好', value: '特约与客户关系不好' }, |
| | | { label: '特约与二级合作问题', value: '特约与二级合作问题' }, |
| | | { label: '特约覆盖不足', value: '特约覆盖不足' }, |
| | | { label: '特约推广活动不力', value: '特约推广活动不力' }, |
| | | { label: '二级选择问题', value: '二级选择问题' }, |
| | | { label: '二级价格高', value: '二级价格高' }, |
| | | { label: '医院指定二级', value: '医院指定二级' } |
| | | ]; |
| | | const RecordTypeOptions = [ |
| | | { label: '--无--', value: '' }, |
| | |
| | | }).then(result=>{ |
| | | console.log(result); |
| | | if(result == '进口'){ |
| | | this.columns2s = columns2; |
| | | }else{ |
| | | this.columns2s = columns22; |
| | | }else{ |
| | | this.columns2s = columns2; |
| | | } |
| | | if(payloadType === 'multi-select'){ |
| | | |
| | |
| | | var value = event.target.value; |
| | | this.LostReport.lostReport.LostType__c = value; |
| | | } |
| | | handleChannelSpecificReasonChange(event){ |
| | | var value = event.target.value; |
| | | this.LostReport.lostReport.LostType__c = value; |
| | | } |
| | | |
| | | handleLostReasonMainChange(event){ |
| | | var index = event.target.name; |
| | | var value = event.target.value; |
| | | this.LostReport.LostBrands[index].lostBrand.Lost_reason_main__c = value; |
| | | if(value == '渠道因素'){ |
| | | |
| | | } |
| | | } |
| | | |
| | | handleLostReasonSubChange(event){ |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-12 10:46:24 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-05-10 13:03:57 |
| | | * @LastEditTime: 2023-09-12 13:35:56 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | |
| | | } |
| | | predictedDateChange(){ |
| | | // 20221206 ljh DB202212030068 start |
| | | var DirectLossFLG = this.directLossFLG; |
| | | var CreatedDay = this.createdDay; |
| | | var Day = '2022-12-03'; |
| | | if((DirectLossFLG == true || DirectLossFLG == 1 ) && CreatedDay > Day){ |
| | | this.showToast("从招标项目点击失单新建的询价,预测OCSM签约日(KPI)和预测发货日不允许修改","error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | // var DirectLossFLG = this.directLossFLG; |
| | | // var CreatedDay = this.createdDay; |
| | | // var Day = '2022-12-03'; |
| | | // if((DirectLossFLG == true || DirectLossFLG == 1 ) && CreatedDay > Day){ |
| | | // this.showToast("从招标项目点击失单新建的询价,预测OCSM签约日(KPI)和预测发货日不允许修改","error"); |
| | | // this.dispatchEvent(new CloseActionScreenEvent()); |
| | | // return; |
| | | // } |
| | | // 20221206 ljh DB202212030068 end |
| | | queryForPredictedDateChangeButton({ |
| | | recordId: this.recordId |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-14 11:09:28 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-05-12 13:17:30 |
| | | * @LastEditTime: 2023-09-11 16:56:06 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-07 09:02:03 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-04-12 10:15:28 |
| | | * @LastEditTime: 2023-09-11 13:52:37 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| New file |
| | |
| | | import { createElement } from 'lwc'; |
| | | import LexSampleInventoryReport from 'c/lexSampleInventoryReport'; |
| | | |
| | | describe('c-lex-sample-inventory-report', () => { |
| | | afterEach(() => { |
| | | // The jsdom instance is shared across test cases in a single file so reset the DOM |
| | | while (document.body.firstChild) { |
| | | document.body.removeChild(document.body.firstChild); |
| | | } |
| | | }); |
| | | |
| | | it('TODO: test case generated by CLI command, please fill in test logic', () => { |
| | | // Arrange |
| | | const element = createElement('c-lex-sample-inventory-report', { |
| | | is: LexSampleInventoryReport |
| | | }); |
| | | |
| | | // Act |
| | | document.body.appendChild(element); |
| | | |
| | | // Assert |
| | | // const div = element.shadowRoot.querySelector('div'); |
| | | expect(1).toBe(1); |
| | | }); |
| | | }); |
| New file |
| | |
| | | <template> |
| | | |
| | | </template> |
| New file |
| | |
| | | /* |
| | | * @Description: |
| | | * @version: |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-09-12 15:25:16 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-12 15:40:46 |
| | | */ |
| | | import { LightningElement,api,wire } from 'lwc'; |
| | | import { CloseActionScreenEvent } from "lightning/actions"; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | | import Sample_Inventory_Report from "@salesforce/label/c.Sample_Inventory_Report"; |
| | | import init from '@salesforce/apex/lexAccountController.init'; |
| | | |
| | | export default class LexSampleInventoryReport extends LightningElement { |
| | | @api recordId; |
| | | name; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | | if (currentPageReference) { |
| | | this.url = currentPageReference.state.backgroundContext; |
| | | const urlValue = currentPageReference.state.recordId; |
| | | if (urlValue) { |
| | | let str = `${urlValue}`; |
| | | this.recordId = str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | connectedCallback() { |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result=>{ |
| | | this.name = result.name; |
| | | window.open('/lightning/r/Report/' + Sample_Inventory_Report + '/view?fv0=' + this.name); |
| | | this.closeAction(); |
| | | }); |
| | | |
| | | } |
| | | |
| | | closeAction() { |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>58.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | import { createElement } from 'lwc'; |
| | | import LexSampleOrderListDNReport from 'c/lexSampleOrderListDNReport'; |
| | | |
| | | describe('c-lex-sample-order-list-dn-report', () => { |
| | | afterEach(() => { |
| | | // The jsdom instance is shared across test cases in a single file so reset the DOM |
| | | while (document.body.firstChild) { |
| | | document.body.removeChild(document.body.firstChild); |
| | | } |
| | | }); |
| | | |
| | | it('TODO: test case generated by CLI command, please fill in test logic', () => { |
| | | // Arrange |
| | | const element = createElement('c-lex-sample-order-list-dn-report', { |
| | | is: LexSampleOrderListDNReport |
| | | }); |
| | | |
| | | // Act |
| | | document.body.appendChild(element); |
| | | |
| | | // Assert |
| | | // const div = element.shadowRoot.querySelector('div'); |
| | | expect(1).toBe(1); |
| | | }); |
| | | }); |
| New file |
| | |
| | | <template> |
| | | |
| | | </template> |
| New file |
| | |
| | | /* |
| | | * @Description: |
| | | * @version: |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-09-12 16:14:53 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-12 16:19:28 |
| | | */ |
| | | import { LightningElement,api,wire } from 'lwc'; |
| | | import { CloseActionScreenEvent } from "lightning/actions"; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | | import Sample_OrderListDN_Report from "@salesforce/label/c.Sample_OrderListDN_Report"; |
| | | import init from '@salesforce/apex/lexAccountController.init'; |
| | | |
| | | export default class LexSampleOrderListDNReport extends LightningElement { |
| | | @api recordId; |
| | | name; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | | if (currentPageReference) { |
| | | this.url = currentPageReference.state.backgroundContext; |
| | | const urlValue = currentPageReference.state.recordId; |
| | | if (urlValue) { |
| | | let str = `${urlValue}`; |
| | | this.recordId = str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | connectedCallback() { |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result=>{ |
| | | this.name = result.name; |
| | | window.open('/lightning/r/Report/' + Sample_OrderListDN_Report + '/view?fv0=' + this.name); |
| | | this.closeAction(); |
| | | }); |
| | | |
| | | } |
| | | |
| | | closeAction() { |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>58.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | import { createElement } from 'lwc'; |
| | | import LexSampleOrderListReport from 'c/lexSampleOrderListReport'; |
| | | |
| | | describe('c-lex-sample-order-list-report', () => { |
| | | afterEach(() => { |
| | | // The jsdom instance is shared across test cases in a single file so reset the DOM |
| | | while (document.body.firstChild) { |
| | | document.body.removeChild(document.body.firstChild); |
| | | } |
| | | }); |
| | | |
| | | it('TODO: test case generated by CLI command, please fill in test logic', () => { |
| | | // Arrange |
| | | const element = createElement('c-lex-sample-order-list-report', { |
| | | is: LexSampleOrderListReport |
| | | }); |
| | | |
| | | // Act |
| | | document.body.appendChild(element); |
| | | |
| | | // Assert |
| | | // const div = element.shadowRoot.querySelector('div'); |
| | | expect(1).toBe(1); |
| | | }); |
| | | }); |
| New file |
| | |
| | | <template> |
| | | |
| | | </template> |
| New file |
| | |
| | | /* |
| | | * @Description: |
| | | * @version: |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-09-12 15:42:24 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-12 15:43:23 |
| | | */ |
| | | import { LightningElement,api,wire } from 'lwc'; |
| | | import { CloseActionScreenEvent } from "lightning/actions"; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | | import Sample_OrderList_Report from "@salesforce/label/c.Sample_OrderList_Report"; |
| | | import init from '@salesforce/apex/lexAccountController.init'; |
| | | |
| | | export default class LexSampleOrderListReport extends LightningElement { |
| | | @api recordId; |
| | | name; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | | if (currentPageReference) { |
| | | this.url = currentPageReference.state.backgroundContext; |
| | | const urlValue = currentPageReference.state.recordId; |
| | | if (urlValue) { |
| | | let str = `${urlValue}`; |
| | | this.recordId = str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | connectedCallback() { |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result=>{ |
| | | this.name = result.name; |
| | | window.open('/lightning/r/Report/' + Sample_OrderList_Report + '/view?fv0=' + this.name); |
| | | this.closeAction(); |
| | | }); |
| | | |
| | | } |
| | | |
| | | closeAction() { |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>58.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-14 13:04:53 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-05-24 16:45:55 |
| | | * @LastEditTime: 2023-09-11 16:58:40 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | } |
| | | this.handleConfirmClick("一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?"); |
| | | } |
| | | |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent); |
| New file |
| | |
| | | .specSubmitHolder{ |
| | | position: relative; |
| | | display: inline-block; |
| | | width: 80px; |
| | | height: 80px; |
| | | text-align: center; |
| | | } |
| | | .container .uiContainerManager{ |
| | | display: none !important; |
| | | } |
| New file |
| | |
| | | <template> |
| | | <div class="specSubmitHolder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="small"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | /* |
| | | * @Description: |
| | | * @version: |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-09-11 09:20:29 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-09-11 10:00:40 |
| | | */ |
| | | import { api, wire,LightningElement, track } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import updateSubmitReportButton from '@salesforce/apex/lexLostCancelReportController.updateSubmitReportButton'; |
| | | import init from '@salesforce/apex/lexLostCancelReportController.initSubmitReportButton'; |
| | | import { updateRecord,getRecord } from 'lightning/uiRecordApi'; |
| | | import STATUS_FIELD from "@salesforce/schema/Lost_cancel_report__c.Report_Status__c"; |
| | | import { refreshApex } from '@salesforce/apex'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import LightningConfirm from 'lightning/confirm'; |
| | | |
| | | export default class LexSubmitReport extends LightningElement { |
| | | @wire(getRecord, { recordId: '$recordId', fields: [STATUS_FIELD] }) |
| | | record; |
| | | @api recordId; |
| | | cntLostCancelReport; |
| | | cntLostCancelDraft; |
| | | IsLoading = true; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | | console.log(111); |
| | | console.log(currentPageReference); |
| | | |
| | | if (currentPageReference) { |
| | | const urlValue = currentPageReference.state.recordId; |
| | | if (urlValue) { |
| | | let str = `${urlValue}`; |
| | | console.log("str"); |
| | | console.log(str); |
| | | this.recordId = str; |
| | | } |
| | | } |
| | | } |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | | |
| | | |
| | | updateRecordView(recordId) { |
| | | updateRecord({fields: { Id: recordId }}); |
| | | } |
| | | |
| | | connectedCallback(){ |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result=>{ |
| | | console.log(result); |
| | | this.cntLostCancelDraft = result.cntLostCancelDraft; |
| | | this.cntLostCancelReport = result.cntLostCancelReport; |
| | | this.submitReport(); |
| | | }); |
| | | } |
| | | submitReport(){ |
| | | if (this.cntLostCancelReport - this.cntLostCancelDraft > 0) { |
| | | this.showToast('询价已经有 取消/失单报告 了!','error'); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | this.handleConfirmClick('一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?'); |
| | | } |
| | | |
| | | async handleConfirmClick(msg) { |
| | | const result = await LightningConfirm.open({ |
| | | message: msg, |
| | | variant: 'headerless', |
| | | label: 'this is the aria-label value' |
| | | }); |
| | | console.log(result); |
| | | if(result){ |
| | | updateSubmitReportButton({ |
| | | recordId: this.recordId |
| | | }).then(result=>{ |
| | | if(result){ |
| | | this.showToast(result,'error'); |
| | | }else{ |
| | | setTimeout(() => { |
| | | this.IsLoading = false; |
| | | refreshApex(this.record); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }, 2000); |
| | | } |
| | | }); |
| | | }else{ |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>56.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-06-20 14:37:24 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-08-29 14:07:08 |
| | | * @LastEditTime: 2023-09-13 15:03:09 |
| | | */ |
| | | import { api, wire,LightningElement, track } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | import { refreshApex } from '@salesforce/apex'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import LightningConfirm from 'lightning/confirm'; |
| | | import lwcCSS from '@salesforce/resourceUrl/lwcCSS'; |
| | | import {loadStyle} from 'lightning/platformResourceLoader'; |
| | | |
| | | export default class LexSubmitSolutionForApproval extends LightningElement { |
| | | @wire(getRecord, { recordId: '$recordId', fields: [STATUS_FIELD] }) |
| | |
| | | } |
| | | |
| | | connectedCallback(){ |
| | | Promise.all([ |
| | | loadStyle(this, lwcCSS) |
| | | ]); |
| | | |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result=>{ |
| | |
| | | } |
| | | console.log('this.schemeType:'+this.schemeType); |
| | | if((this.records.length > 0 && this.schemeType == '结案') || (this.schemeType == '初次')){ |
| | | submitApproval({recordId:this.recordId}).then(rep => { |
| | | console.log(rep); |
| | | if(rep==='OK'){ |
| | | console.log('1'); |
| | | this.showToast('提交审批成功','success'); |
| | | // submitApproval({recordId:this.recordId}).then(rep => { |
| | | // console.log(rep); |
| | | // if(rep==='OK'){ |
| | | // console.log('1'); |
| | | // this.showToast('提交审批成功','success'); |
| | | // }else{ |
| | | // console.log('2'); |
| | | // this.showToast(rep,'error'); |
| | | // } |
| | | // }).catch(err => { |
| | | // console.log('3'); |
| | | // console.log(err); |
| | | // this.showToast(err,'error'); |
| | | // }) |
| | | updateSubmitSolutionSchemeForApprovalButton({ |
| | | recordId: this.recordId |
| | | }).then(res=>{ |
| | | if(res){ |
| | | this.showToast(res,'error'); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | console.log('2'); |
| | | this.showToast(rep,'error'); |
| | | window.location.href = '/lightning/r/Solution_Programme__c/'+this.recordId+'/view'; |
| | | } |
| | | }).catch(err => { |
| | | console.log('3'); |
| | | console.log(err); |
| | | this.showToast(err,'error'); |
| | | }) |
| | | }); |
| | | }else{ |
| | | this.showToast('结案的方案提交前,必须上传结案附件','error'); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-06-21 10:42:48 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-06-21 10:55:05 |
| | | * @LastEditTime: 2023-09-11 15:39:09 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | |
| | | |
| | | showToast(msg, type) { |
| | | const event = new ShowToastEvent({ |
| | | title: "", |
| | | title: ' ', |
| | | message: msg, |
| | | variant: type |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-03-27 14:08:56 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-08-24 15:37:45 |
| | | * @LastEditTime: 2023-09-11 13:48:56 |
| | | */ |
| | | import { LightningElement,wire,track,api} from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-03-27 14:11:17 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-05-09 17:10:14 |
| | | * @LastEditTime: 2023-09-11 13:49:03 |
| | | */ |
| | | import { api, wire,LightningElement } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | variant: type, |
| | | mode: 'sticky' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | |
| | | <apex:commandButton style="width: 100%" value="数据维护单" onclick="window.open('/lightning/o/AssetMaintainHeader__c/list?filterName=Recent')"/> |
| | | </div> |
| | | <div style="margin-top:10px;"> |
| | | <apex:commandButton style="width: 100%" value="维护产品主数据" onclick="window.open('/a3z/o')"/> |
| | | <apex:commandButton style="width: 100%" value="维护产品主数据" onclick="window.open('/lightning/o/Maintenance_Product_Data__c/list?filterName=Recent')"/> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <apex:commandButton styleClass="my-button" style="width: 99%" value="耗材盘点报告" onclick="loadPage('/apex/InventoryReport?isConsum=true'); return false"/> |
| | | </div> |
| | | <div style="margin-top:10px;"> |
| | | <apex:commandButton styleClass="my-button" style="width: 99%" value="盘点表头" onclick="location.href = '/a3H/o'; return false"/> |
| | | <apex:commandButton styleClass="my-button" style="width: 99%" value="温湿度盘点" onclick="loadPage('/apex/InventoryTemperatureHumidity'); return false"/> |
| | | </div> |
| | | <div style="margin-top:10px;"> |
| | | <apex:commandButton styleClass="my-button" style="width: 99%" value="盘点表头" onclick="window.open('/lightning/o/Inventory_Header__c/list?filterName=Recent'); return false"/> |
| | | </div> |
| | | </div> |
| | | <!-- <div style="width:90%;float:right;margin-left:5px;" id="vf-content"> --> |
| | |
| | | </table> |
| | | </apex:pageBlock> |
| | | </apex:outputPanel> --> |
| | | <apex:outputPanel id="RightArea" layout="block" style="width: 100%;"> |
| | | <apex:outputPanel id="RightArea" layout="block" style="margin: 0 20%;"> |
| | | <apex:outputPanel id="message" style="width: auto" > |
| | | <apex:pageMessages /> |
| | | </apex:outputPanel> |
| | |
| | | width: 9%; |
| | | } |
| | | .inputTextStyle input { |
| | | width: 90%; |
| | | width: 96%; |
| | | } |
| | | .inputTextStyle select { |
| | | width: 95%; |
| | |
| | | } |
| | | .startInventoryButtonStyle { |
| | | margin-left: 15%; |
| | | width: 12%; |
| | | width: 11%; |
| | | } |
| | | .labelStyle { |
| | | width: 9%; |
| | |
| | | width: 9%; |
| | | } |
| | | .inputTextStyle input { |
| | | width: 90%; |
| | | width: 96%; |
| | | } |
| | | .inputTextStyle select { |
| | | width: 95%; |
| | |
| | | j$('.inventoryResultsTable').hide(); |
| | | } else { |
| | | if (hasChange == false) { |
| | | j$(escapeVfId('allPage:allForm:recordBlock:overlay_div')).removeClass('overlay'); |
| | | /*j$(escapeVfId('allPage:allForm:recordBlock:overlay_div')).removeClass('overlay'); |
| | | j$(escapeVfId('allPage:allForm:recordBlock:overlay_div')).hide(); |
| | | j$('.inventoryResultsTable').show(); |
| | | j$('#descdiv').show(); |
| | | j$('#descdiv').show();*/ |
| | | doInit(); |
| | | } else { |
| | | j$.confirm({ |
| | | title: '确认', |
| | |
| | | useBootstrap: false, |
| | | buttons: { |
| | | OK: function () { |
| | | j$(escapeVfId('allPage:allForm:recordBlock:overlay_div')).removeClass('overlay'); |
| | | /*j$(escapeVfId('allPage:allForm:recordBlock:overlay_div')).removeClass('overlay'); |
| | | j$(escapeVfId('allPage:allForm:recordBlock:overlay_div')).hide(); |
| | | j$('.inventoryResultsTable').show(); |
| | | j$('#descdiv').show(); |
| | | j$('#descdiv').show();*/ |
| | | doInit(); |
| | | }, |
| | | cancel: { |
| | | text: '取消', // With spaces and symbols |
| | |
| | | </div> |
| | | |
| | | </div> |
| | | <apex:actionFunction name="doInit" action="{!init}" rerender="recordBlock" onComplete="unblockUI()" /> |
| | | <apex:actionFunction name="startInventory" action="{!startInventory}" rerender="allForm" onComplete="unblockUI()" /> |
| | | <!-- update by rentx 20210827 start 耗材盘点方案 --> |
| | | <!-- <apex:actionFunction name="searchBtnFunc" action="{!searchBtn}" rerender="allForm" onComplete="unblockUI();changeFullScreen(true);" /> --> |
| | |
| | | </table> |
| | | </apex:pageBlock> |
| | | </apex:outputPanel> --> |
| | | |
| | | <!-- <apex:outputPanel layout="block" style="width: 14%; float: left;"> |
| | | <apex:pageBlock mode="maindetail"> |
| | | <table style='width:140px;height: 120px'> |
| | | <tr><td class="checkButtonStyle"><apex:commandButton value="盘点" rendered="{!!inventoryBlueFlag}" onclick="location.href='/apex/InventoryResultRecord'; return false"/></td></tr> |
| | | <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="盘点" rendered="{!inventoryBlueFlag}"/></td></tr> |
| | | <tr><td class="checkButtonStyle"><apex:commandButton value="备品盘点报告" rendered="{!!rentBlueFlag}" onclick="location.href='{!$Page.InventoryReport}'; return false" /></td></tr> |
| | | <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="备品盘点报告" rendered="{!rentBlueFlag}"/></td></tr> |
| | | <tr><td class="checkButtonStyle"><apex:commandButton value="耗材盘点报告" rendered="{!!consumBlueFlag}" onclick="location.href='{!$Page.InventoryReport}?isConsum=true'; return false" /></td></tr> |
| | | <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="耗材盘点报告" rendered="{!consumBlueFlag}"/></td></tr> |
| | | <tr><td></td></tr> |
| | | </table> |
| | | </apex:pageBlock> |
| | | </apex:outputPanel> --> |
| | | <!-- 右侧检索区 --> |
| | | <apex:outputPanel layout="block"> |
| | | <apex:pageBlock mode="maindetail" id="maindetailId"> |
| | |
| | | <tr> |
| | | <td></td> |
| | | <td colspan="10"> |
| | | <input class="startInventoryButtonStyle blueStyle" style="margin-left: 0" type="button" value="开始盘点" onclick="startjs(this);return false;" /> |
| | | <input class="startInventoryButtonStyle blueStyle" style="margin-left: 2px" type="button" value="开始盘点" onclick="startjs(this);return false;" /> |
| | | </td> |
| | | </tr> |
| | | <!-- <tr> |
| | |
| | | </div> --> |
| | | </td> |
| | | </tr> |
| | | <tr><td style="height: 23px;"></td></tr> |
| | | <tr> |
| | | <td class="labelStyle">盘亏/盘盈</td> |
| | | <td class="inputTextStyle"> |
| | |
| | | <td class="blankStyle"> |
| | | </td> |
| | | <td class="blankStyle"></td> |
| | | <td class="blankStyle"></td> |
| | | <td class="blankStyle"> |
| | | <!-- 20230912 ljh start --> |
| | | <!-- <td class="searchButtonStyle"> --> |
| | | <td width="11%"> |
| | | <!-- 20230912 ljh end --> |
| | | <div style="display: table-cell; width: 143px"> |
| | | <apex:commandButton action="{!showResult}" value="显示盘点结果" reRender="allForm" onclick="blockme()" oncomplete="unblockUI()" rendered="{!canDoFlg}"/> |
| | | </div> |
| | | </td> |
| | | <td class="searchButtonStyle" colspan="2"> |
| | | <div style="display: table-cell; width: 80px"> |
| | |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr><td height="23px"></td></tr> |
| | | <tr style="{!IF(bieCunFangDi=='上海 备品中心' || hasConsumAsset,'','display: none;')}"> |
| | | <td class="labelStyle">备品类别</td> |
| | | <td class="inputTextStyle"> |
| | |
| | | <apex:param value="{!consumInventoryHeader.Inventory_Start_Date__c}"></apex:param> |
| | | </apex:outputtext> |
| | | </div> |
| | | <apex:outputPanel id="message2" layout="block" style="width: 530px"> |
| | | <apex:outputPanel id="message2" layout="block" style="width: 100%"> |
| | | <apex:pageMessages /> |
| | | </apex:outputPanel> |
| | | <div class="searchButtonStyle1" id="scanAction_div"> |
| | | <!-- 耗材追溯方案 检索耗材时 修改"扫描"为"pad扫描" --> |
| | | <div style="display: table-cell; width: 100px"> |
| | | <div style="display: table-cell; width: 18%;"> |
| | | <apex:commandButton value="iPad扫描" rendered="{!assetCategory == '耗材' && bieCunFangDi == '上海 备品中心'}" onclick="qrsacn();return false"/> |
| | | <apex:commandButton value="扫描" rendered="{!!(assetCategory == '耗材' && bieCunFangDi == '上海 备品中心') }" onclick="qrsacn();return false"/> |
| | | </div> |
| | | <div style="display: table-cell; width: 80px"><apex:commandButton value="保存" onclick="savejs();return false"/></div> |
| | | <div style="display: table-cell; width: 80px"><apex:commandButton value="返回" onclick="changeFullScreen(false); return false"/></div> |
| | | <div style="display: table-cell; width: 13%;"><apex:commandButton value="保存" onclick="savejs();return false"/></div> |
| | | <div style="display: table-cell; width: 13%;"><apex:commandButton value="返回" onclick="changeFullScreen(false); return false"/></div> |
| | | |
| | | <!-- 耗材追溯方案 添加 "码枪扫描"输入框 add by rentx 20210911 start --> |
| | | <apex:outputText rendered="{!assetCategory == '耗材' && bieCunFangDi = '上海 备品中心'}"> |
| | | <div style="display: table-cell; width: 80px"> |
| | | <div style="display: table-cell; width: 19%;"> |
| | | <apex:commandButton onclick="document.getElementById('maqCode').focus();return false" value="码枪扫描" /> |
| | | </div> |
| | | <div style="display: table-cell; width: 500px" > |
| | | <input value="" autofocus="autofocus" id="maqCode" width="100%" style="background-color: #ffffff" onkeypress="return onKeyPress(event)" /> |
| | | <input value="" autofocus="autofocus" id="maqCode" width="100%" style="background-color: #ffffff;height: 32px;" onkeypress="return onKeyPress(event)" /> |
| | | </div> |
| | | <!-- <div style="display: table-cell;" > |
| | | <div style="float: left;display: table-cell;" class="btn" >码枪扫描 </div> |
| | |
| | | <!-- 耗材追溯方案 添加 "码枪扫描"输入框 add by rentx 20210911 end --> |
| | | |
| | | </div> |
| | | <table border="1px" style="width: 510px;" > |
| | | <table border="1px" style="width: 95%;" > |
| | | <tr> |
| | | <td class="labelStyle" style="width: 130px;">型号</td> |
| | | <td class="labelStyle" style="width: 60px;">机身号</td> |
| | | <apex:outputText rendered="{!angecylookrole}"> <!-- 1650--><td class="labelStyle" style="width: 60px;">货架号</td></apex:outputText> |
| | | <td class="labelStyle" style="width: 90px;">所在地区(本部)</td> |
| | | <td class="labelStyle" style="width: 60px;">货区</td> |
| | | <td class="labelStyle" style="width: 60px;">在库数量</td> |
| | | <td class="labelStyle" style="width: 60px;">盘点结果</td> |
| | | <td class="labelStyle" style="width: 40px;">盘盈</td> |
| | | <td class="labelStyle" style="width: 40px;">盘亏</td> |
| | | <td class="labelStyle">型号</td> |
| | | <td class="labelStyle">机身号</td> |
| | | <apex:outputText rendered="{!angecylookrole}"> <!-- 1650--><td class="labelStyle">货架号</td></apex:outputText> |
| | | <td class="labelStyle">所在地区(本部)</td> |
| | | <td class="labelStyle">货区</td> |
| | | <td class="labelStyle">在库数量</td> |
| | | <td class="labelStyle">盘点结果</td> |
| | | <td class="labelStyle">盘盈</td> |
| | | <td class="labelStyle">盘亏</td> |
| | | <!-- 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230801 by lc Start --> |
| | | <apex:outputText rendered="{!assetCategory!='备品'}"><td class="labelStyle" style="width: 60px;">有效期至</td></apex:outputText> |
| | | <apex:outputText rendered="{!assetCategory!='备品'}"><td class="labelStyle" style="width: 50px;">效期</td></apex:outputText> |
| | | <td class="labelStyle" style="width: 50px;">外观</td> |
| | | <td class="labelStyle" style="width: 50px;">包装</td> |
| | | <!-- 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230801 by lc End --> |
| | | </tr> |
| | | <apex:repeat value="{!inventoryDetailList}" var="ivDetail" id="inventroyRow"> |
| | | <tr class="{!IF(assetCategory!='耗材','displayRow','hiddenRow')}"> |
| | |
| | | <td class="labelStyle"> |
| | | <apex:outputPanel layout="none" rendered="{!ivDetail.Asset__r.Manage_type__c == '个体管理' && ivDetail.Asset_Status__c != '冻结'}"> |
| | | <apex:inputField onchange="hasChangeFunc()" html-data-qrcode="{!ivDetail.Fixture_QRCode__c}" html-data-accsessary="{!ivDetail.OneToOne_Accsessary__c}" html-data-main="{!ivDetail.OneToOne_Body__c}" html-data-mid="{!ivDetail.Main_Asset__c}" |
| | | html-disabled="true" html-data-aid="{!ivDetail.Asset__c}" html-data-frozen="{!ivDetail.Asset_Status__c == '冻结'}" html-data-bpguige="{!ivDetail.Asset__r.Product2.Packing_list_Fixture_F__c}" value="{!ivDetail.Inventory_Count__c}" style="width: 40px"/> |
| | | html-disabled="true" html-data-aid="{!ivDetail.Asset__c}" html-data-frozen="{!ivDetail.Asset_Status__c == '冻结'}" html-data-bpguige="{!ivDetail.Asset__r.Product2.Packing_list_Fixture_F__c}" value="{!ivDetail.Inventory_Count__c}" style="width: 80%"/> |
| | | <apex:outputPanel layout="none" rendered="{!ivDetail.Asset__r.Manage_type__c == '个体管理'}"> |
| | | <br/> |
| | | <button onclick="lostGeTi(this);return false;">手动</button> |
| | |
| | | </apex:outputPanel> |
| | | <apex:outputPanel layout="none" rendered="{!ivDetail.Asset__r.Manage_type__c == '数量管理' || ivDetail.Asset_Status__c == '冻结'}"> |
| | | <apex:inputField onchange="hasChangeFunc()" html-data-qrcode="{!ivDetail.Fixture_QRCode__c}" html-data-accsessary="{!ivDetail.OneToOne_Accsessary__c}" html-data-main="{!ivDetail.OneToOne_Body__c}" html-data-mid="{!ivDetail.Main_Asset__c}" |
| | | html-data-aid="{!ivDetail.Asset__c}" html-data-frozen="{!ivDetail.Asset_Status__c == '冻结'}" html-data-bpguige="{!ivDetail.Asset__r.Product2.Packing_list_Fixture_F__c}" value="{!ivDetail.Inventory_Count__c}" style="width: 40px" /> |
| | | html-data-aid="{!ivDetail.Asset__c}" html-data-frozen="{!ivDetail.Asset_Status__c == '冻结'}" html-data-bpguige="{!ivDetail.Asset__r.Product2.Packing_list_Fixture_F__c}" value="{!ivDetail.Inventory_Count__c}" style="width: 80%" /> |
| | | </apex:outputPanel> |
| | | </td> |
| | | <td class="labelStyle"><apex:outputPanel rendered="{!ivDetail.Inventory_Count__c != null && ivDetail.Inventory_Count__c - ivDetail.Amount__c > 0}">{!ivDetail.Inventory_Count__c - ivDetail.Amount__c}</apex:outputPanel></td> |
| | | <td class="labelStyle"><apex:outputPanel rendered="{!ivDetail.Inventory_Count__c != null && ivDetail.Amount__c - ivDetail.Inventory_Count__c > 0}">{!ivDetail.Amount__c - ivDetail.Inventory_Count__c}</apex:outputPanel></td> |
| | | <!-- 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230801 by lc Start --> |
| | | <td class="labelStyle"><apex:inputField value="{!ivDetail.Appearance_Check_Result__c}" style="width: 50px" /></td> |
| | | <td class="labelStyle"><apex:inputField value="{!ivDetail.Package_Check_Result__c}" style="width: 50px" /></td> |
| | | <!-- 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230801 by lc End --> |
| | | </tr> |
| | | </apex:repeat> |
| | | <apex:repeat value="{!consumInventoryDetailList}" var="ivDetail" id="consumInventroyRow"> |
| | |
| | | <td class="labelStyle"> |
| | | <apex:outputPanel layout="none" rendered="{!ivDetail.Asset__r.Manage_type__c == '个体管理' && ivDetail.Asset_Status__c != '冻结'}"> |
| | | <apex:inputField onchange="hasChangeFunc()" html-data-accsessary="false" html-data-barcode="{!ivDetail.Barcode__c}" html-data-ProductSerialNo="{!ivDetail.Asset__r.Product_Serial_No__c}" html-data-salesdepartment="{!ivDetail.Salesdepartment__c}" |
| | | html-disabled="true" html-data-qrcode="{!ivDetail.Fixture_QRCode__c}" html-data-aid="{!ivDetail.Asset__c}" html-data-frozen="{!ivDetail.Asset_Status__c == '冻结'}" html-data-bpguige="{!ivDetail.Asset__r.Product2.Packing_list_Fixture_F__c}" value="{!ivDetail.Inventory_Count__c}" style="width: 40px"/> |
| | | html-disabled="true" html-data-qrcode="{!ivDetail.Fixture_QRCode__c}" html-data-aid="{!ivDetail.Asset__c}" html-data-frozen="{!ivDetail.Asset_Status__c == '冻结'}" html-data-bpguige="{!ivDetail.Asset__r.Product2.Packing_list_Fixture_F__c}" value="{!ivDetail.Inventory_Count__c}" style="width: 80%"/> |
| | | <!-- add by rentx 20210823 start 耗材盘点时记录code --> |
| | | <apex:inputHidden value="{!ivDetail.HCCodes__c}" /> |
| | | <!-- add by rentx 20210823 start 耗材盘点时记录code --> |
| | |
| | | </apex:outputPanel> |
| | | <apex:outputPanel layout="none" rendered="{!ivDetail.Asset__r.Manage_type__c == '数量管理' || ivDetail.Asset_Status__c == '冻结'}"> |
| | | <apex:inputField onchange="hasChangeFunc()" html-data-accsessary="false" html-data-barcode="{!ivDetail.Barcode__c}" html-data-ProductSerialNo="{!ivDetail.Asset__r.Product_Serial_No__c}" html-data-salesdepartment="{!ivDetail.Salesdepartment__c}" |
| | | html-data-qrcode="{!ivDetail.Fixture_QRCode__c}" html-data-aid="{!ivDetail.Asset__c}" html-data-frozen="{!ivDetail.Asset_Status__c == '冻结'}" html-data-bpguige="{!ivDetail.Asset__r.Product2.Packing_list_Fixture_F__c}" value="{!ivDetail.Inventory_Count__c}" style="width: 40px" /> |
| | | html-data-qrcode="{!ivDetail.Fixture_QRCode__c}" html-data-aid="{!ivDetail.Asset__c}" html-data-frozen="{!ivDetail.Asset_Status__c == '冻结'}" html-data-bpguige="{!ivDetail.Asset__r.Product2.Packing_list_Fixture_F__c}" value="{!ivDetail.Inventory_Count__c}" style="width: 80%" /> |
| | | <!-- add by rentx 20210819 start --> |
| | | <apex:inputHidden value="{!ivDetail.HCCodes__c}" /> |
| | | <!-- add by rentx 20210819 start --> |
| | |
| | | </td> |
| | | <td class="labelStyle"><apex:outputPanel rendered="{!ivDetail.Inventory_Count__c != null && ivDetail.Inventory_Count__c - ivDetail.Amount__c > 0}">{!ivDetail.Inventory_Count__c - ivDetail.Amount__c}</apex:outputPanel></td> |
| | | <td class="labelStyle"><apex:outputPanel rendered="{!ivDetail.Inventory_Count__c != null && ivDetail.Amount__c - ivDetail.Inventory_Count__c > 0}">{!ivDetail.Amount__c - ivDetail.Inventory_Count__c}</apex:outputPanel></td> |
| | | <!-- 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230801 by lc Start --> |
| | | <td class="labelStyle"> |
| | | <apex:outputtext value="{0, date, yyyyMMdd}"> |
| | | <apex:param value="{!ivDetail.Consumable_Guaranteen_end__c}" /> |
| | | </apex:outputtext> |
| | | </td> |
| | | <td class="labelStyle"><apex:inputField value="{!ivDetail.Expiration_Check_Result__c}" style="width: 50px" /></td> |
| | | <td class="labelStyle"><apex:inputField value="{!ivDetail.Appearance_Check_Result__c}" style="width: 50px" /></td> |
| | | <td class="labelStyle"><apex:inputField value="{!ivDetail.Package_Check_Result__c}" style="width: 50px" /></td> |
| | | <!-- 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230801 by lc End --> |
| | | </tr> |
| | | </apex:repeat> |
| | | </table> |
| | |
| | | function lostReport(){ |
| | | //失单报告的ID |
| | | var ReportId = getParam('id'); |
| | | var str = '/apex/PCLLostReportPage?pageStatus=Edit&id=' + ReportId; |
| | | var str = '/apex/PCLLostReportPageLwc?pageStatus=Edit&reportId=' + ReportId; |
| | | window.open(str,'_self'); |
| | | |
| | | } |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexPage xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>52.0</apiVersion> |
| | | <apiVersion>57.0</apiVersion> |
| | | <availableInTouch>false</availableInTouch> |
| | | <confirmationTokenRequired>false</confirmationTokenRequired> |
| | | <label>LostEditPage1</label> |
| | |
| | | function lostReport(){ |
| | | //失单报告的ID |
| | | var ReportId = getParam('id'); |
| | | var str = '/apex/PCLLostReportPage?pageStatus=View&id=' + ReportId; |
| | | var str = '/apex/PCLLostReportPageLwc?pageStatus=View&reportId=' + ReportId; |
| | | window.open(str,'_self'); |
| | | |
| | | |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexPage xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>52.0</apiVersion> |
| | | <apiVersion>57.0</apiVersion> |
| | | <availableInTouch>false</availableInTouch> |
| | | <confirmationTokenRequired>false</confirmationTokenRequired> |
| | | <label>LostViewPage1</label> |
| | |
| | | --> |
| | | <apex:page controller="NewQuoteEntryController" sidebar="false" action="{!init}" id="Page" lightningStylesheets="true" > |
| | | <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/> |
| | | |
| | | |
| | | <apex:stylesheet value="{!URLFOR($Resource.NewQuoteEntryCss)}"/> |
| | | |
| | | <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.NewQuoteEntryJS)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.connection20)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.clipboardminjs)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.apex20)}"/> |
| | | <script type="text/javascript"> |
| | | if(window.sfdcPage && window.sfdcPage.appendToOnloadQueue){ |
| | | window.sfdcPage.appendToOnloadQueue( |
| | | function() { calonLoad() } |
| | | ); |
| | | } |
| | | //添加行 html特性增加滑动条 精琢技术 wql 2021/02/09 start |
| | | //dialog 弹窗 start |
| | | var popupBox; |
| | |
| | | // } |
| | | //dialog 弹窗 end |
| | | // 添加行 html特性增加滑动条 精琢技术 wql 2021/02/09 end |
| | | |
| | | debugger |
| | | var QuoteEntryMaxLine = {!QuoteEntryMaxLine}; |
| | | console.log(QuoteEntryMaxLine ); |
| | | var trade = '{!oppInfo.Trade}'; |
| | | console.log(trade ); |
| | | var displayCost = '{!displayCost}'; |
| | | console.log(displayCost ); |
| | | var quoid = '{!quoid}'; |
| | | console.log(quoid ); |
| | | var Session_ID = '{!$Api.Session_ID}'; |
| | | var Price_Valid_Period = '{!$Label.Price_Valid_Period}'; |
| | | var Message_001 = '{!$Label.Message_001}'; |
| | |
| | | var QuoteDecide = {!QuoteDecide}; |
| | | window.sfdcPage.appendToOnloadQueue(function() { calonLoad() }); |
| | | var openQuoteExcelImportWindow = null; |
| | | |
| | | // function checkHaveVirtual(msg){ |
| | | // var haveVirtual = j$(escapeVfId("Page:mainForm:block:hidden_HaveVirtual")).value(); |
| | | // console.log(haveVirtual); |
| | | // if(haveVirtual == true){ |
| | | // alert(msg); |
| | | // } |
| | | // } |
| | | |
| | | function selectAll() { |
| | | var checklist = j$("input[name='checklist']"); |
| | |
| | | </script> |
| | | <style type="text/css"> |
| | | div#iframelike { |
| | | color: rgb(24, 24, 24); |
| | | color: #fff; |
| | | height: 300px; |
| | | overflow: auto; |
| | | } |
| | |
| | | opacity: 0.5; |
| | | } |
| | | /* 添加行 html特性增加滑动条 精琢技术 wql 2021/02/09 end */ |
| | | |
| | | </style> |
| | | |
| | | <apex:form id="mainForm"> |
| | |
| | | <!-- 多年保修 start --> |
| | | <apex:inputHidden id="hidden_MultiYearWarrantyTotalPrice" value="{!quo.MultiYearWarrantyTotalPrice__c}"/> |
| | | <!-- 多年保修 end --> |
| | | <!-- 虚拟产品 start --> |
| | | <apex:inputHidden id="hidden_HaveVirtual" value="{!quo.Have_Virtual__c}"/> |
| | | <!-- 虚拟产品 end --> |
| | | <apex:inputHidden value="{!enableSales}" id="SalesRoot_Flg"/> |
| | | <apex:inputHidden value="{!oppInfo.CurrencyIsoCode}" id="CurrencyIsoCode"/> |
| | | <apex:inputHidden value="{!baseUrl}" id="baseUrl"/> |
| | |
| | | <apex:inputHidden value="{!oppInfo.Authorized_DB_No}" id="Authorized_DB_No" rendered="{!displayFlg}"/> |
| | | <apex:inputHidden value="{!oppInfo.If_Need_Authorize}" id="If_Need_Authorize" rendered="{!displayFlg}"/> |
| | | <!-- LHJ End --> |
| | | <!-- DB202303051651 产品报价金额自动计算 ssm start --> |
| | | <apex:inputHidden id="rateHospital" value="{!oppInfo.rate_hospital}"/> |
| | | <apex:inputHidden id="rateAgency1" value="{!oppInfo.rate_agency1}"/> |
| | | <!-- DB202303051651 产品报价金额自动计算 ssm end --> |
| | | |
| | | <apex:outputPanel id="message1"> |
| | | <apex:messages styleClass="editListError"/> |
| | |
| | | </tr> |
| | | </table> |
| | | </apex:outputPanel> |
| | | <div style="background-color:#f4f8fd73"> |
| | | <div> |
| | | <table border="0"> |
| | | <tr> |
| | | <th style="text-align:right;width:90px;">{!$Label.Quoto_No}</th> |
| | |
| | | <td style="width:130px;"><apex:commandButton onclick="openQuoteExcelImport(event);return false;" value="{!$Label.Excel_Import}" style="width:110px;" rerender="dummy"/></td> |
| | | <td style="text-align:right;width:50px;"><apex:commandButton rerender="dummy" id="Btn_RowDelete" onclick="radioChecker2('del');return false;" value="{!$Label.deleteLabel}" style="width:60px;" /></td> |
| | | <!-- 添加行 --> |
| | | <td width="50px;"> |
| | | <td width="40px;"> |
| | | <!-- 添加行 html特性增加滑动条 精琢技术 wql 2021/02/09 end --> |
| | | <apex:commandButton onclick="openAddMultipleRow(); return false;" value="增加行" rerender="{!displayFlg}"/> |
| | | </td> |
| | | <td style="width:50px;"> |
| | | <apex:commandButton rerender="dummy" id="Btn_RowUp" onclick="radioChecker2('up');return false;" value="{!$Label.Row_Up}" style="width:60px;"/> </td> |
| | | <td style="width:50px;"> |
| | | <td style="width:130px;"> |
| | | <apex:commandButton rerender="dummy" id="Btn_RowUp" onclick="radioChecker2('up');return false;" value="{!$Label.Row_Up}" style="width:60px;"/> |
| | | <apex:commandButton rerender="dummy" id="Btn_RowDown" onclick="radioChecker2('down');return false;" value="{!$Label.Row_Down}" style="width:60px;"/> |
| | | </td> |
| | | |
| | |
| | | </table> |
| | | --> |
| | | <!-- 原代码 end --> |
| | | <div style="background-color:#f4f8fd73"> |
| | | <table > |
| | | <tr> |
| | | <td> </td> |
| | | </tr> |
| | | <tr> |
| | | <th style="text-align:right;width:30px;"> </th> |
| | | <th style="text-align:left;width:130px;">合同保修期(年): </th> |
| | | <th style="text-align:right;width:50px;">合同保修期(年): </th> |
| | | <td style="width:190px;"><apex:inputField id="AllGurantee_Period" value="{!quo.Gurantee_Period__c}" onchange="calGuranteePeriod();" style="width:50px; text-align:right;" /> |
| | | <apex:inputHidden id="Gurantee_Period__c" value="{!quo.Gurantee_Period__c}"/> |
| | | </td> |
| | | <!-- 外贸多年保 取消nodiscount 合计 隐藏 精琢技术 wql 2021/01/18 start --> |
| | | <apex:variable id="contractWarranty" value="{!1}" var="abc" > |
| | | |
| | | <th style="text-align:right;width:130px;"> |
| | | <th style="text-align:right;width:50px;"> |
| | | {!$ObjectType.Quote.fields.MultiYearWarrantyTotalPrice__c.label} |
| | | : </th> |
| | | <td style="width:370px;"> |
| | |
| | | </div> |
| | | </td> |
| | | |
| | | <th style="text-align:right;width:130px;"> |
| | | <th style="text-align:right;width:20px;"> |
| | | {!$ObjectType.Quote.fields.multiYearWarranty__c.label} |
| | | : </th> |
| | | <td style="width:200px;"><apex:inputField id="multiYearWarranty" value="{!quo.multiYearWarranty__c}" onchange="callFromCancelgurantee_MD();" style="text-align:right;width:30px;" /></td> |
| | |
| | | <tr> |
| | | <td> </td> |
| | | </tr> |
| | | </table></div> |
| | | |
| | | </table> |
| | | <!-- 多年保修 end --> |
| | | |
| | | <DIV style="OVERFLOW-Y: hidden; OVERFLOW-X:auto;width:1260px"> |
| | |
| | | <td class="dataCell" style="text-align:center;width:125px;"> |
| | | <!-- Celon询价修改 2022-04-24 ssm start --> |
| | | <!-- <apex:inputText id="Assert" style="width:95%;" value="{!s.Asset_Model}" onclick="searchProduct('{!s.lineNo}',this.value)" /> --> |
| | | <apex:inputText id="Assert" style="width:95%;" value="{!s.Asset_Model}" onclick="searchProduct('{!s.lineNo}',{!quoteEntryMaxLine},'{!oppInfo.CelonOpportunity}')" /> |
| | | <apex:inputText id="Assert" style="width:95%;" value="{!s.Asset_Model}" onclick="searchProduct('{!s.lineNo}',this.value,'{!oppInfo.CelonOpportunity}')" /> |
| | | <!-- Celon询价修改 2022-04-24 ssm end --> |
| | | </td> |
| | | <td class="dataCell" id="{!Text(cnt-1)}:td_Status__c" style="width:70px;text-align: center;"> |
| | |
| | | </td> |
| | | <td class="dataCell" style="text-align: center;width:50px;"> |
| | | <!-- 2018/09/28 CHAN-B4YAB8 经销商单价计算 start --> |
| | | <apex:inputField id="Quantity" style="width:45px;text-align:center;" value="{!s.PageObject.Quantity__c}" onChange="calPrice('{!s.lineNo}');quoteAgencyTotalPriceAction();AgencyDiscountCalculation1();"/> |
| | | <apex:inputField id="Quantity" style="width:30px;text-align:center;" value="{!s.PageObject.Quantity__c}" onChange="calPrice('{!s.lineNo}');quoteAgencyTotalPriceAction();AgencyDiscountCalculation1();"/> |
| | | <!-- 2018/09/28 CHAN-B4YAB8 经销商单价计算 end --> |
| | | </td> |
| | | <td class="dataCell" style="width:20px;text-align: center;"> |
| | |
| | | |
| | | </script> |
| | | <!-- //添加行 html特性增加滑动条 精琢技术 wql 2021/02/09 end --> |
| | | <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.NewQuoteEntryJS)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.connection20)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.clipboardminjs)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.apex20)}"/> |
| | | </apex:page> |
| | |
| | | <apex:page standardcontroller="Lost_cancel_report__c" extensions="PCLLostReportController" showHeader="false" sidebar="false" |
| | | id="allPage" action="{!init}" title="询价失单/取消报告" lightningStylesheets="true"> |
| | | id="allPage" action="{!init}" title="询价失单/取消报告"> |
| | | <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}" /> |
| | | |
| | | <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}" /> |
| | | <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}" /> |
| | | <apex:form id="allForm"> |
| | | <script> |
| | | // 20230418 ljh DB202304320022 start |
| | | window.onload = function init(){ |
| | | clearBrandMannualName(); |
| | | } |
| | | // 20230418 ljh DB202304320022 end |
| | | function saveJs() { |
| | | blockme(); |
| | | save(); |
| | |
| | | search(topNum, secondNum); |
| | | } |
| | | // add tcm 20211118 end |
| | | // 20230418 ljh DB202304320022 start |
| | | function edit2JS() { |
| | | blockme(); |
| | | edit2(); |
| | | } |
| | | // 20230418 ljh DB202304320022 end |
| | | function setLostTotalAmount() { |
| | | //console.log('setLostTotalAmount start:'); |
| | | var totalAmount = document.getElementById("allPage:allForm:allBlock:EditPage:LostReport:lstReport:LostTotalAmountOut:LostTotalAmount"); |
| | |
| | | } |
| | | //console.log('setLostTotalAmount end'); |
| | | } |
| | | |
| | | //20230506 lt DB202304618804 包含超声 start |
| | | function setInclusionUltrasound() { |
| | | debugger |
| | | //包含超声 |
| | | // var Inc = document.getElementById("allPage:allForm:allBlock:ReadPage:LostReport:lstReport1:InclusionUltrasoundOut1:InclusionUltrasound"); |
| | | // //失单产品类别 |
| | | // var Inc = document.getElementById("allPage:allForm:allBlock:ReadPage:LostReport:lstReport1:InclusionUltrasoundOut1:InclusionUltrasound"); |
| | | // //失单产品区分 |
| | | // var Inc = document.getElementById("allPage:allForm:allBlock:ReadPage:LostReport:lstReport1:InclusionUltrasoundOut1:InclusionUltrasound"); |
| | | |
| | | var Inc = document.getElementById("allPage:allForm:allBlock:EditPage:LostReport:lstReport1:InclusionUltrasoundOut:InclusionUltrasound"); |
| | | var IncHidden = document.getElementById("allPage:allForm:allBlock:InclusionUltrasound"); |
| | | |
| | | if(Inc == null || Inc == undefined){ |
| | | Inc = '0'; |
| | | } |
| | | |
| | | // if (!!Inc && !!IncHidden) { |
| | | var tempInc = '0'; |
| | | |
| | | //失单品牌 |
| | | var i = 0; |
| | | var brandCount = parseInt("{!brandCount}"); |
| | | //失单型号 |
| | | var j = 0; |
| | | |
| | | for (var i = 0; i < brandCount; i++){ |
| | | for (var j = 0; j < 10; j++) { |
| | | //失单产品类别 |
| | | //allPage:allForm:allBlock:ReadPage:LostBrands:0:LostBrand:productTable:0:LostPRoductClass |
| | | // var LostProClassObject = |
| | | // document.getElementById("allPage:allForm:allBlock:EditPage:LostBrands:" + |
| | | // i + ":LostBrand:productTable:"+ j +":LostPRoductClass1"); |
| | | var LostProClassObject = j$(escapeVfId('allPage:allForm:allBlock:EditPage:LostBrands:' + |
| | | i + ':LostBrand:productTable:'+ j +':LostPRoductClass1')).value(); |
| | | |
| | | var LostProClassObject1 = j$(escapeVfId('allPage:allForm:allBlock:EditPage:LostBrands:' + |
| | | i + ':LostBrand:productTable:'+ j +':LostPRoductClass')).value(); |
| | | //失单产品区分 |
| | | //allPage:allForm:allBlock:ReadPage:LostBrands:0:LostBrand:productTable:0:LostProductCategory |
| | | // var LostProCategoryObject = |
| | | // document.getElementById("allPage:allForm:allBlock:EditPage:LostBrands:" + |
| | | // i + ":LostBrand:productTable:"+ j +":LostProductCategory1"); |
| | | var LostProCategoryObject = j$(escapeVfId('allPage:allForm:allBlock:EditPage:LostBrands:' + |
| | | i + ':LostBrand:productTable:'+ j +':LostProductCategory1')).value(); |
| | | |
| | | var LostProCategoryObject1 = j$(escapeVfId('allPage:allForm:allBlock:EditPage:LostBrands:' + |
| | | i + ':LostBrand:productTable:'+ j +':LostProductCategory')).value(); |
| | | |
| | | if(tempInc != '1'){ |
| | | if((LostProClassObject == '主机' && LostProCategoryObject == '超声主机') || (LostProClassObject1 == '主机' && LostProCategoryObject1 == '超声主机')){ |
| | | tempInc = '1'; |
| | | } |
| | | } |
| | | |
| | | // if (!!LostProClassObject && !!LostProCategoryObject) { |
| | | |
| | | // var LostProClassText = LostProClassObject.innerText; |
| | | // var LostProClassValue = LostProClassObject.value; |
| | | |
| | | // var LostProCategoryText = LostProCategoryObject.innerText; |
| | | // var LostProCategoryValue = LostProCategoryObject.value; |
| | | |
| | | // } |
| | | } |
| | | } |
| | | |
| | | Inc.innerText = tempInc; |
| | | IncHidden.value = tempInc; |
| | | |
| | | // } |
| | | |
| | | } |
| | | //20230506 lt DB202304618804 包含超声 end |
| | | |
| | | function setBrandName(brandNumber) { |
| | | blockme(); |
| | | setbrand(brandNumber); |
| | |
| | | setbrandmannual(brandNumber); |
| | | } |
| | | // 失单品牌不等于其他时,失单品牌(手动)清空并且不允许填写,失单品牌等于其他时,失单对手型号不可用 thh 2022-01-13 start |
| | | // function clearBrandMannualName(){ |
| | | // if(document.getElementById('allPage:allForm:allBlock:EditPage:LostBrands:0:LostBrand:BrandContent:Lost_By_CompanyOut:Lost_By_Company').value == '其他'){ |
| | | // j$(escapeVfId('allPage:allForm:allBlock:EditPage:LostBrands:0:LostBrand:productTable:0:LostProduct')).attr("disabled", true); |
| | | // } else{ |
| | | // document.getElementById('allPage:allForm:allBlock:EditPage:LostBrands:0:LostBrand:BrandContent:Lost_By_Company_MannualOut:Lost_By_Company_Mannual').value = ''; |
| | | // j$(escapeVfId('allPage:allForm:allBlock:EditPage:LostBrands:0:LostBrand:BrandContent:Lost_By_Company_MannualOut:Lost_By_Company_Mannual')).attr("disabled", true); |
| | | // } |
| | | // } |
| | | // 20230418 ljh DB202304320022 start |
| | | function clearBrandMannualName(){ |
| | | if(document.getElementById('allPage:allForm:allBlock:EditPage:LostBrands:0:LostBrand:BrandContent:Lost_By_CompanyOut:Lost_By_Company').value == '其他'){ |
| | | j$(escapeVfId('allPage:allForm:allBlock:EditPage:LostBrands:0:LostBrand:productTable:0:LostProduct')).attr("disabled", true); |
| | | var pageStatus = "{!pageStatus}"; |
| | | if(pageStatus == 'Create'|| pageStatus == 'Edit'){ |
| | | var brandCount = parseInt("{!brandCount}"); |
| | | for(var i = 0;i<brandCount;i++){ |
| | | if(document.getElementById('allPage:allForm:allBlock:EditPage:LostBrands:'+i+':LostBrand:BrandContent:Lost_By_CompanyOut:Lost_By_Company').value == '其他'){ |
| | | if(document.getElementById('allPage:allForm:allBlock:EditPage:LostBrands:'+i+':LostBrand:BrandContent:Lost_By_Company_MannualOut:Lost_By_Company_Mannual').value == '' || document.getElementById('allPage:allForm:allBlock:EditPage:LostBrands:'+i+':LostBrand:BrandContent:Lost_By_Company_MannualOut:Lost_By_Company_Mannual').value == null){ |
| | | j$(escapeVfId('allPage:allForm:allBlock:EditPage:LostBrands:'+i+':LostBrand:productTable:0:LostProduct')).attr("disabled", true); |
| | | } |
| | | } else{ |
| | | document.getElementById('allPage:allForm:allBlock:EditPage:LostBrands:0:LostBrand:BrandContent:Lost_By_Company_MannualOut:Lost_By_Company_Mannual').value = ''; |
| | | j$(escapeVfId('allPage:allForm:allBlock:EditPage:LostBrands:0:LostBrand:BrandContent:Lost_By_Company_MannualOut:Lost_By_Company_Mannual')).attr("disabled", true); |
| | | document.getElementById('allPage:allForm:allBlock:EditPage:LostBrands:'+i+':LostBrand:BrandContent:Lost_By_Company_MannualOut:Lost_By_Company_Mannual').value = ''; |
| | | j$(escapeVfId('allPage:allForm:allBlock:EditPage:LostBrands:'+i+':LostBrand:BrandContent:Lost_By_Company_MannualOut:Lost_By_Company_Mannual')).attr("disabled", true); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // 20230418 ljh DB202304320022 end |
| | | // 失单品牌不等于其他时,失单品牌(手动)清空并且不允许填写,失单品牌等于其他时,失单对手型号不可用 thh 2022-01-13 end |
| | | </script> |
| | | <apex:actionFunction name="save" action="{!save}" oncomplete="unblockUI();clearBrandMannualName();" rerender="allForm,EditButton2"></apex:actionFunction> |
| | |
| | | </apex:actionFunction> |
| | | <!-- 失单品牌不等于其他时,失单品牌(手动)清空并且不允许填写,失单品牌等于其他时,失单对手型号不可用 thh 2022-01-13 end --> |
| | | |
| | | <apex:actionFunction name="setbrandmannual" action="{!setbrandmannual}" oncomplete="unblockUI();" rerender="allForm"> |
| | | <!-- 20230418 ljh DB202304320022 start --> |
| | | <!-- <apex:actionFunction name="setbrandmannual" action="{!setbrandmannual}" oncomplete="unblockUI();" rerender="allForm"> --> |
| | | <apex:actionFunction name="setbrandmannual" action="{!setbrandmannual}" oncomplete="clearBrandMannualName(),unblockUI();" rerender="allForm"> |
| | | <!-- 20230418 ljh DB202304320022 end --> |
| | | <apex:param assignTo="{!setBrandNo}" name="setBrandNo" value="" /> |
| | | </apex:actionFunction> |
| | | |
| | | <apex:actionFunction name="submit" action="{!submit}" oncomplete="unblockUI();" rerender="allForm,EditButton2"></apex:actionFunction> |
| | | <!-- 20230418 ljh DB202304320022 start --> |
| | | <apex:actionFunction name="edit2" action="{!edit2}" oncomplete="clearBrandMannualName(),unblockUI();" rerender="allForm,EditButton2"></apex:actionFunction> |
| | | <!-- <apex:actionFunction name="addBrand" action="{!addBrand}" oncomplete="unblockUI();" rerender="allForm,EditButton2"></apex:actionFunction> --> |
| | | <apex:actionFunction name="addBrand" action="{!addBrand}" oncomplete="clearBrandMannualName(),unblockUI();" rerender="allForm,EditButton2"></apex:actionFunction> |
| | | |
| | | |
| | | <apex:actionFunction name="addBrand" action="{!addBrand}" oncomplete="unblockUI();" rerender="allForm,EditButton2"></apex:actionFunction> |
| | | <apex:actionFunction action="{!addProduct}" name="addProduct" reRender="allForm" oncomplete="unblockUI();"> |
| | | <!-- <apex:actionFunction action="{!addProduct}" name="addProduct" reRender="allForm" oncomplete="unblockUI();"> --> |
| | | <apex:actionFunction action="{!addProduct}" name="addProduct" reRender="allForm" oncomplete="clearBrandMannualName(),unblockUI();"> |
| | | <!-- 20230418 ljh DB202304320022 end --> |
| | | <apex:param assignTo="{!brandNo}" name="brandNo" value="" /> |
| | | </apex:actionFunction> |
| | | <apex:actionFunction action="{!Remove}" name="Remove" reRender="allForm" oncomplete="unblockUI();"> |
| | | <!-- 20230418 ljh DB202304320022 start --> |
| | | <!-- <apex:actionFunction action="{!Remove}" name="Remove" reRender="allForm" oncomplete="unblockUI();"> --> |
| | | <apex:actionFunction action="{!Remove}" name="Remove" reRender="allForm" oncomplete="clearBrandMannualName(),unblockUI();"> |
| | | <!-- 20230418 ljh DB202304320022 end --> |
| | | <apex:param assignTo="{!RemoveBrandNo}" name="RemoveBrandNo" value="" /> |
| | | </apex:actionFunction> |
| | | <!-- add tcm 20211118 start --> |
| | | <apex:actionFunction action="{!search}" name="search" reRender="allForm" oncomplete="unblockUI();"> |
| | | <!-- 20230418 ljh DB202304320022 start --> |
| | | <!-- <apex:actionFunction action="{!search}" name="search" reRender="allForm" oncomplete="unblockUI();"> --> |
| | | <apex:actionFunction action="{!search}" name="search" reRender="allForm" oncomplete="clearBrandMannualName(),unblockUI();"> |
| | | <!-- 20230418 ljh DB202304320022 end --> |
| | | <apex:param assignTo="{!topNum}" name="topNum" value="" /> |
| | | <apex:param assignTo="{!secondNum}" name="secondNum" value="" /> |
| | | </apex:actionFunction> |
| | |
| | | <apex:pageMessages /> |
| | | </apex:outputPanel> |
| | | <apex:inputHidden id="LostTotalAmount" value="{!LostReport.lostReport.LostTotalAmount__c}" /> |
| | | |
| | | <apex:inputHidden id="InclusionUltrasound" value="{!InclusionUltrasound}" /> <!-- 20230506 lt DB202304618804 包含超声 add --> |
| | | |
| | | <apex:outputPanel rendered="{!IF(pageStatus == 'Create'|| pageStatus == 'Edit' , 'true', 'false')}"> |
| | | <apex:pageBlock title="失单报告编辑页面" id="EditPage"> |
| | | <apex:pageBlockSection columns="2" id="LostReport"> |
| | | <apex:pageBlockSection columns="3" id="LostReport"> |
| | | <apex:pageBlockSectionItem id="lstReport" labelStyle="text-align:left;"> |
| | | <apex:pageBlockSectionItem labelStyle="text-align:left;"> |
| | | <apex:outputLabel value="失单类型: "> |
| | |
| | | <apex:outputLabel value="失单总金额(元): "></apex:outputLabel> |
| | | <apex:outputField id="LostTotalAmount" value="{!LostReport.lostReport.LostTotalAmount__c}" /> |
| | | </apex:pageBlockSectionItem> |
| | | |
| | | </apex:pageBlockSectionItem> |
| | | |
| | | <!-- 20230506 lt DB202304618804 包含超声 start --> |
| | | <apex:pageBlockSectionItem id="lstReport1" labelStyle="text-align:left;"> |
| | | |
| | | <apex:pageBlockSectionItem id="InclusionUltrasoundOut" labelStyle="text-align:left;"> |
| | | <apex:outputLabel value="包含超声: "></apex:outputLabel> |
| | | <apex:outputLabel id="InclusionUltrasound" value="{!InclusionUltrasound}" /> |
| | | </apex:pageBlockSectionItem> |
| | | |
| | | <apex:pageBlockSectionItem id="Report_Statusout" labelStyle="text-align:left;"> |
| | | <apex:outputLabel value="状态: "></apex:outputLabel> |
| | | <apex:outputField id="Report_Status" value="{!LostReport.lostReport.Report_Status__c}" /> |
| | | </apex:pageBlockSectionItem> |
| | | |
| | | </apex:pageBlockSectionItem> |
| | | <!-- 20230506 lt DB202304618804 包含超声 end --> |
| | | |
| | | </apex:pageBlockSection> |
| | | <apex:variable value="{!0}" var="BCnt" /> |
| | | <apex:repeat value="{!LostReport.LostBrands}" var="brand" id="LostBrands"> |
| | |
| | | <apex:outputText id="LostBrandName" value="失单品牌{!brand.lineNo + 1}" /> |
| | | <apex:commandButton rendered="{!IF(brandCount > 1 , 'true', 'false')}" onclick="RemoveJs({!brand.lineNo});return false;" |
| | | value="删除" style="width: 100px;margin-left: 50px;float: right;" /> |
| | | <apex:commandButton onclick="saveJs();return false;" value="保存" style="width: 100px;margin-left: 50px;float: right;" /> |
| | | <apex:commandButton onclick="setInclusionUltrasound();saveJs();return false;" value="保存" style="width: 100px;margin-left: 50px;float: right;" /> |
| | | </apex:outputPanel> |
| | | </apex:facet> |
| | | <apex:pageBlockSection id="BrandContent" columns="3"> |
| | |
| | | <apex:outputLabel value="失单品牌:"> |
| | | <span style="color:red;font-size: 18px;">* </span> |
| | | </apex:outputLabel> |
| | | <apex:inputField id="Lost_By_Company" onchange="setLostTotalAmount();setBrandName({!brand.lineNo});" value="{!brand.lostBrand.Lost_By_Company__c}"/> |
| | | <!-- 20230506 lt DB202304618804 包含超声 add setInclusionUltrasound(); --> |
| | | <apex:inputField id="Lost_By_Company" onchange="setLostTotalAmount();setInclusionUltrasound();setBrandName({!brand.lineNo});" value="{!brand.lostBrand.Lost_By_Company__c}"/> |
| | | </apex:pageBlockSectionItem> |
| | | |
| | | <apex:pageBlockSectionItem dataStyle="width:10%;border-top:2px solid;border-left:2px solid;border-bottom:2px solid;" labelStyle="width:23%;white-space:none;text-align:left;border-top:2px solid; solid ;border-bottom:2px solid;"> |
| | |
| | | </apex:column> |
| | | <apex:column headerValue="失单数量"> |
| | | <span style="color:red;font-size: 18px;">* </span> |
| | | <apex:inputField id="Quantity" style="min-width: 150px;" value="{!product.LostProductss.Quantity__c}" /> |
| | | <!-- 20230506 lt DB202304618804 包含超声 add onclick="setInclusionUltrasound();" --> |
| | | <apex:inputField id="Quantity" style="min-width: 150px;" value="{!product.LostProductss.Quantity__c}" onclick="setInclusionUltrasound();" /> |
| | | </apex:column> |
| | | <!-- SWAG-C6P9PX lt 20210913 add start --> |
| | | <apex:column headerValue="失单对手型号(手动)"> |
| | |
| | | <apex:outputField id="LostProductCategory1" value="{!product.LostProductss.ProductCategory__c}" /> |
| | | </apex:outputPanel> |
| | | <apex:outputPanel rendered="{!!IF(product.bool==true,true,false)}"> |
| | | <apex:inputField id="LostProductCategory" value="{!product.LostProductss.ProductCategory__c}" /> |
| | | <!-- 20230506 lt DB202304618804 包含超声 add onchange="setInclusionUltrasound();" --> |
| | | <apex:inputField id="LostProductCategory" value="{!product.LostProductss.ProductCategory__c}" onchange="setInclusionUltrasound();"/> |
| | | </apex:outputPanel> |
| | | </apex:column> |
| | | <!-- tcm 20211117 add end --> |
| | |
| | | </apex:repeat> |
| | | <apex:pageBlockButtons > |
| | | <apex:commandButton onclick="addBrandJs();return false;" value="追加品牌" style="width: 150px;margin-left: 50px;" /> |
| | | <apex:commandButton onclick="saveJs();return false;" value="保存" style="width: 150px;margin-left: 50px;" /> |
| | | <apex:commandButton onclick="setInclusionUltrasound();saveJs();return false;" value="保存" style="width: 150px;margin-left: 50px;" /> |
| | | <apex:commandButton id="CancelButton" action="{!cancel}" value="返回询价" style="width: 150px;margin-left: 50px;" /> |
| | | </apex:pageBlockButtons> |
| | | </apex:pageBlock> |
| | | </apex:outputPanel> |
| | | <apex:outputPanel rendered="{!IF(pageStatus == 'View', 'true', 'false')}"> |
| | | <apex:pageBlock title="失单报告查看页面" id="ReadPage"> |
| | | <apex:pageBlockSection columns="2" id="LostReport"> |
| | | <apex:pageBlockSection columns="3" id="LostReport"> |
| | | <apex:pageBlockSectionItem labelStyle="text-align:left;"> |
| | | <apex:pageBlockSectionItem labelStyle="text-align:left;"> |
| | | <apex:outputLabel value="失单类型: "></apex:outputLabel> |
| | |
| | | </apex:pageBlockSectionItem> |
| | | |
| | | </apex:pageBlockSectionItem> |
| | | |
| | | <!-- 20230506 lt DB202304618804 包含超声 start --> |
| | | <apex:pageBlockSectionItem id="lstReport1" labelStyle="text-align:left;"> |
| | | |
| | | <apex:pageBlockSectionItem id="InclusionUltrasoundOut1" labelStyle="text-align:left;"> |
| | | <apex:outputLabel value="包含超声: "></apex:outputLabel> |
| | | <apex:outputLabel id="InclusionUltrasound" value="{!InclusionUltrasound}" /> |
| | | </apex:pageBlockSectionItem> |
| | | |
| | | <apex:pageBlockSectionItem id="Report_Statusout" labelStyle="text-align:left;"> |
| | | <apex:outputLabel value="状态: "></apex:outputLabel> |
| | | <apex:outputField id="Report_Status" value="{!LostReport.lostReport.Report_Status__c}" /> |
| | | </apex:pageBlockSectionItem> |
| | | |
| | | </apex:pageBlockSectionItem> |
| | | |
| | | <!-- 20230506 lt DB202304618804 包含超声 end --> |
| | | |
| | | |
| | | </apex:pageBlockSection> |
| | | <apex:variable value="{!0}" var="BCnt" /> |
| | | <apex:repeat value="{!LostReport.LostBrands}" var="brand" id="LostBrands"> |
| | |
| | | |
| | | <apex:pageBlockButtons > |
| | | |
| | | <apex:commandButton rendered="{!IF(LostReport.lostReport.Report_Status__c = '草案', 'true', 'false')}" id="SubmitButton" onclick="submitJS();return false;" |
| | | <!-- 20230814 lt DB202308068183 失单报告审批节点增加助理审批节点 add |
| | | || LostReport.lostReport.Report_Status__c = '批准' |
| | | --> |
| | | <apex:commandButton rendered="{!IF(LostReport.lostReport.Report_Status__c = '草案' || LostReport.lostReport.Report_Status__c = '批准', 'true', 'false')}" id="SubmitButton" onclick="submitJS();return false;" |
| | | value="提交" style="width: 150px;margin-left: 50px;" /> |
| | | <apex:commandButton rendered="{!IF(LostReport.lostReport.Report_Status__c = '草案' || $Profile.Id = '00e10000000Y3o5AAC', 'true', 'false')}" |
| | | <!-- 20230418 ljh DB202304320022 start --> |
| | | <!-- <apex:commandButton rendered="{!IF(LostReport.lostReport.Report_Status__c = '草案' || $Profile.Id = '00e10000000Y3o5AAC', 'true', 'false')}" |
| | | id="EditButton" reRender="allForm" action="{!edit2}" value="编辑" style="width: 150px;margin-left: 50px;" |
| | | /> --> |
| | | <!-- 20230814 lt DB202308068183 失单报告审批节点增加助理审批节点 add $Label |
| | | DB202307674351 编辑权限:系统管理员 2S1 2S6-2 2S4 2S6-1 |
| | | || (LostReport.lostReport.Report_Status__c = '批准' && contains($Label.PCLReportProfileId,$Profile.Id)) |
| | | --> |
| | | <apex:commandButton rendered="{!IF(LostReport.lostReport.Report_Status__c = '草案' || $Profile.Id = '00e10000000Y3o5AAC' || (LostReport.lostReport.Report_Status__c = '批准' && contains($Label.PCLReportProfileId,$Profile.Id)), 'true', 'false')}" |
| | | id="EditButton" reRender="allForm" onclick="edit2JS();return false;" value="编辑" style="width: 150px;margin-left: 50px;" |
| | | /> |
| | | <!-- 20230418 ljh DB202304320022 end --> |
| | | <apex:commandButton id="CancelButton" action="{!cancel}" value="返回询价" style="width: 150px;margin-left: 50px;" /> |
| | | |
| | | </apex:pageBlockButtons> |
| New file |
| | |
| | | .slds-theme--error { |
| | | --slds-g-color-error-base-40: #ba0517 !important; |
| | | } |
| | | .slds-theme--success { |
| | | --slds-g-color-success-base-50: #2E844A !important; |
| | | } |
| | | .slds-theme--warning { |
| | | --slds-g-color-warning-base-60: #DD7A01 !important; |
| | | } |
| | | .slds-theme--info { |
| | | --slds-g-color-neutral-base-50: #747474 !important; |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <StaticResource xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <cacheControl>Public</cacheControl> |
| | | <contentType>text/css</contentType> |
| | | <description>提示框颜色闪动解决方案</description> |
| | | </StaticResource> |