| | |
| | | this.RepairC = result.RepairC; |
| | | |
| | | this.DiscountRequest(); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | |
| | | console.log(rp); |
| | | if (rp.Return_Without_Repair_IF__c == true) { |
| | | this.ShowToastEvent("未修理归还的修理不允许减价申请", "error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } else { |
| | | if (rp.Return_Without_Repair__c == true) { |
| | | this.ShowToastEvent("已经申请未修理返回,如果需要继续修理请取消\"未修理归还申请\"的勾选后再进行减价申请操作", "error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | } |
| | |
| | | console.log(result); |
| | | if (result.length > 0) { |
| | | var split = result.split(", "); |
| | | alert(split[1]); |
| | | this.ShowToastEvent(split[1], "error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | }else{ |
| | | this.ShowToastEvent("更新成功!", "success"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }) |
| | | updateRepairQuotation04({ |
| | | recordId: this.Id |
| | |
| | | console.log(result); |
| | | if (result.length > 0) { |
| | | var split = result.split(", "); |
| | | alert(split[1]); |
| | | this.ShowToastEvent(split[1], "error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | }else{ |
| | | this.ShowToastEvent("更新成功!", "success"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }) |
| | | }) |
| | | } |
| 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 */ |
| | |
| | | <template> |
| | | <div class="sisToOPDHolder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button> |
| | | </div> |
| | | </template> |
| | |
| | | this.isCNBuyC = result.isCNBuyC; |
| | | |
| | | this.OCSMNogoods(); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | |
| | | OCSMNogoods() { |
| | | if (this.QISStatusC != 'RC检测申请') { |
| | | this.ShowToastEvent("OCM服务本部已经收到实物", "error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } else { |
| | | if ((this.isAEProfileC == undefined || this.isPAEProfileC == undefined) && this.isCNBuyC != 'true') { |
| | | this.ShowToastEvent("安全信息未判定,请联系质量法规部", "error"); |
| | | var btns = document.getElementsByName('rc_recieved'); |
| | | for (var i = 0; i < btns.length; i++) { |
| | | btns[i].disabled = true; |
| | | btns[i].className = 'btnDisabled'; |
| | | } |
| | | this.ShowToastEvent("安全信息未判定,请联系质量法规部", "error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } else { |
| | | updateQisForRCRecieved({ |
| | | QId: this.Id, |
| | |
| | | }).then(result => { |
| | | console.log(result); |
| | | if (result.length > 0) { |
| | | alert(result); |
| | | this.ShowToastEvent(result, "error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | }else{ |
| | | this.ShowToastEvent('更新成功', "success"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | |
| | | }) |
| | | } |
| | | } |
| | |
| | | this.email = result.email; |
| | | |
| | | this.OSHNogoods(); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | |
| | | OSHNogoods() { |
| | | if (this.QISStatusC != 'OSH检测申请' && this.QISStatusC != '完毕') { |
| | | this.ShowToastEvent("OSH已经收到实物", "error") |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } else { |
| | | updateOSHNogoods({ |
| | | Id: this.Id, |
| | |
| | | console.log(result); |
| | | if (result.length > 0) { |
| | | var split = result.split(", "); |
| | | alert(split[1]); |
| | | this.ShowToastEvent(split[1], "error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | this.ShowToastEvent('更新成功', "success"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }) |
| | | } |
| | |
| | | this.RentalApplyDiscountApproval(); |
| | | } |
| | | }) |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | |
| | | |
| | | if (power != '2B2_备品中心检测&仓库管理') { |
| | | this.ShowToastEvent("对不起,您没有权限提交此申请!", "error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | |
| | | var status = this.RentalApplyDiscountStatusC; |
| | | if (status == '审批中') { |
| | | this.ShowToastEvent("审批提交成功,当前正在审批请勿再提交!", "error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | if (status == '批准') { |
| | | this.ShowToastEvent("审批已批准,请勿再提交!", "error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | if (status == '草案中' || status == undefined || status == '驳回') { |
| | |
| | | console.log(result); |
| | | if (result.length > 0) { |
| | | var split = result.split(", "); |
| | | alert("提交失败 " + split[1]); |
| | | this.ShowToastEvent("提交失败 " + split[1], "error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | }else{ |
| | | this.ShowToastEvent("提交成功!", "success"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }) |
| | | } else { |
| | | this.ShowToastEvent("提交失败", "error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | } |
| | |
| | | <div class="exampleHolder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button> |
| | | <lightning-button onclick={handleConfirmClick} label="Open Confirm Modal"></lightning-button> |
| | | </div> |
| | | </template> |
| | |
| | | import { |
| | | ShowToastEvent |
| | | } from 'lightning/platformShowToastEvent'; |
| | | import LightningConfirm from 'lightning/confirm'; |
| | | |
| | | export default class LexSCSubmit extends LightningElement { |
| | | @api recordId; |
| | |
| | | }).then(result => { |
| | | console.log(result); |
| | | if (result != null) { |
| | | this.IsLoading = false; |
| | | this.Id = result.Id; |
| | | this.StatusC = result.StatusC; |
| | | |
| | | this.SCSubmit(); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | |
| | | // 提交待审批 |
| | | SCSubmit() { |
| | | if (this.StatusC != '草案中') { |
| | | this.ShowToastEvent("已经提交审批", "error") |
| | | this.ShowToastEvent("已经提交审批", "error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | |
| | | if (!confirm("一旦OCM提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?")) { |
| | | return; |
| | | } |
| | | |
| | | updateQISSCReport({ |
| | | QId: this.Id |
| | | }).then(result => { |
| | | console.log(result); |
| | | if (result.length > 0) { |
| | | var split = result.split(", "); |
| | | alert(split[1]); |
| | | } else { |
| | | this.ShowToastEvent("已提交", "success") |
| | | window.location.reload(); |
| | | } |
| | | }) |
| | | this.handleConfirmClick("一旦OCM提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?"); |
| | | } |
| | | |
| | | ShowToastEvent(msg, type) { |
| | |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | | |
| | | async handleConfirmClick(msg) { |
| | | const result = await LightningConfirm.open({ |
| | | message: msg, |
| | | variant: 'headerless', |
| | | label: 'this is the aria-label value' |
| | | }); |
| | | |
| | | if(result){ |
| | | updateQISSCReport({ |
| | | QId: this.Id |
| | | }).then(result => { |
| | | console.log(result); |
| | | if (result.length > 0) { |
| | | var split = result.split(", "); |
| | | this.ShowToastEvent(split[1], "error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | // alert(split[1]); |
| | | } else { |
| | | this.ShowToastEvent("已提交", "success"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | window.location.reload(); |
| | | } |
| | | }) |
| | | }else{ |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | } |
| | |
| | | this.ServiceCutPriceApply(); |
| | | } |
| | | }) |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | |
| | | |
| | | if (power != '2F2A_RC' && power != '2F4_技术推进部' && power != '2F4_技术推进部_非SSO') { |
| | | this.ShowToastEvent("对不起,您没有权限提交此申请!", "error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | var status = this.CutPriceStatusServiceC; |
| | | if (status == '审批中') { |
| | | this.ShowToastEvent("审批提交成功,当前正在审批请勿再提交!", "error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | if (status == '批准') { |
| | | this.ShowToastEvent("审批已批准,请勿再提交!", "error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | if (status == '草案中' || status == undefined || status == '驳回') { |
| | |
| | | console.log(result); |
| | | if (result.length > 0) { |
| | | var split = result.split(", "); |
| | | alert(split[1]); |
| | | this.ShowToastEvent(split[1], "error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | }else{ |
| | | this.ShowToastEvent("更新成功!", "success"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }) |
| | | updateRepairQuotation02({ |
| | |
| | | console.log(result); |
| | | if (result.length > 0) { |
| | | var split = result.split(", "); |
| | | alert("提交失败 " + split[1]); |
| | | this.ShowToastEvent("提交失败 " + split[1], "error"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } else { |
| | | this.ShowToastEvent("审批提交成功!", "success"); |
| | | location.reload(); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }) |
| | | } |