| | |
| | | @track showTable = false; |
| | | @track hidecheckboxcolumn = true; |
| | | @track check = false; |
| | | @track productkucun; |
| | | //加载 |
| | | @track showSpinner = false; |
| | | @track showSpinners = false; |
| | |
| | | type: "Name", |
| | | sortable: true, |
| | | hideDefaultActions: true, |
| | | initialWidth: 300, |
| | | // initialWidth: 200, |
| | | wrapText: true, |
| | | cellAttributes: { alignment: "left" } |
| | | }, |
| | | { |
| | | label: "第三分类", |
| | | fieldName: "Category3__c", |
| | | initialWidth: 90, |
| | | initialWidth: 102, |
| | | cellAttributes: { alignment: "left" }, |
| | | hideDefaultActions: true, |
| | | sortable: true, |
| | |
| | | label: "第四分类", |
| | | fieldName: "Category4__c", |
| | | cellAttributes: { alignment: "left" }, |
| | | initialWidth: 90, |
| | | initialWidth: 102, |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | sortable: true |
| | |
| | | label: "第五分类", |
| | | fieldName: "Category5__c", |
| | | cellAttributes: { alignment: "left" }, |
| | | initialWidth: 90, |
| | | initialWidth: 102, |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | sortable: true |
| | |
| | | label: "规格", |
| | | fieldName: "packing_list", |
| | | cellAttributes: { alignment: "right" }, |
| | | initialWidth: 55, |
| | | initialWidth: 50, |
| | | wrapText: true, |
| | | hideDefaultActions: true |
| | | }, |
| | |
| | | label: "单位", |
| | | fieldName: "BoxPiece", |
| | | cellAttributes: { alignment: "left" }, |
| | | initialWidth: 55, |
| | | initialWidth: 50, |
| | | wrapText: true, |
| | | hideDefaultActions: true |
| | | }, |
| | |
| | | fieldName: "approbation_No", |
| | | cellAttributes: { alignment: "left" }, |
| | | wrapText: true, |
| | | initialWidth: 155, |
| | | initialWidth: 104, |
| | | hideDefaultActions: true |
| | | }, |
| | | { |
| | |
| | | cellAttributes: { alignment: "left" }, |
| | | wrapText: true, |
| | | hideDefaultActions: true, |
| | | initialWidth: 100 |
| | | initialWidth: 95 |
| | | }, |
| | | { |
| | | label: "CFDA状态", |
| | | fieldName: "SFDA_Status__c", |
| | | cellAttributes: { alignment: "left" }, |
| | | initialWidth: 95, |
| | | initialWidth: 84, |
| | | wrapText: true, |
| | | hideDefaultActions: true |
| | | }, |
| | |
| | | fieldName: "guaranteeperiod", |
| | | cellAttributes: { alignment: "left" }, |
| | | hideDefaultActions: true, |
| | | initialWidth: 105 |
| | | initialWidth: 95 |
| | | }, |
| | | { |
| | | label: "有效期内库存", |
| | | type: "customInventoryColor", |
| | | // sortable: true, |
| | | fieldName: "limitCount", |
| | | sortable: true, |
| | | cellAttributes: { alignment: "right" }, |
| | | typeAttributes: { |
| | | value: { fieldName: "limitCount" }, |
| | |
| | | boxPrice: { fieldName: "BoxPiece" } |
| | | }, |
| | | hideDefaultActions: true, |
| | | initialWidth: 150 |
| | | initialWidth: 110 |
| | | }, |
| | | |
| | | { |
| | |
| | | fieldName: "overlimitCount", |
| | | hideDefaultActions: true, |
| | | cellAttributes: { alignment: "right" }, |
| | | initialWidth: 80 |
| | | initialWidth: 78 |
| | | } |
| | | ]; |
| | | defaultSortDirection = "asc"; |
| | |
| | | console.log("result = " + JSON.stringify(result)); |
| | | console.log("result 1= " + JSON.stringify(result.entity)); |
| | | console.log("result 2= " + JSON.stringify(result.entity.pageRecords)); |
| | | console.log( |
| | | "result.entity.categoryOptionMap 2= " + |
| | | JSON.stringify(result.entity.categoryOptionMap) |
| | | ); |
| | | console.log( |
| | | "result.entity.categoryOptionMap 2= " + |
| | | JSON.stringify(result.entity.category4OptionMap) |
| | | ); |
| | | console.log( |
| | | "result.entity.categoryOptionMap 2= " + |
| | | JSON.stringify(result.entity.category5OptionMap) |
| | | ); |
| | | if (result.status == "Success") { |
| | | console.log( |
| | | "result.entity.paginatedAccounts = " + |
| | |
| | | |
| | | this.loader = false; |
| | | this.data = result.entity.pageRecords; |
| | | this.productkucun = result.entity.productkucun; |
| | | |
| | | for (var i in this.data) { |
| | | this.data[i]["Name__c"] = this.data[i].Prod.Name__c; |
| | | this.data[i]["Category3__c"] = this.data[i].Prod.Category3__c; |
| | | this.data[i]["Category4__c"] = this.data[i].Prod.Category3__c; |
| | | this.data[i]["Category5__c"] = this.data[i].Prod.Category3__c; |
| | | this.data[i]["Category4__c"] = this.data[i].Prod.Category4__c; |
| | | this.data[i]["Category5__c"] = this.data[i].Prod.Category5__c; |
| | | this.data[i]["SFDA_Status__c"] = this.data[i].Prod.SFDA_Status__c; |
| | | } |
| | | this.showTable = true; |
| | |
| | | for (var j in this.data) { |
| | | this.data[j]["Name__c"] = this.data[j].Prod.Name__c; |
| | | this.data[j]["Category3__c"] = this.data[j].Prod.Category3__c; |
| | | this.data[j]["Category4__c"] = this.data[j].Prod.Category3__c; |
| | | this.data[j]["Category5__c"] = this.data[j].Prod.Category3__c; |
| | | this.data[j]["Category4__c"] = this.data[j].Prod.Category4__c; |
| | | this.data[j]["Category5__c"] = this.data[j].Prod.Category5__c; |
| | | this.data[j]["SFDA_Status__c"] = this.data[j].Prod.SFDA_Status__c; |
| | | this.data[j]["hospitalSpecialOffer__c"] = |
| | | this.data[j].hospitalSpecialOffer; |
| | |
| | | } |
| | | break; |
| | | case "CategoryFour": |
| | | this.Category4 = value; |
| | | this.CategoryFour = value; |
| | | //调用后台显示第五分类 |
| | | this.showCate(); |
| | | if (this.CategoryFour == "") { |
| | |
| | | |
| | | searchOrderDetail() { |
| | | this.showTable = false; |
| | | this.showSpinner = true; |
| | | searchOrder({ |
| | | category1: this.Name, |
| | | Category3: this.CategoryThree, |
| | |
| | | agencyProType: this.agencyProType, |
| | | userWorkLocation: this.userWorkLocation, |
| | | pageSizeLWC: this.pageSize, |
| | | pageTokenLWC: this.currentPageToken |
| | | pageTokenLWC: this.currentPageToken, |
| | | productkucunLWC: this.productkucun |
| | | |
| | | // sortFieldLWC: this.sortBy, |
| | | // sortOrderLWC: this.sortDirection |
| | | }) |
| | |
| | | this.totalPages = Math.ceil( |
| | | result.entity.paginatedAccounts.totalRecords / this.pageSize |
| | | ); |
| | | console.log( |
| | | "result.entity.paginatedAccounts = " + |
| | | JSON.stringify(result.entity.paginatedAccounts) |
| | | ); |
| | | console.log("this.totalPages = " + this.totalPages); |
| | | this.paginationVisibility = this.totalPages > 1 ? true : false; |
| | | console.log("this.sortDirection = " + this.sortDirection); |
| | | // this.showToast("Success",'搜索成功', result.msg); |
| | | this.showMyToast("搜索成功", result.msg, "success"); |
| | | // this.showMyToast('搜索成功',result.msg,'success'); |
| | | this.data = result.entity.pageRecords; |
| | | console.log("搜索Data==>" + JSON.stringify(this.data)); |
| | | for (var i in this.data) { |
| | | this.data[i]["Name__c"] = this.data[i].Prod.Name__c; |
| | | this.data[i]["Category3__c"] = this.data[i].Prod.Category3__c; |
| | | this.data[i]["Category4__c"] = this.data[i].Prod.Category3__c; |
| | | this.data[i]["Category5__c"] = this.data[i].Prod.Category3__c; |
| | | this.data[i]["Category4__c"] = this.data[i].Prod.Category4__c; |
| | | this.data[i]["Category5__c"] = this.data[i].Prod.Category5__c; |
| | | this.data[i]["SFDA_Status__c"] = this.data[i].Prod.SFDA_Status__c; |
| | | this.data[i]["hospitalSpecialOffer__c"] = |
| | | this.data[i].hospitalSpecialOffer; |
| | | this.data[i]["guaranteeperiod"] = this.data[i].guaranteeperiod; |
| | | } |
| | | this.data = [...this.data]; |
| | | console.log("this.data = " + JSON.stringify(this.data)); |
| | | this.showTable = true; |
| | | this.showSpinner = false; |
| | | } else { |
| | | this.nextPageToken = this.pageSize; |
| | | this.totalRecords = 0; |
| | | this.recordStart = 0; |
| | | this.recordEnd = 0; |
| | | this.totalPages = 0; |
| | | |
| | | // this.showToast("Error",'Error', result.msg); |
| | | this.showMyToast("搜索失败", result.msg, "error"); |
| | | // this.showMyToast('搜索失败',result.msg,'error'); |
| | | this.showSpinner = false; |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error = " + JSON.stringify(error)); |
| | | this.showSpinner = false; |
| | | }); |
| | | } |
| | | inventoryCount() { |
| | |
| | | agencyProType: this.agencyProType, |
| | | userWorkLocation: this.userWorkLocation, |
| | | pageSizeLWC: this.pageSize, |
| | | pageTokenLWC: this.currentPageToken |
| | | pageTokenLWC: this.currentPageToken, |
| | | productkucunLWC: this.productkucun |
| | | }) |
| | | .then((result) => { |
| | | console.log("result搜索 = " + JSON.stringify(result)); |
| | |
| | | for (var i in this.data) { |
| | | this.data[i]["Name__c"] = this.data[i].Prod.Name__c; |
| | | this.data[i]["Category3__c"] = this.data[i].Prod.Category3__c; |
| | | this.data[i]["Category4__c"] = this.data[i].Prod.Category3__c; |
| | | this.data[i]["Category5__c"] = this.data[i].Prod.Category3__c; |
| | | this.data[i]["Category4__c"] = this.data[i].Prod.Category4__c; |
| | | this.data[i]["Category5__c"] = this.data[i].Prod.Category5__c; |
| | | this.data[i]["SFDA_Status__c"] = this.data[i].Prod.SFDA_Status__c; |
| | | this.data[i]["guaranteeperiod"] = this.data[i].guaranteeperiod; |
| | | } |
| | | this.showSpinner = false; |
| | | this.showTable = true; |
| | | this.showMyToast("搜索成功", result.msg, "success"); |
| | | // this.showMyToast('搜索成功',result.msg,'success'); |
| | | // this.showToast("Success",'搜索成功', result.msg); |
| | | this.showSpinner = false; |
| | | } else { |
| | | // this.showToast("Error", 'Error',result.msg); |
| | | this.showMyToast("搜索失败", result.msg, "error"); |
| | | // this.showMyToast('搜索失败',result.msg,'error'); |
| | | this.showSpinner = false; |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error = " + JSON.stringify(error)); |
| | | this.showSpinner = false; |
| | | }); |
| | | } |
| | | |
| | |
| | | this.template |
| | | .querySelector("c-common-toast") |
| | | .showToast(variant, content, iconName, 10000); |
| | | |
| | | // showToast(type,title,msg) { |
| | | // this.showSpinner = false; |
| | | // let mode = ''; |
| | | // if (type.toLowerCase() != 'success') { |
| | | // mode = 'sticky'; |
| | | // } else { |
| | | // mode = 'dismissable'; |
| | | // } |
| | | // const event = new ShowToastEvent({ |
| | | // title: title, |
| | | // variant: type, |
| | | // message: msg, |
| | | // mode: mode |
| | | // }); |
| | | // this.dispatchEvent(event); |
| | | // } |
| | | } |
| | | } |