import { LightningElement,wire,api,track } from 'lwc'; import { CurrentPageReference } from 'lightning/navigation'; import { ShowToastEvent } from 'lightning/platformShowToastEvent'; import { NavigationMixin } from 'lightning/navigation'; import init from '@salesforce/apex/LexArriveGoodsMainController.init'; import searchConsumableorderdetails from '@salesforce/apex/LexArriveGoodsMainController.searchConsumableorderdetails'; export default class LexArriveGoodsMain extends NavigationMixin(LightningElement) { //页面基础变量 @track agencyProType; @track category1; @track cate2; // @track eSetId; @track accountId; @track title = []; @track raesList = []; @track userWorkLocation; @track totalNum; @track orderNumberArrived; @track deliveryDetailCount; @track orderNumberNotarrive; @track moreThanSevenDays; @track showSpinner = true; @track showPage = true; //获取参数 // @wire(CurrentPageReference) // getStateParameters(currentPageReference) { // console.log('CurrentPageReference'); // if (currentPageReference) { // this.eSetId = currentPageReference.state?.ESetid; // } // } //初始化 connectedCallback(){ init() .then(result=>{ if(result.result == 'Success'){ this.agencyProType = result.agencyProType; this.accountId = result.accountId; this.title = result.title; this.raesList = result.raesList; this.userWorkLocation = result.userWorkLocation; this.totalNum = result.totalNum; this.orderNumberArrived = result.orderNumberArrived; this.deliveryDetailCount = result.deliveryDetailCount; this.orderNumberNotarrive = result.orderNumberNotarrive; this.moreThanSevenDays = result.moreThanSevenDays; this.showSpinner = false; this.showPage = true; }else{ this.showSpinner = false; console.log("Error:"+result.errorMsg); this.showMyToast('初始化页面失败',result.errorMsg,'error'); } }) } //消耗品订单名称变更 category1Change(event){ this.category1 = event.detail.value; } //最新发货日期变更 cate2Change(event){ this.cate2 = event.detail.value; } //检索 search(){ } //清空搜索框 clear(){ } //入库 orderArrive(){ } //返品 orderReturn(){ } showMyToast(title,message,variant){ const evt = new ShowToastEvent({ title : title, message: message, variant: variant }); this.dispatchEvent(evt); } }