| | |
| | | public with sharing class LexConInvoicedetailsController { |
| | | //出库单使用 |
| | | public static Consumable_order__c coc { get; set; } |
| | | public static Consumable_order__c coc { get; set; } |
| | | |
| | | //发票使用 |
| | | public static Consumable_order__c invoicecode { get; set; } |
| | | //发票使用 |
| | | public static Consumable_order__c invoicecode { get; set; } |
| | | |
| | | //价格计算结果 |
| | | public static Decimal sumPrice {get;set;} |
| | | //价格计算结果 |
| | | public static Decimal sumPrice { get; set; } |
| | | |
| | | //出库单ID |
| | | private static String orderId {get;set;} |
| | | //发票单ID |
| | | private static String invoiceId {get;set;} |
| | | //出库单ID |
| | | private static String orderId { get; set; } |
| | | //发票单ID |
| | | private static String invoiceId { get; set; } |
| | | //出库单明细1,画面显示使用 |
| | | public static List<ConsumableorderdetailsInfo> consumableorderdetails1Records { get; set; } |
| | | //明细数量 |
| | | public static List<ConsumableorderdetailsInfo> consumableorderdetails1Records { get; set; } |
| | | //明细数量 |
| | | public static Integer invoiceOrderRecoedsCount { |
| | | get { |
| | | return consumableorderdetails1Records == null ? 0 : consumableorderdetails1Records.size(); |
| | |
| | | |
| | | //页面初始化 |
| | | @AuraEnabled |
| | | public static ResponseBodyLWC init(String orderIdLwc,String invoiceIdLwc) { |
| | | public static ResponseBodyLWC init(String orderIdLwc, String invoiceIdLwc) { |
| | | ResponseBodyLWC res = new ResponseBodyLWC(); |
| | | Map<String, object> data = new Map<String, object>(); |
| | | res.entity = data; |
| | |
| | | FROM Consumable_Orderdetails__c |
| | | WHERE Consumable_order__c = :orderId |
| | | ]; |
| | | System.debug('consumableorderdetails1===>' + consumableorderdetails1); |
| | | for (Integer i = 0; i < consumableorderdetails1.size(); i++) { |
| | | consumableorderdetails1Records.add(new ConsumableorderdetailsInfo(consumableorderdetails1[i])); |
| | | } |
| | |
| | | ass.esd.Invoice_Unitprice__c = ass.esd.Delivery_List_RMB__c; |
| | | } |
| | | } |
| | | data.put('invoicecode',invoicecode); |
| | | data.put('coc',coc); |
| | | data.put('consumableorderdetails1Records',consumableorderdetails1Records); |
| | | data.put('invoicecode', invoicecode); |
| | | data.put('coc', coc); |
| | | data.put('consumableorderdetails1Records', consumableorderdetails1Records); |
| | | res.status = 'Success'; |
| | | res.code = 200; |
| | | System.debug('res = ' + res); |
| | |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static ResponseBodyLWC save(String consumableorderdetails1RecordsLwc,String invoiceIdLwc,String orderIdLwc) { |
| | | public static ResponseBodyLWC save(String consumableorderdetails1RecordsLwc, String invoiceIdLwc, String orderIdLwc) { |
| | | ResponseBodyLWC res = new ResponseBodyLWC(); |
| | | Map<String, object> data = new Map<String, object>(); |
| | | res.entity = data; |
| | | |
| | | consumableorderdetails1Records= (List<ConsumableorderdetailsInfo>)JSON.deserialize(consumableorderdetails1RecordsLwc, List<ConsumableorderdetailsInfo>.class); |
| | | consumableorderdetails1Records = (List<ConsumableorderdetailsInfo>) JSON.deserialize( |
| | | consumableorderdetails1RecordsLwc, |
| | | List<ConsumableorderdetailsInfo>.class |
| | | ); |
| | | invoiceId = invoiceIdLwc; |
| | | orderId = orderIdLwc; |
| | | System.debug('consumableorderdetails1Records = ' + consumableorderdetails1Records); |
| | |
| | | } |
| | | |
| | | // Data Bean |
| | | @TestVisible |
| | | class ConsumableorderdetailsInfo { |
| | | @AuraEnabled |
| | | public Boolean check { get; set; } |
| | |
| | | public Decimal Packing_list_manual { get; set; } |
| | | public List<SelectOption> Invoice_UnitOpts { get; set; } |
| | | @AuraEnabled |
| | | public Map<String,String> Invoice_UnitOptsMap { get; set; } |
| | | public Map<String, String> Invoice_UnitOptsMap { get; set; } |
| | | // 消耗品产品明细 |
| | | public ConsumableorderdetailsInfo(Consumable_Orderdetails__c e) { |
| | | check = false; |
| | |
| | | invoiceAllprice = 0; |
| | | |
| | | Packing_list_manual = e.Consumable_Product__r.Packing_list_manual__c; |
| | | if (!Test.isRunningTest()) { |
| | | Invoice_UnitOpts = new List<SelectOption>(); |
| | | Invoice_UnitOpts.add(new SelectOption('盒', '盒')); |
| | | Invoice_UnitOpts.add(new SelectOption('个', '个')); |
| | | } |
| | | |
| | | Invoice_UnitOpts = new List<SelectOption>(); |
| | | Invoice_UnitOpts.add(new SelectOption('盒', '盒')); |
| | | Invoice_UnitOpts.add(new SelectOption('个', '个')); |
| | | |
| | | Invoice_UnitOptsMap = new Map<String,String>(); |
| | | Invoice_UnitOptsMap = new Map<String, String>(); |
| | | Invoice_UnitOptsMap.put('盒', '盒'); |
| | | Invoice_UnitOptsMap.put('个', '个'); |
| | | } |
| | | } |
| | | } |
| | | } |