From 4f200849487fc6f914e237d5af3ecefd6d802457 Mon Sep 17 00:00:00 2001 From: buli <137736985@qq.com> Date: 星期一, 10 七月 2023 09:52:59 +0800 Subject: [PATCH] backup1007 --- force-app/main/default/lwc/lexArriveGoodsMain/lexArriveGoodsMain.js | 518 ++++++++++++++++++++++----------------------------------- 1 files changed, 203 insertions(+), 315 deletions(-) diff --git a/force-app/main/default/lwc/lexArriveGoodsMain/lexArriveGoodsMain.js b/force-app/main/default/lwc/lexArriveGoodsMain/lexArriveGoodsMain.js index 47b005d..163a81f 100644 --- a/force-app/main/default/lwc/lexArriveGoodsMain/lexArriveGoodsMain.js +++ b/force-app/main/default/lwc/lexArriveGoodsMain/lexArriveGoodsMain.js @@ -1,4 +1,4 @@ -import { LightningElement, wire, api, track } from 'lwc'; +import { LightningElement,wire,api,track } from 'lwc'; import { CurrentPageReference } from 'lightning/navigation'; import { ShowToastEvent } from 'lightning/platformShowToastEvent'; import { NavigationMixin } from 'lightning/navigation'; @@ -13,13 +13,11 @@ import initNotArrDetAll from '@salesforce/apex/LexConsumableGoodsInfo.initNotArrDetAll'; import initMoreThan7 from '@salesforce/apex/LexConsumableGoodsInfo.initMoreThan7'; import initMoreThan7All from '@salesforce/apex/LexConsumableGoodsInfo.initMoreThan7All'; -//table css -import { loadStyle } from 'lightning/platformResourceLoader'; -import WrappedHeaderTable from '@salesforce/resourceUrl/lexdatatable'; +//table css +import { loadStyle } from "lightning/platformResourceLoader"; +import WrappedHeaderTable from "@salesforce/resourceUrl/lexdatatable"; -export default class LexArriveGoodsMain extends NavigationMixin( - LightningElement -) { +export default class LexArriveGoodsMain extends NavigationMixin(LightningElement) { //椤甸潰鍩虹鍙橀噺 @track agencyProType; @track category1; @@ -50,107 +48,62 @@ // {label:'寰呯郴缁熸搷浣滃叆搴撴暟閲�',fieldName:'Delivery_detail_count__c'}, // {label:'杩樻病鍙戣揣鏁伴噺',fieldName:'OrderNumber_notarrive__c'}, // {label:'鍙戣揣涓冨ぉ杩樻湭鍒拌揣鏁�',fieldName:'More_than_seven_days__c'}, - { - label: '娑堣�楀搧璁㈠崟鍚嶇О', - type: 'customOutputGood', + {label:'娑堣�楀搧璁㈠崟鍚嶇О', + type: "customOutputGood", typeAttributes: { - outputValue: { fieldName: 'Name' }, + outputValue: { fieldName: "Name" }, type: 'Title', - recordId: { fieldName: 'Id' } + recordId: { fieldName: "Id" } }, - hideDefaultActions: true, - initialWidth: 200, - wrapText: true - }, - { - label: 'SAP鍚堝悓鍙�', - fieldName: 'ContractNo__c', - hideDefaultActions: true, - wrapText: true, - initialWidth: 180 - }, - { - label: '璁㈠崟鎬绘暟', - type: 'customOutputGood', + hideDefaultActions: true,initialWidth:200,wrapText:true}, + {label:'SAP鍚堝悓鍙�',fieldName:'ContractNo__c',hideDefaultActions: true,wrapText:true,initialWidth:180}, + {label:'璁㈠崟鎬绘暟', + type: "customOutputGood", typeAttributes: { - outputValue: { fieldName: 'Total_num__c' }, + outputValue: { fieldName: "Total_num__c" }, type: 'TotalNum', - recordId: { fieldName: 'Id' } + recordId: { fieldName: "Id" } }, - hideDefaultActions: true, - initialWidth: 100, - cellAttributes: { alignment: 'right' } - }, - { - label: '宸插埌璐ф暟閲�', - type: 'customOutputGood', + hideDefaultActions: true, initialWidth: 100,cellAttributes: { alignment: "right" }}, + {label:'宸插埌璐ф暟閲�', + type: "customOutputGood", typeAttributes: { - outputValue: { fieldName: 'OrderNumber_arrived__c' }, + outputValue: { fieldName: "OrderNumber_arrived__c" }, type: 'ArrDet', - recordId: { fieldName: 'Id' } + recordId: { fieldName: "Id" } }, - hideDefaultActions: true, - initialWidth: 110, - cellAttributes: { alignment: 'right' } - }, - { - label: '寰呯郴缁熸搷浣滃叆搴撴暟閲�', - type: 'customOutputGood', + hideDefaultActions: true, initialWidth: 110,cellAttributes: { alignment: "right" }}, + {label:'寰呯郴缁熸搷浣滃叆搴撴暟閲�', + type: "customOutputGood", typeAttributes: { - outputValue: { fieldName: 'Delivery_detail_count__c' }, + outputValue: { fieldName: "Delivery_detail_count__c" }, type: 'DeliveryDet', - recordId: { fieldName: 'Id' } + recordId: { fieldName: "Id" } }, - hideDefaultActions: true, - initialWidth: 180, - cellAttributes: { alignment: 'right' } - }, - { - label: '杩樻病鍙戣揣鏁伴噺', - type: 'customOutputGood', + hideDefaultActions: true, initialWidth: 180,cellAttributes: { alignment: "right" }}, + {label:'杩樻病鍙戣揣鏁伴噺', + type: "customOutputGood", typeAttributes: { - outputValue: { fieldName: 'OrderNumber_notarrive__c' }, + outputValue: { fieldName: "OrderNumber_notarrive__c" }, type: 'NotArrDet', - recordId: { fieldName: 'Id' } + recordId: { fieldName: "Id" } }, - hideDefaultActions: true, - initialWidth: 120, - cellAttributes: { alignment: 'right' } - }, - { - label: '鍙戣揣涓冨ぉ杩樻湭鍒拌揣鏁�', - type: 'customOutputGood', + hideDefaultActions: true, initialWidth: 120,cellAttributes: { alignment: "right" }}, + {label:'鍙戣揣涓冨ぉ杩樻湭鍒拌揣鏁�', + type: "customOutputGood", typeAttributes: { - outputValue: { fieldName: 'More_than_seven_days__c' }, + outputValue: { fieldName: "More_than_seven_days__c" }, type: 'MoreThan7', - recordId: { fieldName: 'Id' } + recordId: { fieldName: "Id" } }, - hideDefaultActions: true, - initialWidth: 180, - cellAttributes: { alignment: 'right' } - }, - { - label: '鏈�鏂板彂璐ф棩鏈�', - fieldName: 'Shipment_date__c', - hideDefaultActions: true, - initialWidth: 140 - }, - { - label: '棣栨鍙戣揣鏃ユ湡', - fieldName: 'First_Delivery__c', - hideDefaultActions: true, - initialWidth: 140 - } + hideDefaultActions: true, initialWidth: 180,cellAttributes: { alignment: "right" }}, + {label:'鏈�鏂板彂璐ф棩鏈�',fieldName:'Shipment_date__c',hideDefaultActions: true, initialWidth: 140}, + {label:'棣栨鍙戣揣鏃ユ湡',fieldName:'First_Delivery__c',hideDefaultActions: true, initialWidth: 140} ]; @track colms2 = [ - { label: '浜у搧鍨嬪彿', fieldName: 'prodModel', hideDefaultActions: true }, - { - label: '鏁伴噺', - fieldName: 'recordCount', - hideDefaultActions: true, - initialWidth: 100 - } + {label:'浜у搧鍨嬪彿',fieldName:'prodModel',hideDefaultActions: true}, + {label:'鏁伴噺',fieldName:'recordCount',hideDefaultActions: true,initialWidth: 100} ]; //鑾峰彇鍙傛暟 @@ -162,329 +115,270 @@ // } // } - renderedCallback() { + renderedCallback(){ if (!this.stylesLoaded) { Promise.all([loadStyle(this, WrappedHeaderTable)]) .then(() => { - console.log('Custom styles loaded'); + console.log("Custom styles loaded"); this.stylesLoaded = true; }) .catch((error) => { - console.error('Error loading custom styles'); + console.error("Error loading custom styles"); }); } } - + //鍒濆鍖� - connectedCallback() { - init().then((result) => { - this.isNoteStay = result.isNoteStay; - if (result.result == 'Success') { - this.agencyProType = result.agencyProType; - this.accountId = result.accountId; - this.title = result.title; - 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.raesList = result.raesList; - this.raesList.push({ - Id: '1', - Name: '璁㈠崟鏄庣粏姹囨��', - Total_num__c: this.totalNum, - OrderNumber_arrived__c: this.orderNumberArrived, - Delivery_detail_count__c: this.deliveryDetailCount, - OrderNumber_notarrive__c: this.orderNumberNotarrive, - More_than_seven_days__c: this.moreThanSevenDays - }); - this.showSpinner = false; - this.showPage = true; - } else { - this.showSpinner = false; - console.log('Error:' + result.errorMsg); - this.showMyToast('鍒濆鍖栭〉闈㈠け璐�', result.errorMsg, 'error'); - } - }); + connectedCallback(){ + init() + .then(result=>{ + this.isNoteStay = result.isNoteStay; + if(result.result == 'Success'){ + this.agencyProType = result.agencyProType; + this.accountId = result.accountId; + this.title = result.title; + 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.raesList = result.raesList; + this.raesList.push({Id:'1',Name:'璁㈠崟鏄庣粏姹囨��',Total_num__c:this.totalNum,OrderNumber_arrived__c:this.orderNumberArrived,Delivery_detail_count__c:this.deliveryDetailCount,OrderNumber_notarrive__c:this.orderNumberNotarrive,More_than_seven_days__c:this.moreThanSevenDays}); + this.showSpinner = false; + this.showPage = true; + }else{ + this.showSpinner = false; + console.log("Error:"+result.errorMsg); + this.showMyToast('鍒濆鍖栭〉闈㈠け璐�',result.errorMsg,'error'); + } + }) } //鐐瑰嚮閾炬帴 - clickLick(event) { + clickLick(event){ var outputValue = event.detail.data.value; var outputType = event.detail.data.type; var recordId = event.detail.data.recordId; - console.log( - 'click:' + outputValue + '---' + outputType + '---' + recordId - ); - if (outputType == 'Title') { + console.log("click:"+outputValue+"---"+outputType+"---"+recordId); + if(outputType == 'Title'){ const config = { type: 'standard__webPage', attributes: { - url: '/lexarrivegoods?ESetId=' + recordId + url: '/lexarrivegoods?ESetId='+recordId } }; this[NavigationMixin.Navigate](config); - } else if (outputType == 'TotalNum') { + }else if(outputType == 'TotalNum'){ this.popTitle = '鎵�鏈変骇鍝佷竴瑙�'; - initTotalNum({ ordId: recordId, type: 'all' }).then((result) => { - if (result.result == 'Success') { + initTotalNum({ordId:recordId, type:'all'}) + .then(result=>{ + if(result.result == 'Success'){ // this.recordList = result.recordList; var dataStr = JSON.stringify(result.recordList); this.recordList = JSON.parse(dataStr); - console.log('data:' + JSON.stringify(this.recordList)); + console.log('data:'+JSON.stringify(this.recordList)); this.showPop = true; - } else { - this.showMyToast( - '鍔犺浇鎵�鏈変骇鍝佷竴瑙堥〉闈㈠け璐�', - result.errorMsg, - 'error' - ); + }else{ + this.showMyToast('鍔犺浇鎵�鏈変骇鍝佷竴瑙堥〉闈㈠け璐�',result.errorMsg,'error'); } - }); - } else if (outputType == 'ArrDet') { - if (recordId == '1') { + }) + }else if(outputType == 'ArrDet'){ + if(recordId == '1'){ this.popTitle = '鎵�鏈夊凡鍒拌揣浜у搧涓�瑙�'; - initArrDetAll({ type: 'all' }).then((result) => { - if (result.result == 'Success') { + initArrDetAll({type:'all'}) + .then(result=>{ + if(result.result == 'Success'){ // this.recordList = result.recordList; var dataStr = JSON.stringify(result.recordList); this.recordList = JSON.parse(dataStr); - console.log('data:' + JSON.stringify(this.recordList)); + console.log('data:'+JSON.stringify(this.recordList)); this.showPop = true; - } else { - this.showMyToast( - '鍔犺浇鎵�鏈夊凡鍒拌揣浜у搧涓�瑙堥〉闈㈠け璐�', - result.errorMsg, - 'error' - ); + }else{ + this.showMyToast('鍔犺浇鎵�鏈夊凡鍒拌揣浜у搧涓�瑙堥〉闈㈠け璐�',result.errorMsg,'error'); } - }); - } else { + }) + }else{ this.popTitle = '宸插埌璐т骇鍝佷竴瑙�'; - initArrDet({ orderId: recordId }).then((result) => { - if (result.result == 'Success') { + initArrDet({orderId:recordId}) + .then(result=>{ + if(result.result == 'Success'){ this.recordList = result.recordList; - console.log('data:' + JSON.stringify(this.recordList)); + console.log('data:'+JSON.stringify(this.recordList)); this.showPop = true; - } else { - this.showMyToast( - '鍔犺浇宸插埌璐т骇鍝佷竴瑙堥〉闈㈠け璐�', - result.errorMsg, - 'error' - ); + }else{ + this.showMyToast('鍔犺浇宸插埌璐т骇鍝佷竴瑙堥〉闈㈠け璐�',result.errorMsg,'error'); } - }); + }) } - } else if (outputType == 'DeliveryDet') { - if (recordId == '1') { + }else if(outputType == 'DeliveryDet'){ + if(recordId == '1'){ this.popTitle = '鎵�鏈夊凡鍙戣揣杩樻病鍒拌揣浜у搧涓�瑙�'; - initDeliveryDetAll({ type: 'all' }).then((result) => { - if (result.result == 'Success') { + initDeliveryDetAll({type:'all'}) + .then(result=>{ + if(result.result == 'Success'){ this.recordList = result.recordList; - console.log('data:' + JSON.stringify(this.recordList)); + console.log('data:'+JSON.stringify(this.recordList)); this.showPop = true; - } else { - this.showMyToast( - '鍔犺浇鎵�鏈夊凡鍙戣揣杩樻病鍒拌揣浜у搧涓�瑙堥〉闈㈠け璐�', - result.errorMsg, - 'error' - ); + }else{ + this.showMyToast('鍔犺浇鎵�鏈夊凡鍙戣揣杩樻病鍒拌揣浜у搧涓�瑙堥〉闈㈠け璐�',result.errorMsg,'error'); } - }); - } else { + }) + }else{ this.popTitle = '鏈埌璐т骇鍝佷竴瑙�'; - initDeliveryDet({ orderId: recordId }).then((result) => { - if (result.result == 'Success') { + initDeliveryDet({orderId:recordId}) + .then(result=>{ + if(result.result == 'Success'){ this.recordList = result.recordList; - console.log('data:' + JSON.stringify(this.recordList)); + console.log('data:'+JSON.stringify(this.recordList)); this.showPop = true; - } else { - this.showMyToast( - '鍔犺浇鏈埌璐т骇鍝佷竴瑙堥〉闈㈠け璐�', - result.errorMsg, - 'error' - ); + }else{ + this.showMyToast('鍔犺浇鏈埌璐т骇鍝佷竴瑙堥〉闈㈠け璐�',result.errorMsg,'error'); } - }); + }) } - } else if (outputType == 'NotArrDet') { - if (recordId == '1') { + }else if(outputType == 'NotArrDet'){ + if(recordId == '1'){ this.popTitle = '鎵�鏈夎繕娌″彂璐т骇鍝佷竴瑙�'; - initNotArrDetAll({ type: 'all' }).then((result) => { - if (result.result == 'Success') { + initNotArrDetAll({type:'all'}) + .then(result=>{ + if(result.result == 'Success'){ this.recordList = result.recordList; - console.log('data:' + JSON.stringify(this.recordList)); + console.log('data:'+JSON.stringify(this.recordList)); this.showPop = true; - } else { - this.showMyToast( - '鍔犺浇鎵�鏈夎繕娌″彂璐т骇鍝佷竴瑙堥〉闈㈠け璐�', - result.errorMsg, - 'error' - ); + }else{ + this.showMyToast('鍔犺浇鎵�鏈夎繕娌″彂璐т骇鍝佷竴瑙堥〉闈㈠け璐�',result.errorMsg,'error'); } - }); - } else { + }) + }else{ this.popTitle = '杩樻病鍙戣揣鏁伴噺'; - initNotArrDet({ orderId: recordId }).then((result) => { - if (result.result == 'Success') { + initNotArrDet({orderId:recordId}) + .then(result=>{ + if(result.result == 'Success'){ this.recordList = result.recordList; - console.log('data:' + JSON.stringify(this.recordList)); + console.log('data:'+JSON.stringify(this.recordList)); this.showPop = true; - } else { - this.showMyToast( - '鍔犺浇杩樻病鍙戣揣鏁伴噺椤甸潰澶辫触', - result.errorMsg, - 'error' - ); + }else{ + this.showMyToast('鍔犺浇杩樻病鍙戣揣鏁伴噺椤甸潰澶辫触',result.errorMsg,'error'); } - }); + }) } - } else if (outputType == 'MoreThan7') { - if (recordId == '1') { + + }else if(outputType == 'MoreThan7'){ + if(recordId == '1'){ this.popTitle = '鎵�鏈夊彂璐т竷澶╄繕鏈埌璐ф暟'; - initMoreThan7All({ type: 'all' }).then((result) => { - if (result.result == 'Success') { + initMoreThan7All({type:'all'}) + .then(result=>{ + if(result.result == 'Success'){ this.recordList = result.recordList; - console.log('data:' + JSON.stringify(this.recordList)); + console.log('data:'+JSON.stringify(this.recordList)); this.showPop = true; - } else { - this.showMyToast( - '鍔犺浇鎵�鏈夊彂璐т竷澶╄繕鏈埌璐ф暟椤甸潰澶辫触', - result.errorMsg, - 'error' - ); + }else{ + this.showMyToast('鍔犺浇鎵�鏈夊彂璐т竷澶╄繕鏈埌璐ф暟椤甸潰澶辫触',result.errorMsg,'error'); } - }); - } else { + }) + }else{ this.popTitle = '鍙戣揣涓冨ぉ杩樻湭鍒拌揣鏁�'; - initMoreThan7({ orderId: recordId }).then((result) => { - if (result.result == 'Success') { + initMoreThan7({orderId:recordId}) + .then(result=>{ + if(result.result == 'Success'){ this.recordList = result.recordList; - console.log('data:' + JSON.stringify(this.recordList)); + console.log('data:'+JSON.stringify(this.recordList)); this.showPop = true; - } else { - this.showMyToast( - '鍔犺浇鍙戣揣涓冨ぉ杩樻湭鍒拌揣鏁伴〉闈㈠け璐�', - result.errorMsg, - 'error' - ); + }else{ + this.showMyToast('鍔犺浇鍙戣揣涓冨ぉ杩樻湭鍒拌揣鏁伴〉闈㈠け璐�',result.errorMsg,'error'); } - }); + }) } } } //鍏抽棴寮圭獥 - closePop() { + closePop(){ this.showPop = false; } //娑堣�楀搧璁㈠崟鍚嶇О鍙樻洿 - category1Change(event) { + category1Change(event){ this.category1 = event.detail.value; } - + //鏈�鏂板彂璐ф棩鏈熷彉鏇� - cate2Change(event) { + cate2Change(event){ this.cate2 = event.detail.value; } - + //妫�绱� - search() { + search(){ this.showSpinner = true; searchConsumableorderdetails({ - category1Str: this.category1, - cate2Str: this.cate2, - accountidStr: this.accountId, - userWorkLocationStr: this.userWorkLocation, - agencyProTypeStr: this.agencyProType - }).then((result) => { + category1Str:this.category1, + cate2Str:this.cate2, + accountidStr:this.accountId, + userWorkLocationStr:this.userWorkLocation, + agencyProTypeStr:this.agencyProType}) + .then(result=>{ this.showSpinner = false; - if (result.result == 'Success') { + if(result.result == 'Success'){ this.raesList = result.raesList; - this.raesList.push({ - Id: '1', - Name: '璁㈠崟鏄庣粏姹囨��', - Total_num__c: this.totalNum, - OrderNumber_arrived__c: this.orderNumberArrived, - Delivery_detail_count__c: this.deliveryDetailCount, - OrderNumber_notarrive__c: this.orderNumberNotarrive, - More_than_seven_days__c: this.moreThanSevenDays - }); - if (this.raesList.length > 1) { + this.raesList.push({Id:'1',Name:'璁㈠崟鏄庣粏姹囨��',Total_num__c:this.totalNum,OrderNumber_arrived__c:this.orderNumberArrived,Delivery_detail_count__c:this.deliveryDetailCount,OrderNumber_notarrive__c:this.orderNumberNotarrive,More_than_seven_days__c:this.moreThanSevenDays}); + if(this.raesList.length > 1){ var count = this.raesList.length - 1; - this.showMyToast( - '鎼滅储鎴愬姛', - '鍏辨悳绱㈠埌' + count + '鏉℃暟鎹�', - 'success' - ); - } else { - this.showMyToast('鏈悳绱㈠埌鏁版嵁', '', 'error'); + this.showMyToast('鎼滅储鎴愬姛','鍏辨悳绱㈠埌'+count+'鏉℃暟鎹�','success'); + }else{ + this.showMyToast('鏈悳绱㈠埌鏁版嵁','','error'); } - } else { - this.showMyToast('鎼滅储澶辫触', result.errorMsg, 'error'); + }else{ + this.showMyToast('鎼滅储澶辫触',result.errorMsg,'error'); } - }); + }) } - + //娓呯┖鎼滅储妗� - clear() { + clear(){ this.showSpinner = true; this.category1 = ''; this.cate2 = null; searchConsumableorderdetails({ - category1Str: this.category1, - cate2Str: this.cate2, - accountidStr: this.accountId, - userWorkLocationStr: this.userWorkLocation, - agencyProTypeStr: this.agencyProType - }).then((result) => { + category1Str:this.category1, + cate2Str:this.cate2, + accountidStr:this.accountId, + userWorkLocationStr:this.userWorkLocation, + agencyProTypeStr:this.agencyProType}) + .then(result=>{ this.showSpinner = false; - if (result.result == 'Success') { + if(result.result == 'Success'){ this.raesList = result.raesList; - this.raesList.push({ - Id: '1', - Name: '璁㈠崟鏄庣粏姹囨��', - Total_num__c: this.totalNum, - OrderNumber_arrived__c: this.orderNumberArrived, - Delivery_detail_count__c: this.deliveryDetailCount, - OrderNumber_notarrive__c: this.orderNumberNotarrive, - More_than_seven_days__c: this.moreThanSevenDays - }); - if (this.raesList.length > 1) { + this.raesList.push({Id:'1',Name:'璁㈠崟鏄庣粏姹囨��',Total_num__c:this.totalNum,OrderNumber_arrived__c:this.orderNumberArrived,Delivery_detail_count__c:this.deliveryDetailCount,OrderNumber_notarrive__c:this.orderNumberNotarrive,More_than_seven_days__c:this.moreThanSevenDays}); + if(this.raesList.length > 1){ var count = this.raesList.length - 1; - this.showMyToast( - '鎼滅储鎴愬姛', - '鍏辨悳绱㈠埌' + count + '鏉℃暟鎹�', - 'success' - ); - } else { - this.showMyToast('鏈悳绱㈠埌鏁版嵁', '', 'error'); + this.showMyToast('鎼滅储鎴愬姛','鍏辨悳绱㈠埌'+count+'鏉℃暟鎹�','success'); + }else{ + this.showMyToast('鏈悳绱㈠埌鏁版嵁','','error'); } - } else { - this.showMyToast('鎼滅储澶辫触', result.errorMsg, 'error'); + }else{ + this.showMyToast('鎼滅储澶辫触',result.errorMsg,'error'); } - }); + }) } //鍏ュ簱 - orderArrive() { + orderArrive(){ const config = { type: 'standard__webPage', attributes: { - url: '/lexarrivegoods?ArrType=Arr' + url: '/lexarrivegoods?ArrType=Arr' } }; this[NavigationMixin.Navigate](config); } - + //杩斿搧 - orderReturn() { + orderReturn(){ const config = { type: 'standard__webPage', attributes: { - url: '/lexarrivegoods?ArrType=ReG' + url: '/lexarrivegoods?ArrType=ReG' } }; this[NavigationMixin.Navigate](config); @@ -494,24 +388,18 @@ console.log('show custom message'); var iconName = ''; var content = ''; - if (variant == 'success') { - iconName = 'utility:check'; - } else { - iconName = 'utility:error'; + if(variant == 'success'){ + iconName = 'utility:check'; + }else{ + iconName = 'utility:error'; } - if (message != '') { - content = - '<h2><strong>' + - title + - '<strong/></h2><h5>' + - message + - '</h5>'; - } else { - content = '<h2><strong>' + title + '<strong/></h2>'; + if(message != ''){ + content = '<h2><strong>'+title+'<strong/></h2><h5>'+message+'</h5>'; + }else{ + content = '<h2><strong>'+title+'<strong/></h2>'; } - this.template - .querySelector('c-common-toast') - .showToast(variant, content, iconName, 10000); + this.template.querySelector('c-common-toast'). + showToast(variant,content,iconName,10000); // var mode; // if(this.isNoteStay){ // mode ='sticky'; @@ -525,5 +413,5 @@ // mode: mode // }); // this.dispatchEvent(evt); - } + } } \ No newline at end of file -- Gitblit v1.9.1