| | |
| | | @import 'c/lexCssUtility'; |
| | | |
| | | lightning-output-field { |
| | | pointer-events: none; |
| | | --lwc-colorTextLabel:#696969; |
| | |
| | | <template> |
| | | <template if:true={showSpinner}> |
| | | <lightning-spinner size="medium" variant="brand"></lightning-spinner> |
| | | <!-- <lightning-spinner size="medium" variant="brand"></lightning-spinner> --> |
| | | <div class="slds-spinner_container"> |
| | | <div role="status" class="slds-spinner slds-spinner_medium slds-spinner_brand"> |
| | | <span class="slds-assistive-text">Loading</span> |
| | | <div class="slds-spinner__dot-a"></div> |
| | | <div class="slds-spinner__dot-b"></div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <c-common-toast></c-common-toast> |
| | | <template if:true={showPage}> |
| | |
| | | <template> |
| | | <template if:true={showSpinner}> |
| | | <lightning-spinner size="medium" variant="brand"></lightning-spinner> |
| | | <!-- <lightning-spinner size="medium" variant="brand"></lightning-spinner> --> |
| | | <div class="slds-spinner_container"> |
| | | <div role="status" class="slds-spinner slds-spinner_medium slds-spinner_brand"> |
| | | <span class="slds-assistive-text">Loading</span> |
| | | <div class="slds-spinner__dot-a"></div> |
| | | <div class="slds-spinner__dot-b"></div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <c-common-toast></c-common-toast> |
| | | <template if:true={showPage}> |
| | |
| | | type: 'TotalNum', |
| | | recordId: { fieldName: "Id" } |
| | | }, |
| | | hideDefaultActions: true, initialWidth: 100}, |
| | | hideDefaultActions: true, initialWidth: 100,cellAttributes: { alignment: "right" }}, |
| | | {label:'已到货数量', |
| | | type: "customOutputGood", |
| | | typeAttributes: { |
| | |
| | | type: 'ArrDet', |
| | | recordId: { fieldName: "Id" } |
| | | }, |
| | | hideDefaultActions: true, initialWidth: 110}, |
| | | hideDefaultActions: true, initialWidth: 110,cellAttributes: { alignment: "right" }}, |
| | | {label:'待系统操作入库数量', |
| | | type: "customOutputGood", |
| | | typeAttributes: { |
| | |
| | | type: 'DeliveryDet', |
| | | recordId: { fieldName: "Id" } |
| | | }, |
| | | hideDefaultActions: true, initialWidth: 180}, |
| | | hideDefaultActions: true, initialWidth: 180,cellAttributes: { alignment: "right" }}, |
| | | {label:'还没发货数量', |
| | | type: "customOutputGood", |
| | | typeAttributes: { |
| | |
| | | type: 'NotArrDet', |
| | | recordId: { fieldName: "Id" } |
| | | }, |
| | | hideDefaultActions: true, initialWidth: 120}, |
| | | hideDefaultActions: true, initialWidth: 120,cellAttributes: { alignment: "right" }}, |
| | | {label:'发货七天还未到货数', |
| | | type: "customOutputGood", |
| | | typeAttributes: { |
| | |
| | | type: 'MoreThan7', |
| | | recordId: { fieldName: "Id" } |
| | | }, |
| | | hideDefaultActions: true, initialWidth: 180}, |
| | | 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} |
| | | ]; |
| | |
| | | <template> |
| | | <template if:true={showSpinner}> |
| | | <lightning-spinner size="medium" variant="brand"></lightning-spinner> |
| | | <!-- <lightning-spinner size="medium" variant="brand"></lightning-spinner> --> |
| | | <div class="slds-spinner_container"> |
| | | <div role="status" class="slds-spinner slds-spinner_medium slds-spinner_brand"> |
| | | <span class="slds-assistive-text">Loading</span> |
| | | <div class="slds-spinner__dot-a"></div> |
| | | <div class="slds-spinner__dot-b"></div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <c-common-toast></c-common-toast> |
| | | <template if:true={showPage}> |
| | |
| | | <template> |
| | | <template if:true={showSpinner}> |
| | | <lightning-spinner size="medium" variant="brand"></lightning-spinner> |
| | | <!-- <lightning-spinner size="medium" variant="brand"></lightning-spinner> --> |
| | | <div class="slds-spinner_container"> |
| | | <div role="status" class="slds-spinner slds-spinner_medium slds-spinner_brand"> |
| | | <span class="slds-assistive-text">Loading</span> |
| | | <div class="slds-spinner__dot-a"></div> |
| | | <div class="slds-spinner__dot-b"></div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <c-common-toast></c-common-toast> |
| | | <div style="border: 1px solid #d4d4d4; border-radius: 5px"> |
| | | <div |
| | | style=" |
| | | border-top: 3px solid #51606e; |
| | | border-bottom: 1px solid #d4d4d4; |
| | | padding: 3px; |
| | | " |
| | | > |
| | | <div style="border: 1px solid #D4D4D4;border-radius:5px;"> |
| | | |
| | | <div style="border-top: 3px solid #51606E;;border-bottom: 1px solid #D4D4D4;padding:3px;"> |
| | | <div> |
| | | <!-- <p style="font-size: 18px;"><strong>取消拆盒</strong></p> --> |
| | | <lightning-layout> |
| | |
| | | </lightning-layout> |
| | | </div> |
| | | </div> |
| | | <div style="padding: 10px"> |
| | | <div |
| | | style=" |
| | | border: 1px solid #d4d4d4; |
| | | border-radius: 5px; |
| | | margin-bottom: 7px; |
| | | " |
| | | > |
| | | <div |
| | | style=" |
| | | border-top: 3px solid #51606e; |
| | | border-bottom: 1px solid #d4d4d4; |
| | | padding: 3px; |
| | | " |
| | | > |
| | | <div style="padding:10px;"> |
| | | <div style="border: 1px solid #D4D4D4;border-radius:5px;margin-bottom:7px;"> |
| | | <div style="border-top: 3px solid #51606E;border-bottom: 1px solid #D4D4D4;padding:3px;"> |
| | | <!-- <lightning-button variant="brand" class='lexstyle' style="margin-left:10px;" label="取消拆盒确认" title="取消拆盒确认" onclick={saveConfirm}></lightning-button></td> --> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder" |
| | | style="margin-left: 10px; margin-top: 12px; margin-bottom: 12px" |
| | | label="取消拆盒确认" |
| | | onclick={saveConfirm} |
| | | > |
| | | 取消拆盒确认 |
| | | </button> |
| | | <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" style="margin-left:10px;margin-top:12px;margin-bottom:12px;" label="取消拆盒确认" onclick={saveConfirm}>取消拆盒确认</button> |
| | | </div> |
| | | </div> |
| | | <div |
| | | style=" |
| | | border: 1px solid #d4d4d4; |
| | | border-radius: 5px; |
| | | margin-bottom: 7px; |
| | | margin-top: 5px; |
| | | " |
| | | > |
| | | <div |
| | | style=" |
| | | border-top: 3px solid #51606e; |
| | | border-bottom: 1px solid #d4d4d4; |
| | | padding: 3px; |
| | | " |
| | | > |
| | | <div style="border: 1px solid #D4D4D4;border-radius:5px;margin-bottom:7px;margin-top:5px;"> |
| | | <div style="border-top: 3px solid #51606E;border-bottom: 1px solid #D4D4D4;padding:3px;"> |
| | | <lightning-layout> |
| | | <lightning-layout-item padding="around-small"> |
| | | <p style="font-size: 16px"> |
| | |
| | | <tr> |
| | | <td></td> |
| | | <td align="right" class="searchName">BarCode</td> |
| | | <td style="width: 600px"> |
| | | <lightning-textarea |
| | | class="inputFont" |
| | | name="BarCode" |
| | | label="" |
| | | onchange={handleChange} |
| | | ></lightning-textarea> |
| | | </td> |
| | | <td style="width:600px"><lightning-textarea class="inputFont" name="BarCode" label="" |
| | | onchange={handleChange}></lightning-textarea></td> |
| | | <td align="right"></td> |
| | | <td></td> |
| | | <td style="width: 200px"> |
| | | <button |
| | | style="margin-top: 14px" |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder" |
| | | label="获取明细" |
| | | onclick={getDetails} |
| | | > |
| | | 获取明细 |
| | | </button> |
| | | <td style="width: 200px;"> |
| | | <button style="margin-top:14px;" class="slds-button slds-button_neutral slds-button_stretch lexBorder" label="获取明细" onclick={getDetails}>获取明细</button> |
| | | <!-- <lightning-button variant="brand" class='lexstyle' label="获取明细" title="获取明细" onclick={getDetails} |
| | | ></lightning-button> --> |
| | | </td> |
| | |
| | | <!-- </div> --> |
| | | </div> |
| | | |
| | | <div |
| | | style=" |
| | | border: 1px solid #d4d4d4; |
| | | border-radius: 5px; |
| | | margin-bottom: 7px; |
| | | " |
| | | > |
| | | <div |
| | | style=" |
| | | border-top: 3px solid #51606e; |
| | | border-bottom: 1px solid #d4d4d4; |
| | | padding: 3px; |
| | | " |
| | | > |
| | | <div style="border: 1px solid #D4D4D4;border-radius:5px;margin-bottom:7px;"> |
| | | <div style="border-top: 3px solid #51606E;border-bottom: 1px solid #D4D4D4;padding:3px;"> |
| | | <lightning-layout> |
| | | <lightning-layout-item padding="around-small"> |
| | | <p style="font-size: 18px"> |
| | |
| | | </lightning-layout-item> |
| | | </lightning-layout> |
| | | </div> |
| | | <div style="padding: 10px"> |
| | | <div style="padding:10px;"> |
| | | |
| | | <!-- <div style="height: 300px;"> --> |
| | | <!-- <template if:true={showTable}> --> |
| | | <c-lex-custom-lightning-datatable |
| | | key-field="prodid" |
| | | data={data} |
| | | columns={columns} |
| | | onrowselection={getSelectedRows} |
| | | hide-checkbox-column="true" |
| | | selected-rows={selectedRows} |
| | | class="wrapped-header-datatable" |
| | | style="word-wrap: break-word; word-break: break-all" |
| | | > |
| | | <c-lex-custom-lightning-datatable key-field="prodid" data={data} columns={columns} |
| | | onrowselection={getSelectedRows} hide-checkbox-column="true" |
| | | selected-rows={selectedRows} class="wrapped-header-datatable" style="word-wrap:break-word; word-break:break-all; "> |
| | | </c-lex-custom-lightning-datatable> |
| | | <!-- </template> --> |
| | | <!-- </div> --> |
| | | |
| | | </div> |
| | | </div> |
| | | <div |
| | | style=" |
| | | border: 1px solid #d4d4d4; |
| | | border-radius: 5px; |
| | | margin-bottom: 7px; |
| | | margin-top: 10px; |
| | | " |
| | | > |
| | | <div |
| | | style=" |
| | | border-top: 3px solid #51606e; |
| | | border-bottom: 1px solid #d4d4d4; |
| | | padding: 3px; |
| | | " |
| | | > |
| | | <div style="border: 1px solid #D4D4D4;border-radius:5px;margin-bottom:7px;margin-top:10px"> |
| | | <div style="border-top: 3px solid #51606E;border-bottom: 1px solid #D4D4D4;padding:3px;"> |
| | | <table> |
| | | <tr> |
| | | <td> |
| | |
| | | </table> |
| | | </div> |
| | | |
| | | <div style="padding: 10px"> |
| | | <div style="padding:10px;"> |
| | | <lightning-datatable |
| | | key-field="id" |
| | | data={errorDetail} |
| | | columns={column} |
| | | onrowselection={getSelectedRows} |
| | | hide-checkbox-column="true" |
| | | selected-rows={selectedRows} |
| | | class="wrapped-header-datatable" |
| | | style="word-wrap: break-word; word-break: break-all" |
| | | > |
| | | key-field="id" data={errorDetail} columns={column} |
| | | onrowselection={getSelectedRows} hide-checkbox-column="true" |
| | | selected-rows={selectedRows} class="wrapped-header-datatable" style="word-wrap:break-word; word-break:break-all; "> |
| | | </lightning-datatable> |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | </div> |
| | | |
| | | </template> |
| | |
| | | import { LightningElement, wire, api, track } from "lwc"; |
| | | import { ShowToastEvent } from "lightning/platformShowToastEvent"; |
| | | import { LightningElement, wire, api, track } from 'lwc'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import oninit from "@salesforce/apex/LexCancelRemoveBoxController.init"; |
| | | import searchDeatail from "@salesforce/apex/LexCancelRemoveBoxController.searchConsumableorderdetails"; |
| | | import saveConfirm from "@salesforce/apex/LexCancelRemoveBoxController.cancelRemoveBoxConfirm"; |
| | | import searchDeatail from "@salesforce/apex/LexCancelRemoveBoxController.searchConsumableorderdetails" |
| | | import saveConfirm from '@salesforce/apex/LexCancelRemoveBoxController.cancelRemoveBoxConfirm'; |
| | | |
| | | //table css |
| | | import { loadStyle } from "lightning/platformResourceLoader"; |
| | | import WrappedHeaderTable from "@salesforce/resourceUrl/lexdatatable"; |
| | | const columns = [ |
| | | { |
| | | label: "消耗品名称", |
| | | fieldName: "Name__c", |
| | | label: '消耗品名称', |
| | | fieldName: 'Name__c', |
| | | hideDefaultActions: true, |
| | | wrapText: true |
| | | // initialWidth: 350, |
| | | |
| | | }, |
| | | { |
| | | label: "规格", |
| | | fieldName: "ProductPacking_list_manual__c", |
| | | label: '规格', |
| | | fieldName: 'ProductPacking_list_manual__c', |
| | | hideDefaultActions: true, |
| | | cellAttributes: { alignment: "right" }, |
| | | initialWidth: 50 |
| | | initialWidth: 50, |
| | | |
| | | }, |
| | | { |
| | | label: "CFDA状态", |
| | | fieldName: "CFDA_Status__c", |
| | | label: 'CFDA状态', |
| | | fieldName: 'CFDA_Status__c', |
| | | hideDefaultActions: true, |
| | | initialWidth: 100, |
| | | wrapText: true |
| | | |
| | | }, |
| | | { |
| | | label: "注册证编码号", |
| | | fieldName: "Report_Product_Approbation__c", |
| | | label: '注册证编码号', |
| | | fieldName: 'Report_Product_Approbation__c', |
| | | hideDefaultActions: true, |
| | | initialWidth: 200, |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: "注册证效期", |
| | | fieldName: "Report_Product_Expiration__c", |
| | | label: '注册证效期', |
| | | fieldName: 'Report_Product_Expiration__c', |
| | | hideDefaultActions: true, |
| | | initialWidth: 110, |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: "BarCode", |
| | | fieldName: "Bar_Code__c", |
| | | label: 'BarCode', |
| | | fieldName: 'Bar_Code__c', |
| | | hideDefaultActions: true, |
| | | wrapText: true |
| | | } |
| | |
| | | |
| | | const column = [ |
| | | { |
| | | label: "消耗品名称", |
| | | fieldName: "Name__c", |
| | | label: '消耗品名称', |
| | | fieldName: 'Name__c', |
| | | hideDefaultActions: true, |
| | | wrapText: true |
| | | |
| | | }, |
| | | { |
| | | label: "BarCode", |
| | | fieldName: "Bar_Code__c", |
| | | label: 'BarCode', |
| | | fieldName: 'Bar_Code__c', |
| | | wrapText: true, |
| | | hideDefaultActions: true |
| | | hideDefaultActions: true, |
| | | // initialWidth:600 |
| | | }, |
| | | |
| | | |
| | | } |
| | | , |
| | | { |
| | | label: "错误原因", |
| | | fieldName: "ErrorReason", |
| | | hideDefaultActions: true |
| | | label: '错误原因', |
| | | fieldName: 'ErrorReason', |
| | | hideDefaultActions: true, |
| | | } |
| | | ]; |
| | | |
| | | |
| | | export default class LexCancelRemoveBox extends LightningElement { |
| | | columns = columns; |
| | |
| | | @track errorDetail = []; |
| | | |
| | | // 显示 |
| | | @track showTable = false; |
| | | @track showTable = false |
| | | @track showSpinner = false; |
| | | |
| | | //数据构成 |
| | | @track accountName; |
| | | @track userWorkLocation; |
| | | @track agencyProType; |
| | | @track barcode = ""; |
| | | @track saveFLGbln = false; |
| | | @track accountName |
| | | @track userWorkLocation |
| | | @track agencyProType |
| | | @track barcode = '' |
| | | @track saveFLGbln = false |
| | | @track dataSize = 0; |
| | | |
| | | renderedCallback() { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | connectedCallback() { |
| | | console.log("初始化"); |
| | | console.log('初始化'); |
| | | // this.showTable = false; |
| | | oninit() |
| | | .then((result) => { |
| | | oninit().then((result) => { |
| | | result = JSON.parse(JSON.stringify(result)); |
| | | console.log("result =" + JSON.stringify(result)); |
| | | if ((result.status = "Success")) { |
| | | console.log("result"); |
| | | console.log('result =' + JSON.stringify(result)); |
| | | if (result.status = 'Success') { |
| | | console.log('result'); |
| | | this.agencyProType = result.entity.agencyProType; |
| | | this.userWorkLocation = result.entity.userWorkLocation; |
| | | this.accountName = result.entity.accountName; |
| | | // this.data = JSON.parse(result.entity.codPageRecords); |
| | | // this.showTable = true; |
| | | } else { |
| | | this.showMyToast("初始化失败", result.msg, "error"); |
| | | this.showMyToast('初始化失败',result.msg,'error'); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error = " + JSON.stringify(error)); |
| | | }).catch((error) => { |
| | | console.log('error = ' + JSON.stringify(error)); |
| | | }); |
| | | } |
| | | |
| | |
| | | userWorkLocation: this.userWorkLocation, |
| | | agencyProType: this.agencyProType, |
| | | barcode: this.barcode |
| | | }) |
| | | .then((result) => { |
| | | }).then((result) => { |
| | | result = JSON.parse(JSON.stringify(result)); |
| | | console.log("result =" + JSON.stringify(result)); |
| | | if (result.status == "Success") { |
| | | console.log("成功"); |
| | | this.data = JSON.parse( |
| | | result.entity.ConsumableorderdetailsRecordsdummy |
| | | ); |
| | | this.errorDetail = JSON.parse( |
| | | result.entity.ConsumableorderdetailsRecordserror |
| | | ); |
| | | console.log('result =' + JSON.stringify(result)); |
| | | if (result.status == 'Success') { |
| | | console.log('成功'); |
| | | this.data = JSON.parse(result.entity.ConsumableorderdetailsRecordsdummy); |
| | | this.errorDetail = JSON.parse(result.entity.ConsumableorderdetailsRecordserror); |
| | | this.dataSize = result.entity.dataSize; |
| | | for (let i in this.data) { |
| | | this.data[i]["Name__c"] = this.data[i].Prod.Name__c; |
| | | this.data[i]["ProductPacking_list_manual__c"] = |
| | | this.data[i].esd.ProductPacking_list_manual__c; |
| | | this.data[i]["CFDA_Status__c"] = this.data[i].esd.CFDA_Status__c; |
| | | this.data[i]["Report_Product_Approbation__c"] = |
| | | this.data[i].esd.Report_Product_Approbation__c; |
| | | this.data[i]["Report_Product_Expiration__c"] = |
| | | this.data[i].esd.Report_Product_Expiration__c; |
| | | this.data[i]["Bar_Code__c"] = this.data[i].esd.Bar_Code__c; |
| | | this.data[i]['Name__c'] = this.data[i].Prod.Name__c; |
| | | this.data[i]['ProductPacking_list_manual__c'] = this.data[i].esd.ProductPacking_list_manual__c; |
| | | this.data[i]['CFDA_Status__c'] = this.data[i].esd.CFDA_Status__c; |
| | | this.data[i]['Report_Product_Approbation__c'] = this.data[i].esd.Report_Product_Approbation__c; |
| | | this.data[i]['Report_Product_Expiration__c'] = this.data[i].esd.Report_Product_Expiration__c; |
| | | this.data[i]['Bar_Code__c'] = this.data[i].esd.Bar_Code__c; |
| | | } |
| | | // this.showTable = true; |
| | | for (let i in this.errorDetail) { |
| | | this.errorDetail[i]["Name__c"] = this.errorDetail[i].Prod.Name__c; |
| | | this.errorDetail[i]["Bar_Code__c"] = |
| | | this.errorDetail[i].esd.Bar_Code__c; |
| | | this.errorDetail[i]["ErrorReason"] = |
| | | this.errorDetail[i].ErrorReason; |
| | | this.errorDetail[i]['Name__c'] = this.errorDetail[i].Prod.Name__c; |
| | | this.errorDetail[i]['Bar_Code__c'] = this.errorDetail[i].esd.Bar_Code__c; |
| | | this.errorDetail[i]['ErrorReason'] = this.errorDetail[i].ErrorReason; |
| | | } |
| | | // this.showTables = true; |
| | | this.showSpinner = false; |
| | | } else { |
| | | this.showMyToast("获取失败", result.msg, "error"); |
| | | this.showMyToast('获取失败',result.msg,'error'); |
| | | this.showSpinner = false; |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error = " + JSON.stringify(error)); |
| | | }).catch((error) => { |
| | | console.log('error = ' + JSON.stringify(error)); |
| | | }); |
| | | |
| | | } |
| | | //获取当前输入值 |
| | | handleChange(event) { |
| | | let value = event.detail.value; |
| | | console.log("value" + value); |
| | | console.log('value' + value); |
| | | this.barcode = value; |
| | | console.log("this.barcode" + this.barcode); |
| | | console.log('this.barcode' + this.barcode); |
| | | } |
| | | |
| | | |
| | | saveConfirm() { |
| | | let msg = "确认取消拆盒吗"; |
| | |
| | | accountName: this.accountName, |
| | | userWorkLocation: this.userWorkLocation, |
| | | agencyProType: this.agencyProType |
| | | }) |
| | | .then((result) => { |
| | | }).then((result) => { |
| | | result = JSON.parse(JSON.stringify(result)); |
| | | console.log("result保存 = " + JSON.stringify(result)); |
| | | if (result.status == "Success") { |
| | | console.log('result保存 = ' + JSON.stringify(result)); |
| | | if (result.status == 'Success') { |
| | | this.saveFLGbln = result.entity.saveFLGbln; |
| | | // this.showSpinner = false; |
| | | if (this.saveFLGbln) { |
| | | this.showMyToast(result.msg, "", "success"); |
| | | this.showMyToast(result.msg,'','success'); |
| | | this.showSpinner = false; |
| | | |
| | | |
| | | } |
| | | } else { |
| | | this.showMyToast("取消拆盒失败", result.msg, "error"); |
| | | this.showMyToast('取消拆盒失败',result.msg,'error'); |
| | | this.showSpinner = false; |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error = " + JSON.stringify(error)); |
| | | console.log('error = ' + JSON.stringify(error)); |
| | | }); |
| | | |
| | | } |
| | | showMyToast(title, message, variant) { |
| | | console.log("show custom message"); |
| | | var iconName = ""; |
| | | var content = ""; |
| | | if (variant == "success") { |
| | | iconName = "utility:check"; |
| | | console.log('show custom message'); |
| | | var iconName = ''; |
| | | var content = ''; |
| | | if(variant == 'success'){ |
| | | iconName = 'utility:check'; |
| | | } else { |
| | | iconName = "utility:error"; |
| | | iconName = 'utility:error'; |
| | | } |
| | | if (message != "") { |
| | | content = |
| | | "<h2><strong>" + title + "<strong/></h2><h5>" + message + "</h5>"; |
| | | if(message != ''){ |
| | | content = '<h2><strong>'+title+'<strong/></h2><h5>'+message+'</h5>'; |
| | | } else { |
| | | content = "<h2><strong>" + title + "<strong/></h2>"; |
| | | 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); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | <template> |
| | | <c-common-toast></c-common-toast> |
| | | <template if:true={isShowSpinner}> |
| | | <lightning-spinner size="medium" variant="brand"></lightning-spinner> |
| | | <div role="status" class="slds-spinner slds-spinner_medium slds-spinner_brand"> |
| | | <span class="slds-assistive-text">Loading</span> |
| | | <div class="slds-spinner__dot-a"></div> |
| | | <div class="slds-spinner__dot-b"></div> |
| | | </div> |
| | | </template> |
| | | |
| | | |
| | |
| | | <template> |
| | | <template if:true={showSpinner}> |
| | | <lightning-spinner size="medium" variant="brand"></lightning-spinner> |
| | | <!-- <lightning-spinner size="medium" variant="brand"></lightning-spinner> --> |
| | | <div class="slds-spinner_container"> |
| | | <div role="status" class="slds-spinner slds-spinner_medium slds-spinner_brand"> |
| | | <span class="slds-assistive-text">Loading</span> |
| | | <div class="slds-spinner__dot-a"></div> |
| | | <div class="slds-spinner__dot-b"></div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <c-common-toast></c-common-toast> |
| | | <template if:true={showPage}> |
| | |
| | | <template> |
| | | <template if:true={showSpinner}> |
| | | <lightning-spinner size="medium" variant="brand"></lightning-spinner> |
| | | <!-- <lightning-spinner size="medium" variant="brand"></lightning-spinner> --> |
| | | <div class="slds-spinner_container"> |
| | | <div role="status" class="slds-spinner slds-spinner_medium slds-spinner_brand"> |
| | | <span class="slds-assistive-text">Loading</span> |
| | | <div class="slds-spinner__dot-a"></div> |
| | | <div class="slds-spinner__dot-b"></div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <c-common-toast></c-common-toast> |
| | | <template if:true={showPage}> |
| | |
| | | font-size: 14px; |
| | | --lwc-fontSize2:14px; |
| | | } |
| | | |
| | | /* spinner_container By Link */ |
| | | .slds-spinner_container{ |
| | | position:fixed; |
| | | top: 123px; |
| | | } |
| | |
| | | --lwc-inputStaticFontSize: 16px; |
| | | --lwc-formLabelFontSize: 16px; |
| | | } |
| | | /* .spinner-container{ |
| | | position: fixed; */ |
| | | /* width:100%; |
| | | height:90%; */ |
| | | /* top: 90%; */ |
| | | /* left: 100%; |
| | | transform: translate(-50%, -50%); */ |
| | | /* z-index: 9999; |
| | | } */ |
| | |
| | | <template> |
| | | <template if:true={showSpinner}> |
| | | <lightning-spinner size="medium" variant="brand"></lightning-spinner> |
| | | <!-- <lightning-spinner class="spinner-container" size="medium" variant="brand"></lightning-spinner> --> |
| | | <div class="slds-spinner_container"> |
| | | <div role="status" class="slds-spinner slds-spinner_medium slds-spinner_brand"> |
| | | <span class="slds-assistive-text">Loading</span> |
| | | <div class="slds-spinner__dot-a"></div> |
| | | <div class="slds-spinner__dot-b"></div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <c-common-toast></c-common-toast> |
| | | <template if:true={showcount}> |
| | |
| | | }); |
| | | doc += '</table>'; |
| | | console.log('doc' + doc); |
| | | var element = 'data:application/vnd.ms-excel,' + encodeURIComponent(doc); |
| | | var bom = "\uFEFF"; |
| | | var element = 'data:application/vnd.ms-excel,' + encodeURIComponent(bom + doc); |
| | | let downloadElement = document.createElement('a'); |
| | | downloadElement.href = element; |
| | | downloadElement.target = '_self'; |
| | |
| | | <template> |
| | | <c-common-toast></c-common-toast> |
| | | <template if:true={isShowSpinner}> |
| | | <lightning-spinner alternative-text="Loading" size="large"></lightning-spinner> |
| | | <div role="status" class="slds-spinner slds-spinner_medium slds-spinner_brand"> |
| | | <span class="slds-assistive-text">Loading</span> |
| | | <div class="slds-spinner__dot-a"></div> |
| | | <div class="slds-spinner__dot-b"></div> |
| | | </div> |
| | | </template> |
| | | <div class="outerBorderCss"> |
| | | <div style="padding: 5px"> |
| | |
| | | <template> |
| | | <template if:true={showSpinner}> |
| | | <lightning-spinner size="medium" variant="brand"></lightning-spinner> |
| | | <!-- <lightning-spinner size="medium" variant="brand"></lightning-spinner> --> |
| | | <div class="slds-spinner_container"> |
| | | <div role="status" class="slds-spinner slds-spinner_medium slds-spinner_brand"> |
| | | <span class="slds-assistive-text">Loading</span> |
| | | <div class="slds-spinner__dot-a"></div> |
| | | <div class="slds-spinner__dot-b"></div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <c-common-toast></c-common-toast> |
| | | <div style="border: 1px solid #D4D4D4;border-radius:5px;"> |
| | |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div style="border: 1px solid #D4D4D4;border-radius:5px;margin-bottom:5px;"> |
| | | <div style="border-top: 3px solid #51606E;border-bottom: 1px solid #D4D4D4;padding:3px;"> |
| | | <table> |
| | |
| | | selected-rows={selectedRows} class="wrapped-header-datatable" style="word-wrap:break-word; word-break:break-all; "> |
| | | </lightning-datatable> |
| | | </div> |
| | | |
| | | |
| | | |
| | | <!-- <template if:true={showTables}> |
| | | <c-lex-custom-lightning-datatable key-field="prodid" data={overduePageRecords} columns={column} |
| | | onrowselection={getSelectedRows} hide-checkbox-column="true" |
| | | selected-rows={selectedRows}> |
| | | </c-lex-custom-lightning-datatable> |
| | | </template> --> |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </template> |
| | |
| | | } |
| | | }).catch((error) => { |
| | | console.log('error = ' + JSON.stringify(error)); |
| | | this.showSpinner = false; |
| | | }); |
| | | } |
| | | //barcode录入 |
| | |
| | | if (this.data[i].prodid + this.data[i]["boxPiece"] == selectedRows[j].prodid + selectedRows[j]["boxPiece"]) { |
| | | this.data[i]["check"] = true; |
| | | } |
| | | // console.log('this.data[i].ProdId+this.data[i]["boxPiece"]'+this.data[i].ProdId+this.data[i]["boxPiece"]); |
| | | console.log('selectedRows[j].prodid+this.data[i]["boxPiece"]' + selectedRows[j].prodid + selectedRows[j]["boxPiece"]); |
| | | |
| | | } |
| | | console.log('data===>'+ JSON.stringify(this.data)); |
| | | } |
| | | // this.selectedRows = []; |
| | | |
| | | // if(this.barcode == ''||this.barcode==null){ |
| | | // this.showMyToast('获取失败','请输入BarCode号','error'); |
| | | // this.showSpinner = false; |
| | | // } |
| | | barcodeEntry({ |
| | | accountNameLWC: this.accountName, |
| | | agencyProTypeLWC: this.agencyProType, |
| | |
| | | } |
| | | } |
| | | this.showSpinner = false; |
| | | // this.showTables = true; |
| | | this.showTable = true; |
| | | } else { |
| | | if (result.status == 'Success1') { |
| | |
| | | this.showMyToast(result.msg,'','error'); |
| | | this.showSpinner = false; |
| | | this.showTable = true; |
| | | |
| | | } |
| | | |
| | | // this.showMyToast('获取失败', result.msg, 'error'); |
| | |
| | | } |
| | | |
| | | }).catch((error) => { |
| | | this.showSpinner = false; |
| | | console.log('error = ' + JSON.stringify(error)); |
| | | }); |
| | | |
| | |
| | | if (this.data[i].prodid+this.data[i]["boxPiece"] == selectedRows[j].prodid+ selectedRows[j]["boxPiece"]) { |
| | | this.data[i]["check"] = true; |
| | | } |
| | | // console.log('this.data[i].ProdId+this.data[i]["boxPiece"]'+this.data[i].ProdId+this.data[i]["boxPiece"]); |
| | | console.log('selectedRows[j].prodid+this.data[i]["boxPiece"]'+selectedRows[j].prodid+selectedRows[j]["boxPiece"]); |
| | | |
| | | } |
| | | } |
| | | // var el = this.template.querySelector('c-lex-custom-lightning-datatable'); |
| | | // var selected = el.getSelectedRows(); |
| | | // this.selectedData = selected; |
| | | // console.log('选中数据' + JSON.stringify(this.selectedData)); |
| | | // console.log('this.overdueList' + this.overdueList); |
| | | save({ |
| | | iSinventory: this.iSinventory, |
| | | saveCodPageRecords: JSON.stringify(this.data), |
| | |
| | | } else { |
| | | this.showMyToast('销存失败', result.msg, 'error'); |
| | | this.showSpinner = false; |
| | | |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | |
| | | <template for:each = {invRecords} for:item = "inv" for:index="indexVar"> |
| | | <tr key={inv.key} class="slds-hint-parent"> |
| | | <td> |
| | | <div title="Prospecting"> |
| | | <div> |
| | | <lightning-input key={inv.key} data-id={inv.key} data-index={indexVar} name="productNumber" label="productNumber" value={inv.productNumber} variant="label-hidden" onchange={handleProductChange}></lightning-input> |
| | | </div> |
| | | </td> |
| | | <td> |
| | | <div title="Prospecting"> |
| | | <div> |
| | | <lightning-input key={inv.key} data-id={inv.key} data-index={indexVar} name="inventory1" label="inventory1" value={inv.inventory1} variant="label-hidden" onchange={handleProductChange}></lightning-input> |
| | | </div> |
| | | </td> |
| | | <td> |
| | | <div title="Prospecting"> |
| | | <div> |
| | | <lightning-input key={inv.key} data-id={inv.key} data-index={indexVar} name="inventory2" label="inventory2" value={inv.inventory2} variant="label-hidden" onchange={handleProductChange}></lightning-input> |
| | | </div> |
| | | </td> |
| | |
| | | <template> |
| | | <template if:true={showSpinner}> |
| | | <lightning-spinner size="medium" variant="brand"></lightning-spinner> |
| | | <!-- <lightning-spinner size="medium" variant="brand"></lightning-spinner> --> |
| | | <div class="slds-spinner_container"> |
| | | <div role="status" class="slds-spinner slds-spinner_medium slds-spinner_brand"> |
| | | <span class="slds-assistive-text">Loading</span> |
| | | <div class="slds-spinner__dot-a"></div> |
| | | <div class="slds-spinner__dot-b"></div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <c-common-toast></c-common-toast> |
| | | <div style="border: 1px solid #d4d4d4; border-radius: 5px"> |
| | | <div |
| | | style=" |
| | | border-top: 3px solid #51606e; |
| | | border-bottom: 1px solid #d4d4d4; |
| | | padding: 3px; |
| | | " |
| | | > |
| | | <div style="border: 1px solid #D4D4D4;border-radius:5px;"> |
| | | |
| | | <div style="border-top: 3px solid #51606E;;border-bottom: 1px solid #D4D4D4;padding:3px;"> |
| | | <div> |
| | | <!-- <p style="font-size: 18px;"><strong>拆盒</strong></p> --> |
| | | <lightning-layout> |
| | |
| | | </lightning-layout> |
| | | </div> |
| | | </div> |
| | | <div style="padding: 10px"> |
| | | <div |
| | | style=" |
| | | border: 1px solid #d4d4d4; |
| | | border-radius: 5px; |
| | | margin-bottom: 7px; |
| | | " |
| | | > |
| | | <div |
| | | style=" |
| | | border-top: 3px solid #51606e; |
| | | border-bottom: 1px solid #d4d4d4; |
| | | padding: 3px; |
| | | " |
| | | > |
| | | <div style="padding:10px;"> |
| | | <div style="border: 1px solid #D4D4D4;border-radius:5px;margin-bottom:7px;"> |
| | | <div style="border-top: 3px solid #51606E;border-bottom: 1px solid #D4D4D4;padding:3px;"> |
| | | <!-- <lightning-button variant="brand" class='lexstyle' style="margin-left:10px;" label="拆盒确认" title="拆盒确认" onclick={saveConfirm}></lightning-button>--> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder" |
| | | style="margin-left: 10px; margin-top: 12px; margin-bottom: 12px" |
| | | label="拆盒确认" |
| | | onclick={saveConfirm} |
| | | > |
| | | 拆盒确认 |
| | | </button> |
| | | <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" style="margin-left:10px;margin-top:12px;margin-bottom:12px;" label="拆盒确认" onclick={saveConfirm}>拆盒确认</button> |
| | | </div> |
| | | </div> |
| | | <div |
| | | style=" |
| | | border: 1px solid #d4d4d4; |
| | | border-radius: 5px; |
| | | margin-bottom: 7px; |
| | | margin-top: 5px; |
| | | " |
| | | > |
| | | <div |
| | | style=" |
| | | border-top: 3px solid #51606e; |
| | | border-bottom: 1px solid #d4d4d4; |
| | | padding: 3px; |
| | | " |
| | | > |
| | | <div style="border: 1px solid #D4D4D4;border-radius:5px;margin-bottom:7px;margin-top:5px;"> |
| | | <div style="border-top: 3px solid #51606E;border-bottom: 1px solid #D4D4D4;padding:3px;"> |
| | | <lightning-layout> |
| | | <lightning-layout-item padding="around-small"> |
| | | <p style="font-size: 16px"> |
| | |
| | | <tr> |
| | | <td></td> |
| | | <td align="right" class="searchName">BarCode</td> |
| | | <td style="width: 600px"> |
| | | <lightning-textarea |
| | | class="inputFont" |
| | | name="BarCode" |
| | | label="" |
| | | onchange={handleChange} |
| | | ></lightning-textarea> |
| | | </td> |
| | | <td style="width:600px"><lightning-textarea class="inputFont" name="BarCode" label="" |
| | | onchange={handleChange}></lightning-textarea></td> |
| | | <td align="right"></td> |
| | | <td></td> |
| | | <td style="width: 200px"> |
| | | <button |
| | | style="margin-top: 14px" |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder" |
| | | label="获取明细" |
| | | onclick={getDetails} |
| | | > |
| | | 获取明细 |
| | | </button> |
| | | <td style="width: 200px;"> |
| | | <button style="margin-top:14px;" class="slds-button slds-button_neutral slds-button_stretch lexBorder" label="获取明细" onclick={getDetails}>获取明细</button> |
| | | <!-- <lightning-button variant="brand" class='lexstyle' label="获取明细" title="获取明细" onclick={getDetails} |
| | | ></lightning-button> --> |
| | | </td> |
| | |
| | | <!-- </div> --> |
| | | </div> |
| | | |
| | | <div |
| | | style=" |
| | | border: 1px solid #d4d4d4; |
| | | border-radius: 5px; |
| | | margin-bottom: 7px; |
| | | margin-top: 10px; |
| | | " |
| | | > |
| | | <div |
| | | style=" |
| | | border-top: 3px solid #51606e; |
| | | border-bottom: 1px solid #d4d4d4; |
| | | padding: 3px; |
| | | " |
| | | > |
| | | <div style="border: 1px solid #D4D4D4;border-radius:5px;margin-bottom:7px;margin-top:10px"> |
| | | <div style="border-top: 3px solid #51606E;border-bottom: 1px solid #D4D4D4;padding:3px;"> |
| | | <lightning-layout> |
| | | <lightning-layout-item padding="around-small"> |
| | | <p style="font-size: 18px"> |
| | |
| | | </lightning-layout-item> |
| | | </lightning-layout> |
| | | </div> |
| | | <div style="padding: 10px"> |
| | | <!-- <div style="height: 300px;"> --> |
| | | <!-- <template if:true={showTable}> --> |
| | | <!-- <c-lex-custom-lightning-datatable key-field="prodid" data={data} columns={columns} |
| | | onrowselection={getSelectedRows} hide-checkbox-column="true" |
| | | selected-rows={selectedRows}> |
| | | </c-lex-custom-lightning-datatable> --> |
| | | <div style="padding:10px;"> |
| | | |
| | | <lightning-datatable |
| | | key-field="prodid" |
| | | data={data} |
| | | columns={columns} |
| | | onrowselection={getSelectedRows} |
| | | hide-checkbox-column="true" |
| | | selected-rows={selectedRows} |
| | | class="wrapped-header-datatable" |
| | | style="word-wrap: break-word; word-break: break-all" |
| | | > |
| | | key-field="prodid" data={data} columns={columns} |
| | | onrowselection={getSelectedRows} hide-checkbox-column="true" |
| | | selected-rows={selectedRows} class="wrapped-header-datatable" style="word-wrap:break-word; word-break:break-all; "> |
| | | </lightning-datatable> |
| | | <!-- </template> --> |
| | | <!-- </div> --> |
| | | </div> |
| | | </div> |
| | | <div |
| | | style=" |
| | | border: 1px solid #d4d4d4; |
| | | border-radius: 5px; |
| | | margin-bottom: 7px; |
| | | margin-top: 10px; |
| | | " |
| | | > |
| | | <div |
| | | style=" |
| | | border-top: 3px solid #51606e; |
| | | border-bottom: 1px solid #d4d4d4; |
| | | padding: 3px; |
| | | " |
| | | > |
| | | <div style="border: 1px solid #D4D4D4;border-radius:5px;margin-bottom:7px;margin-top:10px"> |
| | | <div style="border-top: 3px solid #51606E;border-bottom: 1px solid #D4D4D4;padding:3px;"> |
| | | <table> |
| | | <tr> |
| | | <td> |
| | |
| | | </table> |
| | | </div> |
| | | |
| | | <div style="padding: 10px"> |
| | | <div style="padding:10px;"> |
| | | <!-- <template if:true={showTables}> --> |
| | | |
| | | <!-- <c-lex-custom-lightning-datatable key-field="id" data={errorDetail} columns={column} |
| | |
| | | selected-rows={selectedRows}> |
| | | </c-lex-custom-lightning-datatable> --> |
| | | <lightning-datatable |
| | | key-field="id" |
| | | data={errorDetail} |
| | | columns={column} |
| | | onrowselection={getSelectedRows} |
| | | hide-checkbox-column="true" |
| | | selected-rows={selectedRows} |
| | | class="wrapped-header-datatable" |
| | | style="word-wrap: break-word; word-break: break-all" |
| | | > |
| | | key-field="id" data={errorDetail} columns={column} |
| | | onrowselection={getSelectedRows} hide-checkbox-column="true" |
| | | selected-rows={selectedRows} class="wrapped-header-datatable" style="word-wrap:break-word; word-break:break-all; "> |
| | | </lightning-datatable> |
| | | <!-- </template> --> |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | </div> |
| | | |
| | | </template> |
| | |
| | | import { LightningElement, wire, api, track } from "lwc"; |
| | | import init from "@salesforce/apex/LexRemoveBoxController.init"; |
| | | import searchDeatail from "@salesforce/apex/LexRemoveBoxController.searchConsumableorderdetails"; |
| | | import saveconfirm from "@salesforce/apex/LexRemoveBoxController.removeBoxConfirm"; |
| | | import { ShowToastEvent } from "lightning/platformShowToastEvent"; |
| | | import { LightningElement, wire, api, track } from 'lwc'; |
| | | import init from '@salesforce/apex/LexRemoveBoxController.init'; |
| | | import searchDeatail from '@salesforce/apex/LexRemoveBoxController.searchConsumableorderdetails'; |
| | | import saveconfirm from '@salesforce/apex/LexRemoveBoxController.removeBoxConfirm'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | // import { NavigationMixin } from 'lightning/navigation'; |
| | | //table css |
| | | import { loadStyle } from "lightning/platformResourceLoader"; |
| | |
| | | |
| | | const columns = [ |
| | | { |
| | | label: "消耗品名称", |
| | | fieldName: "Name__c", |
| | | label: '消耗品名称', |
| | | fieldName: 'Name__c', |
| | | wrapText: true, |
| | | hideDefaultActions: true |
| | | hideDefaultActions: true, |
| | | // initialWidth: 400, |
| | | |
| | | }, |
| | | { |
| | | label: "规格", |
| | | fieldName: "ProductPacking_list_manual__c", |
| | | label: '规格', |
| | | fieldName: 'ProductPacking_list_manual__c', |
| | | hideDefaultActions: true, |
| | | initialWidth: 50, |
| | | cellAttributes: { alignment: "right" } |
| | | cellAttributes: { alignment: "right" }, |
| | | |
| | | |
| | | }, |
| | | { |
| | | label: "CFDA状态", |
| | | fieldName: "CFDA_Status__c", |
| | | label: 'CFDA状态', |
| | | fieldName: 'CFDA_Status__c', |
| | | hideDefaultActions: true, |
| | | initialWidth: 100, |
| | | wrapText: true |
| | | wrapText:true, |
| | | |
| | | }, |
| | | { |
| | | label: "注册证编码号", |
| | | fieldName: "Report_Product_Approbation__c", |
| | | label: '注册证编码号', |
| | | fieldName: 'Report_Product_Approbation__c', |
| | | hideDefaultActions: true, |
| | | initialWidth: 200, |
| | | wrapText: true |
| | | wrapText:true, |
| | | }, |
| | | { |
| | | label: "注册证效期", |
| | | fieldName: "Report_Product_Expiration__c", |
| | | label: '注册证效期', |
| | | fieldName: 'Report_Product_Expiration__c', |
| | | hideDefaultActions: true, |
| | | initialWidth: 110, |
| | | wrapText: true |
| | | wrapText:true, |
| | | }, |
| | | { |
| | | label: "BarCode", |
| | | fieldName: "Bar_Code__c", |
| | | label: 'BarCode', |
| | | fieldName: 'Bar_Code__c', |
| | | hideDefaultActions: true, |
| | | wrapText: true |
| | | wrapText:true, |
| | | // initialWidth:600, |
| | | } |
| | | ]; |
| | | |
| | | const column = [ |
| | | { |
| | | label: "消耗品名称", |
| | | fieldName: "Name__c", |
| | | label: '消耗品名称', |
| | | fieldName: 'Name__c', |
| | | hideDefaultActions: true, |
| | | wrapText: true |
| | | wrapText:true, |
| | | |
| | | }, |
| | | { |
| | | label: "BarCode", |
| | | fieldName: "Bar_Code__c", |
| | | label: 'BarCode', |
| | | fieldName: 'Bar_Code__c', |
| | | hideDefaultActions: true, |
| | | wrapText: true |
| | | wrapText:true, |
| | | // initialWidth:600, |
| | | }, |
| | | |
| | | |
| | | } |
| | | , |
| | | { |
| | | label: "错误原因", |
| | | fieldName: "ErrorReason", |
| | | label: '错误原因', |
| | | fieldName: 'ErrorReason', |
| | | hideDefaultActions: true, |
| | | wrapText: true |
| | | wrapText:true, |
| | | } |
| | | ]; |
| | | |
| | | |
| | | |
| | | |
| | | export default class LexRemoveBox extends LightningElement { |
| | | columns = columns; |
| | |
| | | @track errorDetail = []; |
| | | |
| | | // 显示 |
| | | @track showTable = false; |
| | | @track accountName; |
| | | @track userWorkLocation; |
| | | @track agencyProType; |
| | | @track barcode = ""; |
| | | @track saveFLGbln = false; |
| | | @track showTable = false |
| | | @track accountName |
| | | @track userWorkLocation |
| | | @track agencyProType |
| | | @track barcode = '' |
| | | @track saveFLGbln = false |
| | | @track dataSize = 0; |
| | | |
| | | //加载框 |
| | | @track showSpinner = false; |
| | | @track showSpinner = false |
| | | |
| | | renderedCallback() { |
| | | if (!this.stylesLoaded) { |
| | |
| | | |
| | | //初始化 |
| | | connectedCallback() { |
| | | console.log("初始化"); |
| | | console.log('初始化'); |
| | | this.showTable = false; |
| | | |
| | | init() |
| | | .then((result) => { |
| | | init().then((result) => { |
| | | result = JSON.parse(JSON.stringify(result)); |
| | | console.log("result =" + JSON.stringify(result)); |
| | | if ((result.status = "Success")) { |
| | | console.log("result"); |
| | | console.log('result =' + JSON.stringify(result)); |
| | | if (result.status = 'Success') { |
| | | console.log('result'); |
| | | this.agencyProType = result.entity.agencyProType; |
| | | this.userWorkLocation = result.entity.userWorkLocation; |
| | | this.accountName = result.entity.accountName; |
| | | // this.data = JSON.parse(result.entity.codPageRecords); |
| | | // this.showTable = true; |
| | | } else { |
| | | this.showMyToast("初始化失败", result.msg, "error"); |
| | | this.showMyToast('初始化失败',result.msg,'error'); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error = " + JSON.stringify(error)); |
| | | }).catch((error) => { |
| | | console.log('error = ' + JSON.stringify(error)); |
| | | }); |
| | | } |
| | | //录入 |
| | |
| | | userWorkLocation: this.userWorkLocation, |
| | | agencyProType: this.agencyProType, |
| | | barcode: this.barcode |
| | | }) |
| | | .then((result) => { |
| | | }).then((result) => { |
| | | result = JSON.parse(JSON.stringify(result)); |
| | | console.log("result =" + JSON.stringify(result)); |
| | | if (result.status == "Success") { |
| | | console.log("成功"); |
| | | this.data = JSON.parse( |
| | | result.entity.ConsumableorderdetailsRecordsdummy |
| | | ); |
| | | this.errorDetail = JSON.parse( |
| | | result.entity.ConsumableorderdetailsRecordserror |
| | | ); |
| | | console.log('result =' + JSON.stringify(result)); |
| | | if (result.status == 'Success') { |
| | | console.log('成功'); |
| | | this.data = JSON.parse(result.entity.ConsumableorderdetailsRecordsdummy); |
| | | this.errorDetail = JSON.parse(result.entity.ConsumableorderdetailsRecordserror); |
| | | this.dataSize = result.entity.dataSize; |
| | | console.log("this.dataSize" + this.dataSize); |
| | | console.log('this.dataSize'+this.dataSize); |
| | | for (let i in this.data) { |
| | | this.data[i]["Name__c"] = this.data[i].Prod.Name__c; |
| | | this.data[i]["ProductPacking_list_manual__c"] = |
| | | this.data[i].esd.ProductPacking_list_manual__c; |
| | | this.data[i]["CFDA_Status__c"] = this.data[i].esd.CFDA_Status__c; |
| | | this.data[i]["Report_Product_Approbation__c"] = |
| | | this.data[i].esd.Report_Product_Approbation__c; |
| | | this.data[i]["Report_Product_Expiration__c"] = |
| | | this.data[i].esd.Report_Product_Expiration__c; |
| | | this.data[i]["Bar_Code__c"] = this.data[i].esd.Bar_Code__c; |
| | | this.data[i]['Name__c'] = this.data[i].Prod.Name__c; |
| | | this.data[i]['ProductPacking_list_manual__c'] = this.data[i].esd.ProductPacking_list_manual__c; |
| | | this.data[i]['CFDA_Status__c'] = this.data[i].esd.CFDA_Status__c; |
| | | this.data[i]['Report_Product_Approbation__c'] = this.data[i].esd.Report_Product_Approbation__c; |
| | | this.data[i]['Report_Product_Expiration__c'] = this.data[i].esd.Report_Product_Expiration__c; |
| | | this.data[i]['Bar_Code__c'] = this.data[i].esd.Bar_Code__c; |
| | | } |
| | | for (let i in this.errorDetail) { |
| | | this.errorDetail[i]["Name__c"] = this.errorDetail[i].Prod.Name__c; |
| | | this.errorDetail[i]["Bar_Code__c"] = |
| | | this.errorDetail[i].esd.Bar_Code__c; |
| | | this.errorDetail[i]["ErrorReason"] = |
| | | this.errorDetail[i].ErrorReason; |
| | | this.errorDetail[i]['Name__c'] = this.errorDetail[i].Prod.Name__c; |
| | | this.errorDetail[i]['Bar_Code__c'] = this.errorDetail[i].esd.Bar_Code__c; |
| | | this.errorDetail[i]['ErrorReason'] = this.errorDetail[i].ErrorReason; |
| | | } |
| | | this.showTables = true; |
| | | this.showTable = true; |
| | | } else { |
| | | console.log("result.msg = " + result.msg); |
| | | this.showMyToast("获取失败", result.msg, "error"); |
| | | console.log('result.msg = ' + result.msg); |
| | | this.showMyToast('获取失败',result.msg,'error'); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error = " + JSON.stringify(error)); |
| | | }).catch((error) => { |
| | | console.log('error = ' + JSON.stringify(error)); |
| | | }); |
| | | |
| | | } |
| | | //获取当前输入值 |
| | | handleChange(event) { |
| | | let value = event.detail.value; |
| | | console.log("value" + value); |
| | | console.log('value' + value); |
| | | this.barcode = value; |
| | | console.log("this.barcode" + this.barcode); |
| | | console.log('this.barcode' + this.barcode); |
| | | } |
| | | saveConfirm() { |
| | | console.log("进入确认"); |
| | | console.log('进入确认'); |
| | | let msg = "确认拆盒吗"; |
| | | if (this.dataSize > 0) { |
| | | if (confirm(msg) == true) { |
| | |
| | | } else { |
| | | this.removeBox(); |
| | | } |
| | | |
| | | } |
| | | removeBox() { |
| | | this.showSpinner = true; |
| | |
| | | accountName: this.accountName, |
| | | userWorkLocation: this.userWorkLocation, |
| | | agencyProType: this.agencyProType |
| | | }) |
| | | .then((result) => { |
| | | }).then((result) => { |
| | | result = JSON.parse(JSON.stringify(result)); |
| | | console.log("result保存 = " + JSON.stringify(result)); |
| | | if (result.status == "Success") { |
| | | console.log('result保存 = ' + JSON.stringify(result)); |
| | | if (result.status == 'Success') { |
| | | this.saveFLGbln = result.entity.saveFLGbln; |
| | | // this.showSpinner = false; |
| | | if (this.saveFLGbln) { |
| | | this.showMyToast(result.msg, "", "success"); |
| | | this.showMyToast(result.msg,'','success'); |
| | | this.showSpinner = false; |
| | | } |
| | | } else { |
| | | console.log("result.msg = " + result.msg); |
| | | this.showMyToast("拆盒失败", result.msg, "error"); |
| | | console.log('result.msg = ' + result.msg); |
| | | this.showMyToast('拆盒失败',result.msg,'error'); |
| | | this.showSpinner = false; |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error = " + JSON.stringify(error)); |
| | | console.log('error = ' + JSON.stringify(error)); |
| | | }); |
| | | |
| | | |
| | | } |
| | | showMyToast(title, message, variant) { |
| | | console.log("show custom message"); |
| | | var iconName = ""; |
| | | var content = ""; |
| | | if (variant == "success") { |
| | | iconName = "utility:check"; |
| | | console.log('show custom message'); |
| | | var iconName = ''; |
| | | var content = ''; |
| | | if(variant == 'success'){ |
| | | iconName = 'utility:check'; |
| | | } else { |
| | | iconName = "utility:error"; |
| | | iconName = 'utility:error'; |
| | | } |
| | | if (message != "") { |
| | | content = |
| | | "<h2><strong>" + title + "<strong/></h2><h5>" + message + "</h5>"; |
| | | if(message != ''){ |
| | | content = '<h2><strong>'+title+'<strong/></h2><h5>'+message+'</h5>'; |
| | | } else { |
| | | content = "<h2><strong>" + title + "<strong/></h2>"; |
| | | 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); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | <div class="borderCss"> |
| | | <template if:true={isShowSpinner}> |
| | | <lightning-spinner alternative-text="Loading" size="large"></lightning-spinner> |
| | | <div class="slds-spinner_container"> |
| | | <div role="status" class="slds-spinner slds-spinner_medium slds-spinner_brand"> |
| | | <span class="slds-assistive-text">Loading</span> |
| | | <div class="slds-spinner__dot-a"></div> |
| | | <div class="slds-spinner__dot-b"></div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <div class="headerDorderCss"> |
| | | <lightning-layout> |
| | |
| | | <template> |
| | | <c-common-toast></c-common-toast> |
| | | <template if:true={isShowSpinner}> |
| | | <lightning-spinner size="medium" variant="brand"></lightning-spinner> |
| | | <div class="slds-spinner_container"> |
| | | <div role="status" class="slds-spinner slds-spinner_medium slds-spinner_brand"> |
| | | <span class="slds-assistive-text">Loading</span> |
| | | <div class="slds-spinner__dot-a"></div> |
| | | <div class="slds-spinner__dot-b"></div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <!-- 搜索客户名 --> |
| | | <template if:true={isModalOpen}> |
| | |
| | | <template> |
| | | <template if:true={showSpinner}> |
| | | <lightning-spinner size="medium" variant="brand"></lightning-spinner> |
| | | <!-- <lightning-spinner size="medium" variant="brand"></lightning-spinner> --> |
| | | <div class="slds-spinner_container"> |
| | | <div role="status" class="slds-spinner slds-spinner_medium slds-spinner_brand"> |
| | | <span class="slds-assistive-text">Loading</span> |
| | | <div class="slds-spinner__dot-a"></div> |
| | | <div class="slds-spinner__dot-b"></div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <c-common-toast></c-common-toast> |
| | | <template if:true={showPage}> |
| | |
| | | this.hasHos = result.hasHos; |
| | | this.product_Limit = result.product_Limit; |
| | | console.log('result==>' + JSON.stringify(result)); |
| | | |
| | | for (var i in this.pageRecords) { |
| | | this.pageRecords[i]["Name__c"] = this.pageRecords[i].Prod.Name__c; |
| | | this.pageRecords[i]["Category3__c"] = this.pageRecords[i].Prod.Category3__c; |
| | |
| | | @import "c/lexCssUtility"; |
| | | @import 'c/lexCssUtility'; |
| | | .lexButtoun { |
| | | font-size: 18px; |
| | | font-family: "sans-serif"; |
| | | font-family: 'sans-serif'; |
| | | font-weight: 500; |
| | | color: #0a81df; |
| | | color:#0A81DF; |
| | | /* border:2px solid rgb(8,16,132); */ |
| | | /* border-color:rgb(8,16,132); */ |
| | | width: 160px; |
| | | height: 36px; |
| | | border-radius: 4px; |
| | | opacity: 1; |
| | | background: #ffffff; |
| | | background: #FFFFFF; |
| | | box-sizing: border-box; |
| | | border: 1px solid #0a81df; |
| | | border:1px solid #0A81DF; |
| | | } |
| | |
| | | <template> |
| | | <template if:true={showSpinner}> |
| | | <lightning-spinner size="medium" variant="brand"></lightning-spinner> |
| | | <!-- <lightning-spinner size="medium" variant="brand"></lightning-spinner> --> |
| | | <div class="slds-spinner_container"> |
| | | <div role="status" class="slds-spinner slds-spinner_medium slds-spinner_brand"> |
| | | <span class="slds-assistive-text">Loading</span> |
| | | <div class="slds-spinner__dot-a"></div> |
| | | <div class="slds-spinner__dot-b"></div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <c-common-toast></c-common-toast> |
| | | <div style="border: 1px solid #D4D4D4;border-radius:5px;"> |
| | |
| | | <lightning-button variant="brand" class = 'lexstyle' style="margin: 12px;" label="拆盒" title="拆盒" onclick={removeBox}></lightning-button> |
| | | <lightning-button variant="brand" class = 'lexstyle' style="margin: 12px;" label="取消拆盒" title="取消拆盒" |
| | | onclick={cancelremoveBox}></lightning-button> --> |
| | | <button style ="margin-left:5px" class="slds-button slds-button_neutral slds-button_stretch lexBorder" label="库存盘点" onclick={inventoryCount}>库存盘点</button> |
| | | <button class="slds-button slds-button_neutral slds-button_stretch lexButtoun" label="过期库存销存" style = "margin-left:60px;" onclick={handleExpired}>过期库存销存</button> |
| | | <button class="slds-button slds-button_neutral slds-button_stretch lexButtoun" label="拆盒" style = "margin-left:60px;" onclick={removeBox}>拆盒</button> |
| | | <button class="slds-button slds-button_neutral slds-button_stretch lexButtoun" label="取消拆盒" style = "margin-left:60px;" onclick={cancelremoveBox}>取消拆盒</button> |
| | | <button style="margin-left:5px" |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder" label="库存盘点" |
| | | onclick={inventoryCount}>库存盘点</button> |
| | | <button class="slds-button slds-button_neutral slds-button_stretch lexButtoun" label="过期库存销存" |
| | | style="margin-left:60px;" onclick={handleExpired}>过期库存销存</button> |
| | | <button class="slds-button slds-button_neutral slds-button_stretch lexButtoun" label="拆盒" |
| | | style="margin-left:60px;" onclick={removeBox}>拆盒</button> |
| | | <button class="slds-button slds-button_neutral slds-button_stretch lexButtoun" label="取消拆盒" |
| | | style="margin-left:60px;" onclick={cancelremoveBox}>取消拆盒</button> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <div style="width:90px;margin-left:12px;" class="searchName">消耗品名称</div> |
| | | </td> |
| | | <td style="width: 21%;"> |
| | | <lightning-input class="searchName" type="text" name="Name" label="消耗品名称" value={Name} |
| | | variant="label-hidden" onchange={dataChange} |
| | | <lightning-input class="searchName" type="text" name="Name" label="消耗品名称" |
| | | value={Name} variant="label-hidden" onchange={dataChange} |
| | | data-field="Name"></lightning-input> |
| | | </td> |
| | | <td style="width:150px"> |
| | | <div style="width:90px;text-align:center;" class="searchName">第3分类</div> |
| | | </td> |
| | | <td style="width: 21%;"> |
| | | <lightning-combobox class="inputFont" style="margin-left:5px;" name="CategoryThree" label="第3分类" value={value} |
| | | placeholder="请选择..." options={category3Options} variant="label-hidden" |
| | | data-field="CategoryThree" onchange={dataChange}></lightning-combobox> |
| | | <lightning-combobox class="inputFont" style="margin-left:5px;" name="CategoryThree" |
| | | label="第3分类" value={value} placeholder="请选择..." options={category3Options} |
| | | variant="label-hidden" data-field="CategoryThree" |
| | | onchange={dataChange}></lightning-combobox> |
| | | </td> |
| | | <td style="width:150px"> |
| | | <div style="width:90px;text-align:center;" class="searchName">第4分类</div> |
| | |
| | | </tbody> |
| | | </table> |
| | | <br/> |
| | | <div style="float:right;margin-right:10px;"> <button class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle" label="消耗品搜索" onclick={searchOrderDetail}>消耗品搜索</button> |
| | | <button style="margin-left:10px;" class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" label="清空" onclick={clearAll}>清空</button></div> |
| | | <div style="float:right;margin-right:10px;"> <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle" label="消耗品搜索" |
| | | onclick={searchOrderDetail}>消耗品搜索</button> |
| | | <button style="margin-left:10px;" |
| | | class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" label="清空" |
| | | onclick={clearAll}>清空</button> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |