| | |
| | | import SelectDone from '@salesforce/apex/LexSISearchSetProductController.SelectDone'; |
| | | import getFileName from '@salesforce/apex/LexSISearchSetProductController.getFileName'; |
| | | import init from '@salesforce/apex/LexSISearchSetProductController.init'; |
| | | import LightningConfirm from 'lightning/confirm'; |
| | | import a from '@salesforce/resourceUrl/jquery183minjs'; |
| | | import b from '@salesforce/resourceUrl/PleaseWaitDialog'; |
| | | export default class lexSISearchSetProduct extends LightningElement { |
| | |
| | | top.window.close(); |
| | | } |
| | | |
| | | SetMuiltProduct(){ |
| | | async SetMuiltProduct(){ |
| | | console.log("int"); |
| | | var Str = this.data.setPFString; |
| | | var isPrepared = this.data.DataStatus; |
| | | console.log("int1"); |
| | | if(isPrepared!='Fin'){ |
| | | confirm(isPrepared) |
| | | console.log("int2"); |
| | | // confirm(isPrepared) |
| | | console.log("update"); |
| | | var result = await LightningConfirm.open({ |
| | | message: isPrepared, |
| | | variant: 'headerless', |
| | | label: '提示信息', |
| | | // setting theme would have no effect |
| | | }); |
| | | }else if(Str==''||Str==null){ |
| | | if(confirm("您尚未选取任何产品配套,确认完成么?")){ |
| | | console.log("int3"); |
| | | console.log("update"); |
| | | var result = await LightningConfirm.open({ |
| | | message: "您尚未选取任何产品配套,确认完成么?", |
| | | variant: 'headerless', |
| | | label: '提示信息', |
| | | // setting theme would have no effect |
| | | }); |
| | | if(result){ |
| | | top.window.close(); |
| | | }else{ |
| | | } |
| | | }else{ |
| | | console.log("int4"); |
| | | top.window.opener.setProductEntryGateway(Str); |
| | | console.log("int4.5"); |
| | | top.window.close(); |
| | | console.log("int5"); |
| | | } |
| | | } |
| | | async DataPrepare() { |
| | |
| | | console.log("添加:"); |
| | | this.data.DataStatus='数据尚未准备好,请稍等'; |
| | | console.log(this.data); |
| | | let activities=[]; |
| | | let isSelected=[]; |
| | | for (var i = this.data.activities.length - 1; i >= 0; i--) { |
| | | activities.push(this.data.activities[i].setProductidFull); |
| | | isSelected.push(this.data.activities[i].isSelected); |
| | | var activities=[]; |
| | | var isSelected=[]; |
| | | var selected = this.template.querySelector("lightning-datatable").getSelectedRows(); |
| | | for (var i = selected.length - 1; i >= 0; i--) { |
| | | // if(this.data.activities[i].isSelected) |
| | | activities.push(selected[i].setProductidFull); |
| | | } |
| | | console.log("ttt"); |
| | | |
| | | console.log(activities); |
| | | console.log(isSelected); |
| | | //j$(escapeVfId("Page:mainForm:DataStatus")).val('数据尚未准备好,请稍等'); |
| | | await SelectDone({activities:activities,isSelected:isSelected}).then(res=>{ |
| | | console.log("SelectDone:"); |
| | |
| | | this.data.DataStatus=res.DataStatus; |
| | | console.log(this.data); |
| | | } |
| | | this.SetMuiltProduct(); |
| | | }).catch(err=>{ |
| | | console.log("err:"); |
| | | console.log(err); |