| | |
| | | |
| | | //disable |
| | | |
| | | debugger |
| | | if (Object.values(r.entity.coc).length > 0) { |
| | | this.cocLwc = r.entity.coc; |
| | | console.log("this.cocLwc = " + JSON.stringify(this.cocLwc)); |
| | |
| | | this.cocId = coc.Id; |
| | | console.log('cocId = ' + this.cocId); |
| | | coc.SummonsStatus = coc.SummonsStatus_c__c; |
| | | console.log('this.cocLwc.Arrive_Order__c = ' + this.cocLwc.Arrive_Order__c) |
| | | if(this.cocLwc.Arrive_Order__c == null){ |
| | | this.isBarcode = true; |
| | | }else{ |
| | | this.isBarcode = false; |
| | | } |
| | | if (coc.SummonsStatus_c__c == "已完成") { |
| | | this.isEditDisabled = true; |
| | | } |
| | |
| | | this.salesOrderdetails = r.entity.orderdetails; |
| | | console.log('this.salesOrderdetails = ' + JSON.stringify(this.salesOrderdetails)) |
| | | this.salesData = r.entity.consumableorderdetailsRecords; |
| | | console.log('this.salesData = ' + JSON.stringify(this.salesData)) |
| | | this.salesErrorData = r.entity.consumableorderdetailsRecordserror; |
| | | this.salesOrderpieceorboxMap = r.entity.orderpieceorboxMap; |
| | | this.salesOrderpriceMap = r.entity.orderpriceMap; |
| | | this.salesOrderagencypriceMap = r.entity.orderagencypriceMap; |
| | | for (var i in this.salesData) { |
| | | this.salesData[i]["Id"] = this.salesData[i].orderdetails2.Id; |
| | | this.salesData[i]["Consumable_order_minor__c"] = this.salesData[i].orderdetails2.Consumable_order_minor__r != null ? this.salesData[i].orderdetails2.Consumable_order_minor__r.Name : ''; |
| | | this.salesData[i]["ConsumableorderminorUrl"] = this.salesData[i].orderdetails2.Consumable_order_minor__c != null ? "/" + this.salesData[i].orderdetails2.Consumable_order_minor__c : ''; |
| | | this.salesData[i]["orderdetails2Name"] = this.salesData[i].orderdetails2.Name; |
| | | this.salesData[i]["orderdetails2NameUrl"] = "/" + this.salesData[i].orderdetails2.Id; |
| | | this.salesData[i]["Box_Piece__c"] = this.salesData[i].orderdetails2.Box_Piece__c; |
| | | this.salesData[i]["ProdName"] = this.salesData[i].Prod.Name; |
| | | this.salesData[i]["Deliver_date__c"] = this.salesData[i].orderdetails2.Deliver_date__c; |
| | | this.salesData[i]["Bar_Code__c"] = this.salesData[i].orderdetails2.Bar_Code__c; |
| | | this.salesData[i]["Sterilization_limit__c"] = this.salesData[i].orderdetails2.Sterilization_limit__c; |
| | | if (this.salesData[i]["Box_Piece__c"] == '盒') { |
| | | console.log('this.salesData[i] = ' + JSON.stringify(this.salesData[i])) |
| | | this.salesData[i]["outboundCount"] = this.salesData[i].outboundCount; |
| | | } else { |
| | | for (var j in this.salesOrderdetails) { |
| | | console.log('this.salesOrderdetails[j].Consumable_product__c = ' + this.salesOrderdetails[j].Consumable_product__c); |
| | | console.log('this.salesData[i].orderdetails2.Consumable_product__c = ' + this.salesData[i].orderdetails2.Consumable_product__c); |
| | | if (this.salesOrderdetails[j].Consumable_product__c == this.salesData[i].orderdetails2.Consumable_product__c) { |
| | | this.salesData[i]["outboundCount"] = this.salesOrderdetails[j].Shipment_Count__c; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | for (var i in this.salesErrorData) { |
| | | this.salesErrorData[i]["Id"] = this.salesErrorData[i].orderdetails2.Id; |
| | | this.salesErrorData[i]["Consumable_order_minor__c"] = this.salesErrorData[i].orderdetails2.Consumable_order_minor__r != null ? this.salesErrorData[i].orderdetails2.Consumable_order_minor__r.Name : ''; |
| | | this.salesErrorData[i]["ConsumableorderminorUrl"] = this.salesErrorData[i].orderdetails2.Consumable_order_minor__c != null ? "/" + this.salesErrorData[i].orderdetails2.Consumable_order_minor__c : ''; |
| | | this.salesErrorData[i]["orderdetails2Name"] = this.salesErrorData[i].orderdetails2.Name; |
| | | this.salesErrorData[i]["ProdName"] = this.salesErrorData[i].Prod.Name; |
| | | this.salesErrorData[i]["Box_Piece__c"] = this.salesErrorData[i].orderdetails2.Box_Piece__c; |
| | | this.salesErrorData[i]["Bar_Code__c"] = this.salesErrorData[i].orderdetails2.Bar_Code__c; |
| | | this.salesErrorData[i]["Sterilization_limit__c"] = this.salesErrorData[i].orderdetails2.Sterilization_limit__c; |
| | | } |
| | | this.isShowSpinner = false; |
| | | } else { |
| | | console.log("r.msg = " + r.msg); |