Merge branch 'LEX_dev' of http://47.92.229.245:8089/r/lightningupdate into LEX_dev
| | |
| | | <template> |
| | | <div class="sisToOPDHolder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| | |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import { CurrentPageReference,NavigationMixin } from 'lightning/navigation'; |
| | | import { updateRecord } from 'lightning/uiRecordApi'; |
| | | |
| | | import LightningConfirm from 'lightning/confirm'; |
| | | import init from '@salesforce/apex/AddSubmitApprovalProcessController.init'; |
| | | import submitApproval from '@salesforce/apex/AddSubmitApprovalProcessController.submitApproval'; |
| | | import setSObjectShare from '@salesforce/apex/ControllerUtil.setSObjectShare'; |
| | | import changeAddApprovalStatus from '@salesforce/apex/AddSubmitApprovalProcessController.changeAddApprovalStatus'; |
| | | |
| | | export default class lexAddSubmitApprovalProcess extends LightningElement { |
| | | @api recordId; |
| | |
| | | this.ToastShow('没有需要审批的追加附属品','warning'); |
| | | return; |
| | | } |
| | | if (!confirm("一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?")) { |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | // if (!confirm("一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?")) { |
| | | // this.dispatchEvent(new CloseActionScreenEvent()); |
| | | // return; |
| | | // } |
| | | const SUBMIT = LightningConfirm.open({ |
| | | message: "一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?", |
| | | variant: 'headerless', |
| | | label: '提示信息', |
| | | // setting theme would have no effect |
| | | }); |
| | | |
| | | if(SUBMIT==false){ |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | |
| | | // 希望到货日不能早于申请提交日-0418追加 |
| | | //if ('{!Rental_Apply__c.Request_shipping_day__c}' < '{!TODAY()}') { |
| | | // alert('希望到货日不能早于申请提交日'); |
| | |
| | | } |
| | | } |
| | | |
| | | // share |
| | | //share |
| | | var userAccess = new Array(); |
| | | userAccess.push(result.applyUserId + '_Edit'); |
| | | |
| | |
| | | //userAccess.push('{!Rental_Apply__c.ZongjianApprovalManagerId__c}_Read');//20210727 ljh SFDC-C54C33 update 共享触发器完成 |
| | | //userAccess.push('{!Rental_Apply__c.Status__c}_Read'); |
| | | |
| | | console.log('参数==='+result.rentalApplyId+' '+userAccess+' '+result.ownerId); |
| | | setSObjectShare({ |
| | | sobjectName:'Rental_Apply__Share', |
| | | rowCause:'ApplyUserShare__c', |
| | |
| | | userAccess:userAccess, |
| | | ownerId:result.ownerId |
| | | }).then(res=>{ |
| | | console.log('setSObjectShareSuccess===='+res); |
| | | |
| | | if(res!='OK'){ |
| | | this.ToastShow(res,'warning'); |
| | | return; |
| | | }else{ |
| | | console.log('setSObjectShareSuccess====OK'); |
| | | //追加备品申请状态确认,已经提交过的申请,不能重复提交Status__c |
| | | if (result.rentalApplyStatus != '已批准' && result.rentalApplyStatus != '已出库指示') { |
| | | this.ToastShow('请备品申请状态确认,申请状态已批准后才可以提交追加审批','warning'); |
| | | return; |
| | | } |
| | | |
| | | changeAddApprovalStatus({ |
| | | recordId: this.recordId, |
| | | status: '填写完毕' |
| | | }).then(changeResult=>{ |
| | | if(changeResult == '更新成功'){ |
| | | submitApproval({ |
| | | recordId: this.recordId |
| | | }).then(submitApprovalRes=>{ |
| | | if(submitApprovalRes == 'OK'){ |
| | | this.ToastShow('提交追加待审批','success'); |
| | | this.updateRecordView(this.recordId); |
| | | }else{ |
| | | this.ToastShow('追加待审批失败','ERROR'); |
| | | } |
| | | }) |
| | | }else{ |
| | | this.ToastShow(changeResult,'error'); |
| | | } |
| | | }) |
| | | } |
| | | }).catch(err=>{ |
| | | console.log('setSObjectShareErr===='+err); |
| | | }) |
| | | |
| | | // var request = new sforce.ProcessSubmitRequest(); |
| | | // request.objectId = "{!Rental_Apply__c.Id}"; |
| | | // var processResults = sforce.connection.process([request]); |
| | | |
| | | |
| | | // if (processResults[0].errors != null) { |
| | | // var back = new sforce.SObject("Rental_Apply__c"); |
| | | // back.Id = "{!Rental_Apply__c.Id}"; |
| | | // back.Add_Approval_Status__c = "草案中"; |
| | | // var backResult = sforce.connection.update([back]); |
| | | // backMessages = this.getConnectDMLErrorMessages(backResult); |
| | | // if (backMessages.length > 0) { |
| | | // this.showToast(backMessages.join("\n"),'error'); |
| | | // return; |
| | | // } |
| | | |
| | | // var errmsg = processResults[0].errors.message.toString(); |
| | | // this.showToast(errmsg,'error'); |
| | | // return; |
| | | // } |
| | | |
| | | //updateRecord({fields: { Id: this.recordId }}); |
| | | |
| | | submitApproval({ |
| | | recordId: this.recordId |
| | | }).then(res=>{ |
| | | console.log('submitApproval===='+res); |
| | | if(res == 'OK'){ |
| | | this.ToastShow('提交成功','success'); |
| | | }else{ |
| | | this.ToastShow(res,'error'); |
| | | } |
| | | }) |
| | | updateRecord({fields: { Id: this.recordId }}); |
| | | |
| | | }).catch(err=>{ |
| | | console.log('sErr====',err.message); |
| | | console.log('====1111====',err); |
| | | }) |
| | | } |
| | | |
| | |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | |
| | | getConnectDMLErrorMessages(results){ |
| | | var messages = [], |
| | | i = 0, |
| | | len = results.length, |
| | | r; |
| | | for (; i < len; i++) { |
| | | r = results[i]; |
| | | if (!r.getBoolean("success")) { |
| | | messages = messages.concat(this.getConnectDMLMessagesOfAResult(r)); |
| | | } |
| | | } |
| | | return messages; |
| | | } |
| | | |
| | | getConnectDMLMessagesOfAResult(res){ |
| | | var messages = [], |
| | | errors = res.getArray("errors"), |
| | | i = 0, |
| | | len = errors.length, |
| | | e; |
| | | for (; i < len; i++) { |
| | | e = errors[i]; |
| | | messages.push(e.message + " " + this.getConnectDMLErrorFields(e)); |
| | | } |
| | | return messages; |
| | | } |
| | | |
| | | getConnectDMLErrorFields(error){ |
| | | var fields = error.getArray('fields'); |
| | | if (fields.length > 0) { |
| | | return "[" + fields.join(",") + "]" |
| | | } else { |
| | | return ""; |
| | | } |
| | | } |
| | | updateRecordView(recordId) { |
| | | updateRecord({fields: { Id: recordId }}); |
| | | } |
| | | } |
| | |
| | | <template> |
| | | <div class="sisToOPDHolder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| | |
| | | import { CurrentPageReference,NavigationMixin } from 'lightning/navigation'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import { updateRecord } from 'lightning/uiRecordApi'; |
| | | |
| | | import init from '@salesforce/apex/AllReceivedFseController.init'; |
| | | import getRaeSet from '@salesforce/apex/AllReceivedFseController.getRaeSet'; |
| | |
| | | recordId: this.recordId |
| | | }).then(res=>{ |
| | | if(res == 'SUCCESS'){ |
| | | const evt = new ShowToastEvent({ |
| | | title : '现场已全部收货', |
| | | message: '', |
| | | variant: 'success' |
| | | }); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | this.dispatchEvent(evt); |
| | | this.showToast('现场已全部收货','success'); |
| | | return; |
| | | }else{ |
| | | const errToast = new ShowToastEvent({ |
| | | title : res, |
| | | message: '', |
| | | variant: 'error' |
| | | }); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | this.dispatchEvent(errToast); |
| | | |
| | | console.log(res); |
| | | this.showToast(res,'warning'); |
| | | return; |
| | | } |
| | | |
| | | }) |
| | |
| | | console.log('init==='+err); |
| | | }) |
| | | } |
| | | |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | if(type == 'success'){ |
| | | this.updateRecordView(this.recordId); |
| | | } |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | |
| | | updateRecordView(recordId) { |
| | | updateRecord({fields: { Id: recordId }}); |
| | | } |
| | | } |
| | |
| | | <template> |
| | | <div class="EquipmentRentalPDF" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| | |
| | | import { LightningElement, track, wire, api } from 'lwc'; |
| | | import {CurrentPageReference,NavigationMixin} from 'lightning/navigation'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import { updateRecord } from 'lightning/uiRecordApi'; |
| | | |
| | | import init from '@salesforce/apex/rentalApplyEquipmentRentalPDFController.initJumptoPDFButton'; |
| | | import init from '@salesforce/apex/RentalApplyEquipmentRentalPDFController.initJumptoPDFButton'; |
| | | |
| | | export default class rentalApplyEquipmentRentalPDF extends LightningElement { |
| | | export default class lexEquipmentRentalPDF extends LightningElement { |
| | | @api recordId; |
| | | IsLoading = true; |
| | | |
| | |
| | | recordId : this.recordId |
| | | }).then(result => { |
| | | if(result != null) { |
| | | this.IsLoading = false; |
| | | let num = result.pageLength; |
| | | console.log("======"+this.recordId + ' ' +num); |
| | | console.log("https://ocsm--partial.sandbox.lightning.force.com/lightning/r/FixtureRentalPDF?raid=" + this.recordId + "&page=" + num) |
| | | window.location.replace("https://ocsm--partial.sandbox.lightning.force.com/apex/FixtureRentalPDF?raid=" + this.recordId + "&page=" + num); |
| | | console.log('shipmentRequestedCnt'+ result.shipmentRequestedCnt); |
| | | if(result.shipmentRequestedCnt > 0){ |
| | | this.IsLoading = false; |
| | | let num = result.pageLength; |
| | | window.open("https://ocsm--partial.sandbox.lightning.force.com/apex/FixtureRentalPDF?raid=" + this.recordId + "&page=" + num); |
| | | }else{ |
| | | this.showToast('当前的申请单中没有已出库指示的配套。','error'); |
| | | } |
| | | } |
| | | }) |
| | | .catch( error =>{ |
| | |
| | | }) |
| | | } |
| | | |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | if(type == 'success'){ |
| | | this.updateRecordView(); |
| | | } |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | |
| | | updateRecordView(recordId) { |
| | | updateRecord({fields: { Id: recordId }}); |
| | | } |
| | | |
| | | } |
| | |
| | | <template> |
| | | <div class="sisToOPDHolder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | .outerBorderCss{ |
| | | border: 1px solid #D4D4D4; |
| | | border-radius : 5px; |
| | | border-top : 3px solid #565959; |
| | | } |
| | | .borderCss{ |
| | | border: 1px solid #D4D4D4; |
| | | border-radius : 5px; |
| | | margin-bottom : 7px; |
| | | border-top : 3px solid #565959; |
| | | } |
| | | .headerDorderCss{ |
| | | border-top: 1px solid #565959; |
| | | border-bottom: 1px solid #D4D4D4; |
| | | padding:3px; |
| | | } |
| | | .centerCss{ |
| | | text-align: center; |
| | | } |
| | | .centerCss .left{ |
| | | margin-left: 100px; |
| | | }/* sample css file */ |
| New file |
| | |
| | | <template> |
| | | <div class="sisToOPDHolder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | import { LightningElement, track, wire, api } from 'lwc'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import { CurrentPageReference } from 'lightning/navigation'; |
| | | |
| | | import init from '@salesforce/apex/RentalApplyFaultController.init'; |
| | | import updateRentalApplyFaultStatus from '@salesforce/apex/RentalApplyFaultController.updateRentalApplyFaultStatus'; |
| | | export default class lexFeedbackReport extends LightningElement { |
| | | @api recordId; |
| | | IsLoading = true; |
| | | |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference){ |
| | | if(currentPageReference) { |
| | | const urlValue = currentPageReference.state.recordId; |
| | | if(urlValue) { |
| | | let str = `${urlValue}`; |
| | | this.recordId = str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | connectedCallback(){ |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(res=>{ |
| | | if(res.status__c!='已发送'){ |
| | | this.showToast('只有已发送的检测分析报告才能发送','warning'); |
| | | return; |
| | | } |
| | | |
| | | updateRentalApplyFaultStatus({ |
| | | recordId: this.recordId, |
| | | updateStatus: '已反馈' |
| | | }).then(result=>{ |
| | | if(result=='SUCCESS'){ |
| | | this.showToast('报告已反馈','success'); |
| | | }else{ |
| | | this.showToast(res,'error'); |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | if(type == 'success'){ |
| | | this.updateRecordView(); |
| | | } |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexFeedbackReport"> |
| | | <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 |
| | |
| | | .holder{ |
| | | position: relative; |
| | | display: inline-block; |
| | | width: 80px; |
| | | height: 80px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .container .uiContainerManager{ |
| | | display : none !important; |
| | | } |
| | | .toast{ |
| | | border: 1px solid #c9c9c9; |
| | | border-radius: 10px; |
| | | width: 50%; |
| | | margin: 0 auto; |
| | | font-size: 18px; |
| | | font-weight: bold; |
| | | padding: 10px 20px; |
| | | background: #feb75d; |
| | | display: flex; |
| | | } |
| New file |
| | |
| | | <template> |
| | | <div class="holder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | <div if:false={IsLoading} class="toast"> |
| | | <span style="padding: 10px;">{msg}</span> |
| | | <button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" onclick={closeAction} title="Close" style="background-color: #e5e4e2;margin-top: 15px;"> |
| | | <lightning-icon class="greyIcon" icon-name="utility:close" alternative-text="Connected" variant="inverse" size="small" |
| | | title="Close" style="color: black;"></lightning-icon> |
| | | <span class="slds-assistive-text">Close</span> |
| | | </button> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | import { LightningElement, track, wire, api } from 'lwc'; |
| | | |
| | | export default class lexFixtureSetManage extends LightningElement { |
| | | @api recordId; |
| | | |
| | | connectedCallback(){ |
| | | window.open("/apex/FixtureSetManage?pt_recid=" + this.recordId, "_top"); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexFixtureSetManage"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | <target>lightning__FlowScreen</target> |
| | | </targets> |
| | | <targetConfigs> |
| | | <targetConfig targets="lightning__FlowScreen"> |
| | | <property name="recordId" type="String" label="recordId"/> |
| | | </targetConfig> |
| | | </targetConfigs> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | .rentalApplyCanleButtonHolder{ |
| | | position: relative; |
| | | display: inline-block; |
| | | width: 80px; |
| | | height: 80px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .container .uiContainerManager{ |
| | | display : none !important; |
| | | } |
| New file |
| | |
| | | <template> |
| | | <div class="rentalApplyCanleButtonHolder" if:true={IsLoding}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"> </lightning-spinner> </div> |
| | | </template> |
| New file |
| | |
| | | import { LightningElement, track, wire, api } from 'lwc'; |
| | | import { CurrentPageReference,NavigationMixin } from 'lightning/navigation'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { updateRecord } from 'lightning/uiRecordApi'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import LightningConfirm from 'lightning/confirm'; |
| | | |
| | | import init from '@salesforce/apex/LexInventoryHeaderClearStatusController.init'; |
| | | import updateStatus from '@salesforce/apex/LexInventoryHeaderClearStatusController.updateStatus'; |
| | | export default class lexInventoryHeaderClearStatus extends LightningElement { |
| | | @api recordId; |
| | | IsLoading = true; |
| | | |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | | if (currentPageReference) { |
| | | const urlValue = currentPageReference.state.recordId; |
| | | if (urlValue) { |
| | | let str = `${urlValue}`; |
| | | console.log("str:"+str); |
| | | this.recordId = str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | connectedCallback(){ |
| | | init({ |
| | | recordId:this.recordId |
| | | }).then(results=>{ |
| | | for(var i =0; i<results.length;i++){ |
| | | if(results[i].Inventory_Status__c != '处理中' && results[i].Inventory_Status__c != null){ |
| | | alert(results[i].Name+'的盘点状态为【'+results[i].Inventory_Status__c+'】,不能清除此盘点状态。'); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | const result = LightningConfirm.open({ |
| | | message: "请确认是否要清除盘点状态?", |
| | | variant: 'headerless', |
| | | label: '提示信息', |
| | | }) |
| | | |
| | | if (result==false) { |
| | | return; |
| | | } |
| | | |
| | | updateStatus({ |
| | | inventoryList: results |
| | | }).then(res=>{ |
| | | if(res == '清除盘点状态完毕'){ |
| | | this.showToast('清除盘点状态完毕', 'success'); |
| | | return; |
| | | }else{ |
| | | this.showToast(res, 'error'); |
| | | return; |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | if(type == 'success'){ |
| | | this.updateRecordView(); |
| | | } |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexRentalApplyCanleButton"> |
| | | <apiVersion>54.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 |
| | |
| | | <template> |
| | | |
| | | </template> |
| New file |
| | |
| | | import { LightningElement, track, wire, api } from 'lwc'; |
| | | import { CurrentPageReference,NavigationMixin } from 'lightning/navigation'; |
| | | |
| | | export default class lexInventoryPage extends LightningElement { |
| | | @api recordId; |
| | | IsLoading = true; |
| | | |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | | if (currentPageReference) { |
| | | const urlValue = currentPageReference.state.recordId; |
| | | if (urlValue) { |
| | | let str = `${urlValue}`; |
| | | this.recordId = str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | connectedCallback(){ |
| | | window.open("/apex/InventoryReport?Id=" + this.recordId); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexInventoryPage"> |
| | | <apiVersion>50.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | </LightningComponentBundle> |
| | |
| | | <template> |
| | | <div class="EquipmentRentalPDF" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| | |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import { updateRecord } from 'lightning/uiRecordApi'; |
| | | |
| | | import init from '@salesforce/apex/loanerArrangedEmailController.init'; |
| | | import getRentalApplyEquipmentSet from '@salesforce/apex/loanerArrangedEmailController.getRentalApplyEquipmentSet'; |
| | | import init from '@salesforce/apex/LoanerArrangedEmailController.init'; |
| | | import getRentalApplyEquipmentSet from '@salesforce/apex/LoanerArrangedEmailController.getRentalApplyEquipmentSet'; |
| | | import approvalCheck from '@salesforce/apex/RentalApplyWebService.approvalCheck'; |
| | | import setShipment_request from '@salesforce/apex/RentalApplyWebService.approvalCheck'; |
| | | import setShipment_request from '@salesforce/apex/RentalApplyWebService.setShipment_request'; |
| | | export default class lexLoanerArrangedEmail extends LightningElement { |
| | | @api recordId; |
| | | IsLoading = true; |
| | |
| | | } |
| | | |
| | | connectedCallback() { |
| | | |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result => { |
| | | let id = result.id; |
| | | let statusArr = result.statusList; |
| | | console.log('result==='+JSON.stringify(result)); |
| | | if(result != null) { |
| | |
| | | //bp2 alert(rs2); |
| | | //bp2 } else { |
| | | //var rs1 = sforce.apex.execute("RentalApplyWebService", "setShipment_request", {raid : "{!Rental_Apply__c.Id}"}); |
| | | console.log('setShipment_request=='); |
| | | setShipment_request({ |
| | | raid: this.recordId |
| | | }).then(res=>{ |
| | | console.log('res==',res); |
| | | if (res == "状态更新到已出库指示") { |
| | | this.showToast("状态更新到已出库指示",'success'); |
| | | if (res == '状态更新到已出库指示') { |
| | | this.showToast('状态更新到已出库指示','success'); |
| | | print(); |
| | | // setTimeout(function() { |
| | | // location.href = "/{!Rental_Apply__c.Id}"; |
| | | // },100); |
| | | this.updateRecordView(this.recordId); |
| | | return; |
| | | }else { |
| | | this.showToast(res,'error'); |
| | | console.log('else==',res); |
| | | const evt = new ShowToastEvent({ |
| | | title: 'Error', |
| | | message:res, |
| | | variant: 'error' |
| | | }); |
| | | this.dispatchEvent(evt); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }).catch(e=>{ |
| | | console.log('approvalCheck==='+e); |
| | |
| | | console.log('setShipment_request==='+e); |
| | | }) |
| | | } |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }) |
| | | } |
| | |
| | | getRentalApplyEquipmentSet({ |
| | | recordId: this.recordId |
| | | }).then(result => { |
| | | window.open("https://ocsm--partial.sandbox.lightning.force.com/apex/FixtureRentalPDF?raid=" + this.recordId + "&page=" + result); |
| | | window.open("/apex/FixtureRentalPDF?raid=" + this.recordId + "&page=" + result); |
| | | }) |
| | | } |
| | | |
| | |
| | | variant: type |
| | | }); |
| | | if(type == 'success'){ |
| | | this.updateRecordView(); |
| | | this.updateRecordView(this.recordId); |
| | | } |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| New file |
| | |
| | | <template> |
| | | |
| | | </template> |
| New file |
| | |
| | | import { LightningElement, track, wire, api } from 'lwc'; |
| | | import { CurrentPageReference,NavigationMixin } from 'lightning/navigation'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | |
| | | import init from '@salesforce/apex/lexConsumApplyController.init'; |
| | | import approvalCheck from '@salesforce/apex/ConsumApplyWebService.approvalCheck'; |
| | | import setShipment_request from '@salesforce/apex/ConsumApplyWebService.setShipment_request'; |
| | | import getLength1 from '@salesforce/apex/lexConsumApplyController.getLength1'; |
| | | import getLength2 from '@salesforce/apex/lexConsumApplyController.getLength2'; |
| | | export default class lexLoanerArrangedEmailConsumApply extends LightningElement { |
| | | @api recordId; |
| | | |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference){ |
| | | if(currentPageReference) { |
| | | const urlValue = currentPageReference.state.recordId; |
| | | if(urlValue) { |
| | | let str = `${urlValue}`; |
| | | this.recordId = str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | connectedCallback(){ |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(res=>{ |
| | | if(res.weiAssignedCnt > 0){ |
| | | this.showToast('申请单内存在未分配的耗材,请分配或分割申请单','warning'); |
| | | return; |
| | | }else if(res.consumApplyStatus == '取消'){ |
| | | this.showToast('学会取消,不可出库指示','warning'); |
| | | return; |
| | | }else if(res.consumApplyStatus == '已出库指示' && res.assignedNotShipment == 0){ |
| | | this.showToast('所有的耗材备品Set一览都进行过出库指示了','warning'); |
| | | return; |
| | | }else if(res.assignedNotShipment == 0){ |
| | | this.showToast('没有可以出库指示的明细','warning'); |
| | | return; |
| | | }else{ |
| | | approvalCheck({ |
| | | ConsumApplyId: this.recordId |
| | | }).then(rs1=>{ |
| | | if(rs1 != '1'){ |
| | | this.showToast(rs1,'warning'); |
| | | }else{ |
| | | setShipment_request({ |
| | | raid: this.recordId |
| | | }).then(result=>{ |
| | | if(result == '状态更新到已出库指示'){ |
| | | this.showToast('状态更新到已出库指示','success'); |
| | | window.open('/apex/ConsumTrialPDF?id={!Consum_Apply__c.Id}'); |
| | | return; |
| | | // if(res.bollowDate!= '' || res.bollowDate != null){ |
| | | // getLength1({recordId:this.recordId}).then(result1=>{ |
| | | // window.open('/apex/ConsumTrialPDF?id={!Consum_Apply__c.Id}'); |
| | | // }) |
| | | // } |
| | | }else{ |
| | | this.showToast(result,'warning'); |
| | | return; |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | print(){ |
| | | |
| | | } |
| | | |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | if(type == 'success'){ |
| | | this.updateRecordView(this.recordId); |
| | | } |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | |
| | | updateRecordView(recordId) { |
| | | updateRecord({fields: { Id: recordId }}); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexLoanerArrangedEmailConsumApply"> |
| | | <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 |
| | |
| | | .rentalApplyCanleButtonHolder{ |
| | | position: relative; |
| | | display: inline-block; |
| | | width: 80px; |
| | | height: 80px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .container .uiContainerManager{ |
| | | display : none !important; |
| | | } |
| New file |
| | |
| | | <template> |
| | | <div class="rentalApplyCanleButtonHolder" if:true={IsLoding}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"> </lightning-spinner> </div> |
| | | </template> |
| New file |
| | |
| | | import { LightningElement, track, wire, api } from 'lwc'; |
| | | import { CurrentPageReference,NavigationMixin } from 'lightning/navigation'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { updateRecord } from 'lightning/uiRecordApi'; |
| | | |
| | | import init from '@salesforce/apex/LexInventoryHeaderController.init'; |
| | | export default class lexLostReportInventoryPage extends LightningElement { |
| | | @api recordId; |
| | | IsLoading = true; |
| | | |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | | if (currentPageReference) { |
| | | const urlValue = currentPageReference.state.recordId; |
| | | if (urlValue) { |
| | | let str = `${urlValue}`; |
| | | this.recordId = str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | connectedCallback(){ |
| | | init({ |
| | | recordId:this.recordId |
| | | }).then(res=>{ |
| | | if(res.Asset__c==null || res.Asset__c==''){ |
| | | window.open("/apex/LostReportEditAsset?id=" + this.recordId,'height=600, width=600'); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }) |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexRentalApplyCanleButton"> |
| | | <apiVersion>54.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| | |
| | | <template> |
| | | <div class="sisToOPDHolder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| | |
| | | import { LightningElement, track, wire, api } from 'lwc'; |
| | | import { CurrentPageReference,NavigationMixin } from 'lightning/navigation'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | |
| | | import init from '@salesforce/apex/MainFixtureSelectButtonController.init'; |
| | | export default class lexMainFixtureSelect extends LightningElement { |
| | |
| | | |
| | | |
| | | connectedCallback(){ |
| | | init({ |
| | | recordId:this.recordId |
| | | }).then(res=>{ |
| | | window.open("/apex/MainFixtureSelect?pt_recid=" + res, "_top"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }).catch(err=>{ |
| | | console.log(err); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }) |
| | | window.open("/apex/MainFixtureSelect?pt_recid=" + this.recordId, "_top"); |
| | | } |
| | | |
| | | closeAction() { |
| | | //返回当前的备品申请 |
| | | window.open("/"+this.recordId,'_self'); |
| | | } |
| | | } |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexOCMSubmit"> |
| | | <apiVersion>54.0</apiVersion> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexMainFixtureSelect"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | <target>lightning__FlowScreen</target> |
| | | </targets> |
| | | <targetConfigs> |
| | | <targetConfig targets="lightning__FlowScreen"> |
| | | <property name="recordId" type="String" label="recordId"/> |
| | | </targetConfig> |
| | | </targetConfigs> |
| | | </LightningComponentBundle> |
| | |
| | | <template> |
| | | <div class="sisToOPDHolder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| | |
| | | <div class="holder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | <div if:false={IsLoading} class="toast"> |
| | | <div if:true={IsDisplay} class="toast"> |
| | | <span style="padding: 10px;">{msg}</span> |
| | | <button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" onclick={closeAction} title="Close" style="background-color: #e5e4e2;margin-top: 15px;"> |
| | | <lightning-icon class="greyIcon" icon-name="utility:close" alternative-text="Connected" variant="inverse" size="small" |
| | | title="Close" style="color: black;"></lightning-icon> |
| | | <span class="slds-assistive-text">Close</span> |
| | | </button> |
| | | </button> |
| | | </div> |
| | | </template> |
| | |
| | | //只获取当前list选中的一览Id |
| | | @api rentalApplySetIds; |
| | | IsLoading=true; |
| | | IsDisplay=true; |
| | | //提示信息 |
| | | msg; |
| | | |
| | | connectedCallback(){ |
| | | console.log(this.recordId); |
| | | console.log(JSON.stringify(this.rentalApplySetIds)); |
| | | // if(this.rentalApplySetIds.length<1){ |
| | | if (this.recordId && JSON.stringify(this.rentalApplySetIds)) { |
| | | this.IsLoading=false; |
| | | if (this.recordId && this.rentalApplySetIds) { |
| | | this.IsDisplay = false; |
| | | LightningConfirm.open({ |
| | | message: '你确定要重新分配吗?', |
| | | variant: 'headerless', |
| | |
| | | rentalApplyEquipmentSetReassign({ |
| | | raesID: this.rentalApplySetIds[0] |
| | | }).then(result=>{ |
| | | if(result == '1'){ |
| | | this.IsDisplay = true; |
| | | if(result == '1'){ |
| | | this.msg = "已重新分配"; |
| | | this.closeAction(); |
| | | }else{ |
| | |
| | | return; |
| | | } |
| | | }) |
| | | }else{ |
| | | this.closeAction(); |
| | | return; |
| | | } |
| | | }) |
| | | }else{ |
| | |
| | | .Holder{ |
| | | .holder{ |
| | | position: relative; |
| | | display: inline-block; |
| | | width: 80px; |
| | |
| | | |
| | | .container .uiContainerManager{ |
| | | display : none !important; |
| | | } |
| | | .toast{ |
| | | border: 1px solid #c9c9c9; |
| | | border-radius: 10px; |
| | | width: 50%; |
| | | margin: 0 auto; |
| | | font-size: 18px; |
| | | font-weight: bold; |
| | | padding: 10px 20px; |
| | | background: #feb75d; |
| | | display: flex; |
| | | } |
| | |
| | | <template> |
| | | <div class="Holder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | <div class="holder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | <div if:false={IsLoading} class="toast"> |
| | | <span style="padding: 10px;">{msg}</span> |
| | | <button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" onclick={closeAction} title="Close" style="background-color: #e5e4e2;margin-top: 15px;"> |
| | | <lightning-icon class="greyIcon" icon-name="utility:close" alternative-text="Connected" variant="inverse" size="small" |
| | | title="Close" style="color: black;"></lightning-icon> |
| | | <span class="slds-assistive-text">Close</span> |
| | | </button> |
| | | </div> |
| | | </template> |
| | |
| | | |
| | | @api recordId; |
| | | id; |
| | | @api rentalApplyIds; |
| | | RentalApplyId; |
| | | Status; |
| | | //提示信息 |
| | | msg; |
| | | IsLoading=true; |
| | | |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference){ |
| | | alert("进入页面") |
| | | console.log("进入页面"); |
| | | console.log(currentPageReference); |
| | | if(currentPageReference){ |
| | |
| | | connectedCallback(){ |
| | | console.log(this.recordId); |
| | | init({recordId:this.recordId}).then(result=>{ |
| | | console.log(result); |
| | | if(result!=null){ |
| | | this.id=result.id; |
| | | this.RentalApplyId=result.RentalApplyId; |
| | | this.Status=result.Status; |
| | | this.cancelSubmit().then(res=>{ |
| | | this.IsLoading=false; |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | |
| | | |
| | | async cancelSubmit(){ |
| | | // 可分配代替品前提1 -- 备品借出申请的状态:“已批准”到“已出库指示” |
| | | var userIdArr = ['00510000001O6HoAAK','00510000001O6I2AAK','00510000000gW9pAAE','00510000000gW9BAAU','00510000008pVbWAAU','00510000001OOMjAAO','00510000005sEEMAA2','00510000004pNOtAAM','00510000005QJ2eAAG','00510000007iCmcAAE','00510000006kIg8AAE','00510000004rbkzAAA','00510000003LMHuAAO','00510000000gW92AAE']; |
| | | var userIdArr = ['00510000001O6HoAAK','00510000001O6I2AAK','00510000000gW9pAAE','00510000000gW9BAAU','00510000008pVbWAAU','00510000001OOMjAAO', |
| | | '00510000005sEEMAA2','00510000004pNOtAAM','00510000005QJ2eAAG','00510000007iCmcAAE','00510000006kIg8AAE','00510000004rbkzAAA','00510000003LMHuAAO', |
| | | '00510000000gW92AAE']; |
| | | //当前用户登录id |
| | | var userId; |
| | | await getUserId().then(res=>{ |
| | | userId=res; |
| | | }); |
| | | console.log(userId); |
| | | }) |
| | | .catch(err=>{ |
| | | console.log("getUserIderr==="+err); |
| | | }) |
| | | //TODO==== |
| | | userId = '00510000001O6HoAAK'; |
| | | console.log("userId==="+userId); |
| | | if(userIdArr.indexOf(userId)== -1){ |
| | | // alert('对不起你没有此操作的权限!'); |
| | | const event = new ShowToastEvent({ |
| | | title: '提示信息', |
| | | message:'对不起你没有此操作的权限!' |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.msg = '对不起你没有此操作的权限!'; |
| | | this.IsLoading = false; |
| | | return; |
| | | } else { |
| | | console.log(userId); |
| | | let raid = this.RentalApplyId; |
| | | console.log("hh1"); |
| | | await selectRentalApplyEquipmentSetByRACID({recordId:this.RentalApplyId}).then(res=>{ |
| | | console.log(res); |
| | | if (res==null||res.length==0) { |
| | | // alert("查询结果为空"); |
| | | const event = new ShowToastEvent({ |
| | | title: '提示信息', |
| | | message:"查询结果为空" |
| | | }); |
| | | this.dispatchEvent(event); |
| | | return; |
| | | } |
| | | var allRecords = res; |
| | | var validSize= allRecords.length; |
| | | var canJump = false; |
| | | for(i=0;i<validSize;i++){ |
| | | if(allRecords[i].Allow_Adjust_Queue_Flag__c == true){ |
| | | canJump = true; |
| | | break; |
| | | console.log('this.rentalApplyIds=='+this.rentalApplyIds); |
| | | if(this.rentalApplyIds == undefined || this.rentalApplyIds.length<1){ |
| | | this.msg = '请选择借出备品一览记录'; |
| | | this.IsLoading = false; |
| | | return; |
| | | }else{ |
| | | let raid = this.RentalApplyId; |
| | | await selectRentalApplyEquipmentSetByRACID({recordId:this.recordId}).then(res=>{ |
| | | console.log('selectRentalApplyEquipmentSetByRACID=='+JSON.stringify(res)); |
| | | |
| | | var allRecords = res; |
| | | var validSize= allRecords.length; |
| | | var canJump = false; |
| | | for(var i=0;i<validSize;i++){ |
| | | if(allRecords[i].Allow_Adjust_Queue_Flag__c == true){ |
| | | canJump = true; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | if(canJump == true){ |
| | | // alert("选择借出备品一览记录有已经允许插队的,请选择未允许的一览"); |
| | | const event = new ShowToastEvent({ |
| | | title: '提示信息', |
| | | message:"选择借出备品一览记录有已经允许插队的,请选择未允许的一览" |
| | | }); |
| | | this.dispatchEvent(event); |
| | | }else{ |
| | | let records=[this.recordId]; |
| | | window.open("/apex/RentalApplyJump?objId="+this.RentalApplyId+"&raesIds="+records, 'RentalApplyJump', 'width=700,height=300'); |
| | | } |
| | | }); |
| | | if(canJump == true){ |
| | | this.msg = '选择借出备品一览记录有已经允许插队的,请选择未允许的一览'; |
| | | this.IsLoading = false; |
| | | return; |
| | | }else{ |
| | | let records=[this.recordId]; |
| | | window.open("/apex/RentalApplyJump?objId="+this.recordId+"&raesIds="+ this.rentalApplyIds, 'RentalApplyJump', 'width=700,height=300'); |
| | | this.closeAction(); |
| | | } |
| | | }) |
| | | .catch(error=>{ |
| | | console.log('selectRentalApplyEquipmentSetByRACIDerr==='+error); |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | |
| | | closeAction() { |
| | | //返回当前的备品申请 |
| | | window.open("/"+this.recordId,'_self'); |
| | | } |
| | | } |
| | |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | <target>lightning__FlowScreen</target> |
| | | </targets> |
| | | <targetConfigs> |
| | | <targetConfig targets="lightning__FlowScreen"> |
| | | <property name="recordId" type="String" label="recordId"/> |
| | | <property name="rentalApplyIds" type="String[]" label="rentalApplyIds"/> |
| | | </targetConfig> |
| | | </targetConfigs> |
| | | </LightningComponentBundle> |
| | |
| | | <div class="holder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | <div if:false={IsLoading} class="toast"> |
| | | <div if:true={IsShow} class="toast"> |
| | | <span style="padding: 10px;">{msg}</span> |
| | | <button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" onclick={closeAction} title="Close" style="background-color: #e5e4e2;margin-top: 15px;"> |
| | | <lightning-icon class="greyIcon" icon-name="utility:close" alternative-text="Connected" variant="inverse" size="small" |
| | |
| | | export default class lexRentalFixtureSetAssign extends LightningElement { |
| | | @api recordId |
| | | msg; |
| | | IsLoading = true; |
| | | IsShow = false; |
| | | |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference){ |
| | | console.log("进入页面"); |
| | |
| | | init({ |
| | | recordId:this.recordId |
| | | }).then(result =>{ |
| | | console.log(this.recordId); |
| | | console.log(result); |
| | | this.IsLoading = false; |
| | | let res = result.ra; |
| | | console.log("res==="+JSON.stringify(res)); |
| | | if(res.Campaign__c != '' || res.Campaign__c != undefined){ |
| | | if(res.CampaignStatus == '取消'){ |
| | | this.IsShow = true; |
| | | this.msg = '学会取消,不可分配'; |
| | | return; |
| | | } |
| | | } |
| | | |
| | | if(res.Repair__c != '' || res.Repair__c != undefined){ |
| | | if(res.Repair_Final_Inspection_Date_F__c != null && res.Repair_Final_Inspection_Date_F__c !='' || (res.RC_return_to_office__c!=null && res.RC_return_to_office__c != '')){ |
| | | if(res.Repair_Final_Inspection_Date_F__c != null && res.Repair_Final_Inspection_Date_F__c !='' || |
| | | (res.RC_return_to_office__c!=null && res.RC_return_to_office__c != '')){ |
| | | this.IsShow = true; |
| | | this.msg = '修理有最终检测日或修理品返送日,不可分配'; |
| | | return; |
| | | } |
| | |
| | | if(res.Status__c == '取消' && res.Rental_Apply_Equipment_Set_Cnt__c != 0){ |
| | | window.open("/apex/RentalFixtureSetAssign?pt_recid=" + this.recordId); |
| | | this.closeAction(); |
| | | }else if((res.demo_purpose2__c == '学会展会' || res.demo_purpose2__c == '课题研究' || res.demo_purpose2__c == '培训中心')&& res.Status__c == '草案中'){ |
| | | }else if((res.demo_purpose2__c == '学会展会' || res.demo_purpose2__c == '课题研究' || res.demo_purpose2__c == '培训中心') |
| | | && res.Status__c == '草案中'){ |
| | | this.IsShow = true; |
| | | this.msg = "不能分配,请确认申请的状态"; |
| | | return |
| | | }else if((res.demo_purpose2__c =='试用(无询价)' || res.demo_purpose2__c == '试用(有询价)' || res.demo_purpose2__c =='动物实验' || res.demo_purpose2__c == '一般维修代用' || res.demo_purpose2__c== '保修合同用户维修代用' || res.demo_purpose2__c == '已购待货') && res.Status__c != '已批准' && res.Status__c != '已出库指示'){ |
| | | }else if((res.demo_purpose2__c =='试用(无询价)' || res.demo_purpose2__c == '试用(有询价)' || res.demo_purpose2__c =='动物实验' |
| | | || res.demo_purpose2__c == '一般维修代用' || res.demo_purpose2__c== '保修合同用户维修代用' || res.demo_purpose2__c == '已购待货') |
| | | && res.Status__c != '已批准' && res.Status__c != '已出库指示'){ |
| | | this.IsShow = true; |
| | | this.msg = "不能分配,请确认申请的状态"; |
| | | return; |
| | | }else if(resultMsg == 'Fin'){ |
| | | window.open("/apex/RentalFixtureSetAssign?pt_recid=" + this.recordId); |
| | | this.closeAction(); |
| | | }else{ |
| | | this.IsShow = true; |
| | | this.msg = resultMsg; |
| | | return; |
| | | } |
| | |
| | | <div class="holder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | <div if:false={IsLoading} class="toast"> |
| | | <div if:true={isShow} class="toast"> |
| | | <span style="padding: 10px;">{msg}</span> |
| | | <button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" onclick={closeAction} title="Close" style="background-color: #e5e4e2;margin-top: 15px;"> |
| | | <lightning-icon class="greyIcon" icon-name="utility:close" alternative-text="Connected" variant="inverse" size="small" |
| | |
| | | export default class lexRentalFixtureSetAssignAgency extends LightningElement { |
| | | @api recordId |
| | | msg; |
| | | IsLoading = true; |
| | | isShow = false; |
| | | |
| | | connectedCallback(){ |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result=>{ |
| | | this.IsLoading = false; |
| | | let res = result.ra; |
| | | console.log(res); |
| | | if(res.Campaign__c != '' || res.Campaign__c != undefined){ |
| | | if(res.CampaignStatus == '取消'){ |
| | | this.isShow = true; |
| | | this.msg = '学会取消,不可分配'; |
| | | return; |
| | | } |
| | | } |
| | | |
| | | if(res.Repair__c != ''){ |
| | | if(res.Repair_Final_Inspection_Date_F__c != null && res.Repair_Final_Inspection_Date_F__c !='' || (res.RC_return_to_office__c!=null && res.RC_return_to_office__c != '')){ |
| | | if(res.Repair__c != '' || res.Repair__c != undefined){ |
| | | if(res.Repair_Final_Inspection_Date_F__c != null && res.Repair_Final_Inspection_Date_F__c !='' |
| | | || (res.RC_return_to_office__c!=null && res.RC_return_to_office__c != '')){ |
| | | this.isShow = true; |
| | | this.msg = '修理有最终检测日或修理品返送日,不可分配'; |
| | | return; |
| | | } |
| | |
| | | window.open("/apex/RentalFixtureSetAssignAgency?pt_recid=" + this.recordId); |
| | | this.closeAction(); |
| | | }else if((res.demo_purpose2__c == '学会展会' || res.demo_purpose2__c == '课题研究' || res.demo_purpose2__c == '培训中心')&& res.Status__c == '草案中'){ |
| | | this.isShow = true; |
| | | this.msg = "不能分配,请确认申请的状态"; |
| | | return |
| | | }else if((res.demo_purpose2__c =='试用(无询价)' || res.demo_purpose2__c == '试用(有询价)' || res.demo_purpose2__c =='动物实验' || res.demo_purpose2__c == '一般维修代用' || res.demo_purpose2__c== '保修合同用户维修代用' || res.demo_purpose2__c == '已购待货') && res.Status__c != '已批准' && res.Status__c != '已出库指示'){ |
| | | }else if((res.demo_purpose2__c =='试用(无询价)' || res.demo_purpose2__c == '试用(有询价)' || res.demo_purpose2__c =='动物实验' || |
| | | res.demo_purpose2__c == '一般维修代用' || res.demo_purpose2__c== '保修合同用户维修代用' || res.demo_purpose2__c == '已购待货') |
| | | && res.Status__c != '已批准' && res.Status__c != '已出库指示'){ |
| | | this.isShow = true; |
| | | this.msg = "不能分配,请确认申请的状态"; |
| | | return; |
| | | }else if(resultMsg == 'Fin'){ |
| | |
| | | this.closeAction(); |
| | | return; |
| | | }else{ |
| | | this.isShow = true; |
| | | this.msg = resultMsg; |
| | | return; |
| | | } |
| | |
| | | <template> |
| | | <div class="sisToOPDHolder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | <template> |
| | | |
| | | </template> |
| New file |
| | |
| | | import { LightningElement, track, wire, api } from 'lwc'; |
| | | import { CurrentPageReference,NavigationMixin } from 'lightning/navigation'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import init from '@salesforce/apex/lexReturnDeliveryController.init'; |
| | | |
| | | export default class lexReturnDeliverySlipConsumApply extends LightningElement { |
| | | @api recordId; |
| | | |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference){ |
| | | if(currentPageReference) { |
| | | const urlValue = currentPageReference.state.recordId; |
| | | if(urlValue) { |
| | | let str = `${urlValue}`; |
| | | this.recordId = str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | connectedCallback(){ |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(res=>{ |
| | | if(!res.flag){ |
| | | this.showToast('未完成到货确认或备品中心未确认不能上传试用表','warning'); |
| | | return; |
| | | } |
| | | if(res.size > 0){ |
| | | window.open("/apex/consumTrialConfirm?id=" + this.recordId); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | if(type == 'success'){ |
| | | this.updateRecordView(this.recordId); |
| | | } |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | |
| | | updateRecordView(recordId) { |
| | | updateRecord({fields: { Id: recordId }}); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexReturnDeliverySlipConsumApply"> |
| | | <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> |
| | |
| | | <div class="holder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | <div if:false={IsLoading} class="toast"> |
| | | <div if:true={IsShow} class="toast"> |
| | | <span style="padding: 10px;">{msg}</span> |
| | | <button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" onclick={closeAction} title="Close" style="background-color: #e5e4e2;margin-top: 15px;"> |
| | | <lightning-icon class="greyIcon" icon-name="utility:close" alternative-text="Connected" variant="inverse" size="small" |
| | |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import init from '@salesforce/apex/SelectSubstituteControllerLWT.initFromSelectSubstituteButton'; |
| | | import selectRentalApplyEquipmentSetByID from '@salesforce/apex/SelectSubstituteControllerLWT.selectRentalApplyEquipmentSetByID'; |
| | | import selectRentalApplyCByName from '@salesforce/apex/SelectSubstituteControllerLWT.selectRentalApplyCByName'; |
| | | |
| | | export default class selectSubstituteLWC extends LightningElement { |
| | | |
| | | @api recordId; |
| | | id; |
| | | IsLoading=true; |
| | | IsShow=false; |
| | | @api rentalApplyEquipmentSetIds; |
| | | msg; |
| | | |
| | |
| | | init({ |
| | | recordId:this.recordId, |
| | | }).then(result=>{ |
| | | console.log('rentalApplyEquipmentSetIds'+this.rentalApplyEquipmentSetIds); |
| | | this.IsLoading = false; |
| | | if(this.rentalApplyEquipmentSetIds.length<1){ |
| | | if(this.rentalApplyEquipmentSetIds == undefined || this.rentalApplyEquipmentSetIds.length<1){ |
| | | this.IsShow = true; |
| | | this.msg = "请选择一条借出备品一览记录"; |
| | | return; |
| | | }else if(this.rentalApplyEquipmentSetIds.length>1){ |
| | | this.IsShow = true; |
| | | this.msg = "只能选择一条记录"; |
| | | return; |
| | | }else{ |
| | | selectRentalApplyEquipmentSetByID({ |
| | | recordId: this.rentalApplyEquipmentSetIds[0] |
| | | }).then(res=>{ |
| | | console.log(res); |
| | | if(res.RAES_Status__c !='已批准' && res.RAES_Status__c!= '已出库指示'){ |
| | | result.Status = '已批准'; |
| | | res.RAES_Status__c = '已批准'; |
| | | if(result.Status !='已批准' && result.Status!= '已出库指示'){ |
| | | this.IsShow = true; |
| | | this.msg = '申请书状态不符合分配代替品条件,请确认申请的状态'; |
| | | return; |
| | | }else{ |
| | | if(res.RAES_Status__c == '草案中' || res.RAES_Status__c == '申请中' || res.Shippment_loaner_time2__c != null){ |
| | | this.IsShow = true; |
| | | this.msg = "一览的状态不符合分配替代品条件"; |
| | | return; |
| | | }else if(res.Irreplaceable_flag__c == true){ |
| | | this.IsShow = true; |
| | | this.msg = "申请人勾选了代替品不可"; |
| | | return; |
| | | }else{ |
| | |
| | | this.closeAction(); |
| | | } |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | }).catch(err=>{ |
| | | console.log("error:"+err); |
| | |
| | | |
| | | closeAction() { |
| | | //返回当前的备品申请 |
| | | console.log(window.url); |
| | | window.open("/"+this.recordId,'_self'); |
| | | } |
| | | |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexRentalFixtureSetAssign"> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexSelectSubstitute"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| New file |
| | |
| | | .outerBorderCss{ |
| | | border: 1px solid #D4D4D4; |
| | | border-radius : 5px; |
| | | border-top : 3px solid #565959; |
| | | } |
| | | .borderCss{ |
| | | border: 1px solid #D4D4D4; |
| | | border-radius : 5px; |
| | | margin-bottom : 7px; |
| | | border-top : 3px solid #565959; |
| | | } |
| | | .headerDorderCss{ |
| | | border-top: 1px solid #565959; |
| | | border-bottom: 1px solid #D4D4D4; |
| | | padding:3px; |
| | | } |
| | | .centerCss{ |
| | | text-align: center; |
| | | } |
| | | .centerCss .left{ |
| | | margin-left: 100px; |
| | | }/* sample css file */ |
| New file |
| | |
| | | <template> |
| | | </template> |
| New file |
| | |
| | | import { LightningElement, track, wire, api } from 'lwc'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import { CurrentPageReference } from 'lightning/navigation'; |
| | | |
| | | import init from '@salesforce/apex/RentalApplyFaultController.init'; |
| | | import updateRentalApplyFaultStatus from '@salesforce/apex/RentalApplyFaultController.updateRentalApplyFaultStatus'; |
| | | export default class lexSendReport extends LightningElement { |
| | | |
| | | @api recordId; |
| | | IsLoading = true; |
| | | |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference){ |
| | | if(currentPageReference) { |
| | | const urlValue = currentPageReference.state.recordId; |
| | | if(urlValue) { |
| | | let str = `${urlValue}`; |
| | | this.recordId = str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | connectedCallback(){ |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(res=>{ |
| | | console.log('res==='+JSON.stringify(res)); |
| | | if(res.status__c!='草案中' && res.status__c!=''){ |
| | | this.showToast('只有草案中的检测分析报告才能发送报告','warning'); |
| | | return; |
| | | } |
| | | |
| | | updateRentalApplyFaultStatus({ |
| | | recordId: this.recordId, |
| | | updateStatus: '已发送' |
| | | }).then(result=>{ |
| | | console.log('result==='+result); |
| | | if(result=='SUCCESS'){ |
| | | this.showToast('报告已发送','success'); |
| | | }else{ |
| | | this.showToast(res.getMessage(),'error'); |
| | | } |
| | | }) |
| | | }).catch(err=>{ |
| | | console.log('init=='+err); |
| | | }) |
| | | } |
| | | |
| | | |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | if(type == 'success'){ |
| | | this.updateRecordView(); |
| | | } |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | |
| | | updateRecordView(recordId) { |
| | | updateRecord({fields: { Id: recordId }}); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexSendReport"> |
| | | <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> |
| | |
| | | <template> |
| | | <div class="EquipmentRentalPDF" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| | |
| | | <template> |
| | | <div class="sisToOPDHolder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| | |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import { updateRecord } from 'lightning/uiRecordApi'; |
| | | |
| | | import queueTop from '@salesforce/apex/ApplyJsCtl.queueTop'; |
| | | export default class lexTopInQueue extends LightningElement { |
| | |
| | | queueTop({ |
| | | applyId: this.recordId |
| | | }).then(res=>{ |
| | | this.IsLoading = false; |
| | | if(res == 'Success'){ |
| | | const evt = new ShowToastEvent({ |
| | | title : '置顶成功', |
| | | message: '', |
| | | variant: 'success' |
| | | }); |
| | | this.dispatchEvent(evt); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | this.showToast('置顶成功','success'); |
| | | return; |
| | | }else{ |
| | | const evterr = new ShowToastEvent({ |
| | | title : res, |
| | | message: '', |
| | | variant: 'error' |
| | | }); |
| | | this.dispatchEvent(evterr); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | this.showToast(res,'error'); |
| | | return; |
| | | } |
| | | }).catch(err=>{ |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }) |
| | | } |
| | | |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | if(type == 'success'){ |
| | | this.updateRecordView(this.recordId); |
| | | } |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | |
| | | updateRecordView(recordId) { |
| | | updateRecord({fields: { Id: recordId }}); |
| | | } |
| | | } |
| New file |
| | |
| | | <template> |
| | | <div class="holder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | <div if:false={IsLoading} class="toast"> |
| | | <span style="padding: 10px;">{msg}</span> |
| | | <button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" onclick={closeAction} title="Close" style="background-color: #e5e4e2;margin-top: 15px;"> |
| | | <lightning-icon class="greyIcon" icon-name="utility:close" alternative-text="Connected" variant="inverse" size="small" |
| | | title="Close" style="color: black;"></lightning-icon> |
| | | <span class="slds-assistive-text">Close</span> |
| | | </button> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | import { LightningElement, track, wire, api } from 'lwc'; |
| | | import transferApplySelectDetail from '@salesforce/apex/LexTransferApplyController.transferApplySelectDetail'; |
| | | |
| | | export default class lexTransferApplySelectDetail extends LightningElement { |
| | | @api recordId; |
| | | msg; |
| | | |
| | | connectedCallback(){ |
| | | transferApplySelectDetail({ |
| | | recordId: this.recordId |
| | | }).then(res=>{ |
| | | if(res.TA_Status__c == '删除' || res.TA_Status__c == '取消' || res.TA_Status__c == '完了'){ |
| | | this.msg = '调拨申请已经'+ res.TA_Status__c +',不能选择调拨明细' |
| | | }else{ |
| | | window.open("/apex/TransferApplySelectDetail?id="+this.recordId, "_top"); |
| | | } |
| | | }) |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexTransferApplySelectDetail"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | <target>lightning__FlowScreen</target> |
| | | </targets> |
| | | <targetConfigs> |
| | | <targetConfig targets="lightning__FlowScreen"> |
| | | <property name="recordId" type="String" label="recordId"/> |
| | | </targetConfig> |
| | | </targetConfigs> |
| | | </LightningComponentBundle> |