| | |
| | | }, |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | initialWidth: 180 |
| | | initialWidth: 95 |
| | | }); |
| | | // cols.push({label:'出库单' , fieldName:'orderNo', hideDefaultActions: true}); |
| | | cols.push({ |
| | |
| | | fieldName: "prodName", |
| | | wrapText: true, |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | initialWidth: 190 |
| | | wrapText: true |
| | | // initialWidth: 190 |
| | | }); |
| | | cols.push({ |
| | | label: "出库目的", |
| | | fieldName: "summonsForDirctionDet", |
| | | wrapText: true, |
| | | hideDefaultActions: true, |
| | | initialWidth: 130 |
| | | initialWidth: 85 |
| | | }); |
| | | cols.push({ |
| | | label: "客户名", |
| | | fieldName: "hospitalName", |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | initialWidth: 130 |
| | | initialWidth: 85 |
| | | }); |
| | | cols.push({ |
| | | label: "经销商", |
| | |
| | | <template if:true={showSpinner}> |
| | | <!-- <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"> |
| | | <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> |
| | |
| | | </template> |
| | | <c-common-toast></c-common-toast> |
| | | <template if:true={showPage}> |
| | | <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;"> |
| | | <div style="padding:10px;"> |
| | | <div |
| | | style=" |
| | | border: 1px solid #d4d4d4; |
| | | border-top: 3px solid #51606e; |
| | | border-radius: 5px; |
| | | " |
| | | > |
| | | <div style="padding: 10px"> |
| | | <!-- 按钮 --> |
| | | <!-- <lightning-button style="margin: 5px;" label="入库" onclick={orderArrive}></lightning-button> |
| | | <lightning-button style="margin: 5px;" label="返品" onclick={orderReturn}></lightning-button> --> |
| | | <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" style="margin: 5px;margin-right: 150px;" label="入库" onclick={orderArrive}>入库</button> |
| | | <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" style="margin: 5px;" label="返品" onclick={orderReturn}>返品</button> |
| | | <p style="height: 10px;"></p> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder" |
| | | style="margin: 5px; margin-right: 150px" |
| | | label="入库" |
| | | onclick={orderArrive} |
| | | > |
| | | 入库 |
| | | </button> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder" |
| | | style="margin: 5px" |
| | | label="返品" |
| | | onclick={orderReturn} |
| | | > |
| | | 返品 |
| | | </button> |
| | | <p style="height: 10px"></p> |
| | | <!-- 检索条件 --> |
| | | <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;"> |
| | | <div style="border-bottom: 1px solid #D4D4D4;padding:3px;"> |
| | | <div |
| | | style=" |
| | | border: 1px solid #d4d4d4; |
| | | border-top: 3px solid #51606e; |
| | | border-radius: 5px; |
| | | margin-bottom: 7px; |
| | | " |
| | | > |
| | | <div style="border-bottom: 1px solid #d4d4d4; padding: 3px"> |
| | | <lightning-layout> |
| | | <lightning-layout-item padding="around-small"> |
| | | <p style="font-size: 18px"> |
| | |
| | | </lightning-layout> |
| | | <!-- <p style="font-size: 16px;"><strong>检索条件</strong></p> --> |
| | | </div> |
| | | <div style="padding:10px;"> |
| | | <div style="padding: 10px"> |
| | | <table> |
| | | <tbody> |
| | | <tr> |
| | | <td style="width: 10px;"></td> |
| | | <td style="width: 120px;"> |
| | | <div style="color:#696969;font-size:16px;text-align: left;">消耗品订单名称</div> |
| | | <td style="width: 10px"></td> |
| | | <td style="width: 120px"> |
| | | <div |
| | | style="color: #696969; font-size: 16px; text-align: left" |
| | | > |
| | | 消耗品订单名称 |
| | | </div> |
| | | </td> |
| | | <td> |
| | | <lightning-input class="inputFont" type="text" variant="label-hidden" label="消耗品订单名称" value={category1} onchange={category1Change}></lightning-input> |
| | | <lightning-input |
| | | class="inputFont" |
| | | type="text" |
| | | variant="label-hidden" |
| | | label="消耗品订单名称" |
| | | value={category1} |
| | | onchange={category1Change} |
| | | ></lightning-input> |
| | | </td> |
| | | <td style="width: 30px;"></td> |
| | | <td style="width: 108px;"> |
| | | <div style="color:#696969;font-size:16px;text-align: left;">最新发货日期</div> |
| | | <td style="width: 30px"></td> |
| | | <td style="width: 108px"> |
| | | <div |
| | | style="color: #696969; font-size: 16px; text-align: left" |
| | | > |
| | | 最新发货日期 |
| | | </div> |
| | | </td> |
| | | <td> |
| | | <lightning-input class="inputFont" type="date" variant="label-hidden" label="最新发货日期" value={cate2} onchange={cate2Change}></lightning-input> |
| | | <lightning-input |
| | | class="inputFont" |
| | | type="date" |
| | | variant="label-hidden" |
| | | label="最新发货日期" |
| | | value={cate2} |
| | | onchange={cate2Change} |
| | | ></lightning-input> |
| | | </td> |
| | | <td style="width: 30px;"></td> |
| | | <td style="width: 30px"></td> |
| | | <td> |
| | | <!-- <lightning-button style="margin-left: 10px;margin-right: 5px;" label="搜索" onclick={search}></lightning-button> |
| | | <lightning-button style="margin-left: 5px;margin-right: 5px;" label="清空" onclick={clear}></lightning-button> --> |
| | | <button class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle" style="height:32px;margin-right: 30px;" label="搜索" onclick={search}>搜索</button> |
| | | <button class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" style="height:32px;" label="清空" onclick={clear}>清空</button> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle" |
| | | style="height: 32px; margin-right: 30px" |
| | | label="搜索" |
| | | onclick={search} |
| | | > |
| | | 搜索 |
| | | </button> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" |
| | | style="height: 32px" |
| | | label="清空" |
| | | onclick={clear} |
| | | > |
| | | 清空 |
| | | </button> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | |
| | | </div> |
| | | </div> |
| | | <!-- 订单明细 --> |
| | | <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;"> |
| | | <div style="border-bottom: 1px solid #D4D4D4;padding:3px;"> |
| | | <div |
| | | style=" |
| | | border: 1px solid #d4d4d4; |
| | | border-top: 3px solid #51606e; |
| | | border-radius: 5px; |
| | | margin-bottom: 7px; |
| | | " |
| | | > |
| | | <div style="border-bottom: 1px solid #d4d4d4; padding: 3px"> |
| | | <lightning-layout> |
| | | <lightning-layout-item padding="around-small"> |
| | | <p style="font-size: 18px"> |
| | |
| | | </lightning-layout> |
| | | <!-- <p style="font-size: 16px;"><strong>订单明细</strong></p> --> |
| | | </div> |
| | | <div style="padding:10px;"> |
| | | <div style="padding: 10px"> |
| | | <!-- <lightning-datatable hide-checkbox-column key-field="id" columns={colms} data={raesList}></lightning-datatable> --> |
| | | <c-lex-custom-lightning-datatable class="wrapped-header-datatable" hide-checkbox-column key-field="Id" data={raesList} columns={colms} onclicklink={clickLick}></c-lex-custom-lightning-datatable> |
| | | <c-lex-custom-lightning-datatable |
| | | class="wrapped-header-datatable" |
| | | hide-checkbox-column |
| | | key-field="Id" |
| | | data={raesList} |
| | | columns={colms} |
| | | onclicklink={clickLick} |
| | | ></c-lex-custom-lightning-datatable> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </template> |
| | | <!-- 订单各种数量信息弹窗 --> |
| | | <template if:true={showPop}> |
| | | <section role="dialog" tabindex="-1" aria-labelledby="modal-heading-01" aria-modal="true" aria-describedby="modal-content-id-1" class="slds-modal slds-fade-in-open slds-modal_small" style="border: 1px solid #D4D4D4;"> |
| | | <section |
| | | role="dialog" |
| | | tabindex="-1" |
| | | aria-labelledby="modal-heading-01" |
| | | aria-modal="true" |
| | | aria-describedby="modal-content-id-1" |
| | | class="slds-modal slds-fade-in-open slds-modal_small" |
| | | style="border: 1px solid #d4d4d4" |
| | | > |
| | | <div class="slds-modal__container"> |
| | | <header class="slds-modal__header" style="background-color: #F3F3F3;"> |
| | | <button style="" class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" title="Close" onclick={closePop}> |
| | | <lightning-icon icon-name="utility:close" |
| | | <header class="slds-modal__header" style="background-color: #f3f3f3"> |
| | | <button |
| | | style="" |
| | | class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" |
| | | title="Close" |
| | | onclick={closePop} |
| | | > |
| | | <lightning-icon |
| | | icon-name="utility:close" |
| | | alternative-text="close" |
| | | variant="inverse" |
| | | size="small" ></lightning-icon> |
| | | size="small" |
| | | ></lightning-icon> |
| | | <span class="slds-assistive-text">Close</span> |
| | | </button> |
| | | <h2 id="modal-heading-01" class="slds-text-heading_medium slds-hyphenate">{popTitle}</h2> |
| | | <h2 |
| | | id="modal-heading-01" |
| | | class="slds-text-heading_medium slds-hyphenate" |
| | | > |
| | | {popTitle} |
| | | </h2> |
| | | </header> |
| | | <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-1" style="border: 1px solid #F3F3F3;"> |
| | | <lightning-datatable class="wrapped-header-datatable" hide-checkbox-column key-field="prodModel" columns={colms2} data={recordList}></lightning-datatable> |
| | | <div |
| | | class="slds-modal__content slds-p-around_medium" |
| | | id="modal-content-id-1" |
| | | style="border: 1px solid #f3f3f3" |
| | | > |
| | | <lightning-datatable |
| | | class="wrapped-header-datatable" |
| | | hide-checkbox-column |
| | | key-field="prodModel" |
| | | columns={colms2} |
| | | data={recordList} |
| | | ></lightning-datatable> |
| | | </div> |
| | | <footer class="slds-modal__footer"> |
| | | <!-- <lightning-button style="margin-left: 10px;" variant="neutral" label="关闭" onclick={closePop}></lightning-button> --> |
| | | <button class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" style="margin-left: 10px;" variant="neutral" label="关闭" onclick={closePop}>关闭</button> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" |
| | | style="margin-left: 10px" |
| | | variant="neutral" |
| | | label="关闭" |
| | | onclick={closePop} |
| | | > |
| | | 关闭 |
| | | </button> |
| | | </footer> |
| | | </div> |
| | | </section> |
| | |
| | | import { LightningElement,wire,api,track } from 'lwc'; |
| | | import { CurrentPageReference } from 'lightning/navigation'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import { NavigationMixin } from 'lightning/navigation'; |
| | | import init from '@salesforce/apex/LexArriveGoodsMainController.init'; |
| | | import searchConsumableorderdetails from '@salesforce/apex/LexArriveGoodsMainController.searchConsumableorderdetails'; |
| | | import initTotalNum from '@salesforce/apex/LexConsumableGoodsInfo.initTotalNum'; |
| | | import initArrDet from '@salesforce/apex/LexConsumableGoodsInfo.initArrDet'; |
| | | import initArrDetAll from '@salesforce/apex/LexConsumableGoodsInfo.initArrDetAll'; |
| | | import initDeliveryDet from '@salesforce/apex/LexConsumableGoodsInfo.initDeliveryDet'; |
| | | import initDeliveryDetAll from '@salesforce/apex/LexConsumableGoodsInfo.initDeliveryDetAll'; |
| | | import initNotArrDet from '@salesforce/apex/LexConsumableGoodsInfo.initNotArrDet'; |
| | | import initNotArrDetAll from '@salesforce/apex/LexConsumableGoodsInfo.initNotArrDetAll'; |
| | | import initMoreThan7 from '@salesforce/apex/LexConsumableGoodsInfo.initMoreThan7'; |
| | | import initMoreThan7All from '@salesforce/apex/LexConsumableGoodsInfo.initMoreThan7All'; |
| | | import { LightningElement, wire, api, track } from "lwc"; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | | import { ShowToastEvent } from "lightning/platformShowToastEvent"; |
| | | import { NavigationMixin } from "lightning/navigation"; |
| | | import init from "@salesforce/apex/LexArriveGoodsMainController.init"; |
| | | import searchConsumableorderdetails from "@salesforce/apex/LexArriveGoodsMainController.searchConsumableorderdetails"; |
| | | import initTotalNum from "@salesforce/apex/LexConsumableGoodsInfo.initTotalNum"; |
| | | import initArrDet from "@salesforce/apex/LexConsumableGoodsInfo.initArrDet"; |
| | | import initArrDetAll from "@salesforce/apex/LexConsumableGoodsInfo.initArrDetAll"; |
| | | import initDeliveryDet from "@salesforce/apex/LexConsumableGoodsInfo.initDeliveryDet"; |
| | | import initDeliveryDetAll from "@salesforce/apex/LexConsumableGoodsInfo.initDeliveryDetAll"; |
| | | import initNotArrDet from "@salesforce/apex/LexConsumableGoodsInfo.initNotArrDet"; |
| | | 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"; |
| | | |
| | | export default class LexArriveGoodsMain extends NavigationMixin(LightningElement) { |
| | | export default class LexArriveGoodsMain extends NavigationMixin( |
| | | LightningElement |
| | | ) { |
| | | //页面基础变量 |
| | | @track agencyProType; |
| | | @track category1; |
| | |
| | | // {label:'待系统操作入库数量',fieldName:'Delivery_detail_count__c'}, |
| | | // {label:'还没发货数量',fieldName:'OrderNumber_notarrive__c'}, |
| | | // {label:'发货七天还未到货数',fieldName:'More_than_seven_days__c'}, |
| | | {label:'消耗品订单名称', |
| | | { |
| | | label: "消耗品订单名称", |
| | | type: "customOutputGood", |
| | | typeAttributes: { |
| | | outputValue: { fieldName: "Name" }, |
| | | type: 'Title', |
| | | type: "Title", |
| | | recordId: { fieldName: "Id" } |
| | | }, |
| | | hideDefaultActions: true,initialWidth:200,wrapText:true}, |
| | | {label:'SAP合同号',fieldName:'ContractNo__c',hideDefaultActions: true,wrapText:true,initialWidth:180}, |
| | | {label:'订单总数', |
| | | 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" }, |
| | | type: 'TotalNum', |
| | | type: "TotalNum", |
| | | recordId: { fieldName: "Id" } |
| | | }, |
| | | hideDefaultActions: true, initialWidth: 100,cellAttributes: { alignment: "right" }}, |
| | | {label:'已到货数量', |
| | | hideDefaultActions: true, |
| | | initialWidth: 100, |
| | | cellAttributes: { alignment: "right" } |
| | | }, |
| | | { |
| | | label: "已到货数量", |
| | | type: "customOutputGood", |
| | | typeAttributes: { |
| | | outputValue: { fieldName: "OrderNumber_arrived__c" }, |
| | | type: 'ArrDet', |
| | | type: "ArrDet", |
| | | recordId: { fieldName: "Id" } |
| | | }, |
| | | hideDefaultActions: true, initialWidth: 110,cellAttributes: { alignment: "right" }}, |
| | | {label:'待系统操作入库数量', |
| | | hideDefaultActions: true, |
| | | initialWidth: 100, |
| | | cellAttributes: { alignment: "right" } |
| | | }, |
| | | { |
| | | label: "待系统操作入库数量", |
| | | type: "customOutputGood", |
| | | typeAttributes: { |
| | | outputValue: { fieldName: "Delivery_detail_count__c" }, |
| | | type: 'DeliveryDet', |
| | | type: "DeliveryDet", |
| | | recordId: { fieldName: "Id" } |
| | | }, |
| | | hideDefaultActions: true, initialWidth: 180,cellAttributes: { alignment: "right" }}, |
| | | {label:'还没发货数量', |
| | | hideDefaultActions: true, |
| | | initialWidth: 150, |
| | | cellAttributes: { alignment: "right" } |
| | | }, |
| | | { |
| | | label: "还没发货数量", |
| | | type: "customOutputGood", |
| | | typeAttributes: { |
| | | outputValue: { fieldName: "OrderNumber_notarrive__c" }, |
| | | type: 'NotArrDet', |
| | | type: "NotArrDet", |
| | | recordId: { fieldName: "Id" } |
| | | }, |
| | | hideDefaultActions: true, initialWidth: 120,cellAttributes: { alignment: "right" }}, |
| | | {label:'发货七天还未到货数', |
| | | hideDefaultActions: true, |
| | | initialWidth: 120, |
| | | cellAttributes: { alignment: "right" } |
| | | }, |
| | | { |
| | | label: "发货七天还未到货数", |
| | | type: "customOutputGood", |
| | | typeAttributes: { |
| | | outputValue: { fieldName: "More_than_seven_days__c" }, |
| | | type: 'MoreThan7', |
| | | type: "MoreThan7", |
| | | 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: 150, |
| | | cellAttributes: { alignment: "right" } |
| | | }, |
| | | { |
| | | label: "最新发货日期", |
| | | fieldName: "Shipment_date__c", |
| | | hideDefaultActions: true, |
| | | initialWidth: 105 |
| | | }, |
| | | { |
| | | label: "首次发货日期", |
| | | fieldName: "First_Delivery__c", |
| | | hideDefaultActions: true, |
| | | initialWidth: 105 |
| | | } |
| | | ]; |
| | | |
| | | @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 |
| | | } |
| | | ]; |
| | | |
| | | //获取参数 |
| | |
| | | |
| | | //初始化 |
| | | connectedCallback(){ |
| | | init() |
| | | .then(result=>{ |
| | | init().then((result) => { |
| | | this.isNoteStay = result.isNoteStay; |
| | | if(result.result == 'Success'){ |
| | | if (result.result == "Success") { |
| | | this.agencyProType = result.agencyProType; |
| | | this.accountId = result.accountId; |
| | | this.title = result.title; |
| | |
| | | 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.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'); |
| | | this.showMyToast("初始化页面失败", result.errorMsg, "error"); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | //点击链接 |
| | |
| | | var outputType = event.detail.data.type; |
| | | var recordId = event.detail.data.recordId; |
| | | console.log("click:"+outputValue+"---"+outputType+"---"+recordId); |
| | | if(outputType == 'Title'){ |
| | | if (outputType == "Title") { |
| | | const config = { |
| | | type: 'standard__webPage', |
| | | type: "standard__webPage", |
| | | attributes: { |
| | | url: '/lexarrivegoods?ESetId='+recordId |
| | | url: "/lexarrivegoods?ESetId=" + recordId |
| | | } |
| | | }; |
| | | this[NavigationMixin.Navigate](config); |
| | | }else if(outputType == 'TotalNum'){ |
| | | this.popTitle = '所有产品一览'; |
| | | initTotalNum({ordId:recordId, type:'all'}) |
| | | .then(result=>{ |
| | | if(result.result == 'Success'){ |
| | | } else if (outputType == "TotalNum") { |
| | | this.popTitle = "所有产品一览"; |
| | | 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'); |
| | | this.showMyToast( |
| | | "加载所有产品一览页面失败", |
| | | result.errorMsg, |
| | | "error" |
| | | ); |
| | | } |
| | | }) |
| | | }else if(outputType == 'ArrDet'){ |
| | | if(recordId == '1'){ |
| | | this.popTitle = '所有已到货产品一览'; |
| | | initArrDetAll({type:'all'}) |
| | | .then(result=>{ |
| | | if(result.result == 'Success'){ |
| | | }); |
| | | } else if (outputType == "ArrDet") { |
| | | if (recordId == "1") { |
| | | this.popTitle = "所有已到货产品一览"; |
| | | 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'); |
| | | this.showMyToast( |
| | | "加载所有已到货产品一览页面失败", |
| | | result.errorMsg, |
| | | "error" |
| | | ); |
| | | } |
| | | }) |
| | | }); |
| | | }else{ |
| | | this.popTitle = '已到货产品一览'; |
| | | initArrDet({orderId:recordId}) |
| | | .then(result=>{ |
| | | if(result.result == 'Success'){ |
| | | this.popTitle = "已到货产品一览"; |
| | | 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'); |
| | | this.showMyToast( |
| | | "加载已到货产品一览页面失败", |
| | | result.errorMsg, |
| | | "error" |
| | | ); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | }else if(outputType == 'DeliveryDet'){ |
| | | if(recordId == '1'){ |
| | | this.popTitle = '所有已发货还没到货产品一览'; |
| | | initDeliveryDetAll({type:'all'}) |
| | | .then(result=>{ |
| | | if(result.result == 'Success'){ |
| | | } else if (outputType == "DeliveryDet") { |
| | | if (recordId == "1") { |
| | | this.popTitle = "所有已发货还没到货产品一览"; |
| | | 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'); |
| | | this.showMyToast( |
| | | "加载所有已发货还没到货产品一览页面失败", |
| | | result.errorMsg, |
| | | "error" |
| | | ); |
| | | } |
| | | }) |
| | | }); |
| | | }else{ |
| | | this.popTitle = '未到货产品一览'; |
| | | initDeliveryDet({orderId:recordId}) |
| | | .then(result=>{ |
| | | if(result.result == 'Success'){ |
| | | this.popTitle = "未到货产品一览"; |
| | | 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'); |
| | | this.showMyToast( |
| | | "加载未到货产品一览页面失败", |
| | | result.errorMsg, |
| | | "error" |
| | | ); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | }else if(outputType == 'NotArrDet'){ |
| | | if(recordId == '1'){ |
| | | this.popTitle = '所有还没发货产品一览'; |
| | | initNotArrDetAll({type:'all'}) |
| | | .then(result=>{ |
| | | if(result.result == 'Success'){ |
| | | } else if (outputType == "NotArrDet") { |
| | | if (recordId == "1") { |
| | | this.popTitle = "所有还没发货产品一览"; |
| | | 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'); |
| | | this.showMyToast( |
| | | "加载所有还没发货产品一览页面失败", |
| | | result.errorMsg, |
| | | "error" |
| | | ); |
| | | } |
| | | }) |
| | | }); |
| | | }else{ |
| | | this.popTitle = '还没发货数量'; |
| | | initNotArrDet({orderId:recordId}) |
| | | .then(result=>{ |
| | | if(result.result == 'Success'){ |
| | | this.popTitle = "还没发货数量"; |
| | | 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'); |
| | | this.showMyToast( |
| | | "加载还没发货数量页面失败", |
| | | result.errorMsg, |
| | | "error" |
| | | ); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | }else if(outputType == 'MoreThan7'){ |
| | | if(recordId == '1'){ |
| | | this.popTitle = '所有发货七天还未到货数'; |
| | | initMoreThan7All({type:'all'}) |
| | | .then(result=>{ |
| | | if(result.result == 'Success'){ |
| | | } else if (outputType == "MoreThan7") { |
| | | if (recordId == "1") { |
| | | this.popTitle = "所有发货七天还未到货数"; |
| | | 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'); |
| | | this.showMyToast( |
| | | "加载所有发货七天还未到货数页面失败", |
| | | result.errorMsg, |
| | | "error" |
| | | ); |
| | | } |
| | | }) |
| | | }); |
| | | }else{ |
| | | this.popTitle = '发货七天还未到货数'; |
| | | initMoreThan7({orderId:recordId}) |
| | | .then(result=>{ |
| | | if(result.result == 'Success'){ |
| | | this.popTitle = "发货七天还未到货数"; |
| | | 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'); |
| | | this.showMyToast( |
| | | "加载发货七天还未到货数页面失败", |
| | | result.errorMsg, |
| | | "error" |
| | | ); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | } |
| | | } |
| | |
| | | cate2Str:this.cate2, |
| | | accountidStr:this.accountId, |
| | | userWorkLocationStr:this.userWorkLocation, |
| | | agencyProTypeStr:this.agencyProType}) |
| | | .then(result=>{ |
| | | 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}); |
| | | 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'); |
| | | this.showMyToast( |
| | | "搜索成功", |
| | | "共搜索到" + count + "条数据", |
| | | "success" |
| | | ); |
| | | }else{ |
| | | this.showMyToast('未搜索到数据','','error'); |
| | | this.showMyToast("未搜索到数据", "", "error"); |
| | | } |
| | | }else{ |
| | | this.showMyToast('搜索失败',result.errorMsg,'error'); |
| | | this.showMyToast("搜索失败", result.errorMsg, "error"); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | //清空搜索框 |
| | | clear(){ |
| | | this.showSpinner = true; |
| | | this.category1 = ''; |
| | | this.category1 = ""; |
| | | this.cate2 = null; |
| | | searchConsumableorderdetails({ |
| | | category1Str:this.category1, |
| | | cate2Str:this.cate2, |
| | | accountidStr:this.accountId, |
| | | userWorkLocationStr:this.userWorkLocation, |
| | | agencyProTypeStr:this.agencyProType}) |
| | | .then(result=>{ |
| | | 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}); |
| | | 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'); |
| | | this.showMyToast( |
| | | "搜索成功", |
| | | "共搜索到" + count + "条数据", |
| | | "success" |
| | | ); |
| | | }else{ |
| | | this.showMyToast('未搜索到数据','','error'); |
| | | this.showMyToast("未搜索到数据", "", "error"); |
| | | } |
| | | }else{ |
| | | this.showMyToast('搜索失败',result.errorMsg,'error'); |
| | | this.showMyToast("搜索失败", result.errorMsg, "error"); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | //入库 |
| | | orderArrive(){ |
| | | const config = { |
| | | type: 'standard__webPage', |
| | | type: "standard__webPage", |
| | | attributes: { |
| | | url: '/lexarrivegoods?ArrType=Arr' |
| | | url: "/lexarrivegoods?ArrType=Arr" |
| | | } |
| | | }; |
| | | this[NavigationMixin.Navigate](config); |
| | |
| | | //返品 |
| | | orderReturn(){ |
| | | const config = { |
| | | type: 'standard__webPage', |
| | | type: "standard__webPage", |
| | | attributes: { |
| | | url: '/lexarrivegoods?ArrType=ReG' |
| | | url: "/lexarrivegoods?ArrType=ReG" |
| | | } |
| | | }; |
| | | this[NavigationMixin.Navigate](config); |
| | | } |
| | | |
| | | 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); |
| | | // var mode; |
| | | // if(this.isNoteStay){ |
| | | // mode ='sticky'; |
| | |
| | | <template> |
| | | <c-common-toast></c-common-toast> |
| | | <template if:true={isShowSpinner}> |
| | | <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 |
| | | 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 if:false={isDetailsShow}> |
| | | <template if:false={isConInvoiceList}> |
| | | <!-- 搜索客户名 --> |
| | | <template if:true={isModalOpen}> |
| | | <section role="dialog" tabindex="-1" aria-labelledby="modal-heading-01" aria-modal="true" |
| | | aria-describedby="modal-content-id-1" class="slds-modal slds-fade-in-open slds-modal_medium" |
| | | style="border: 1px solid #D4D4D4;"> |
| | | <section |
| | | role="dialog" |
| | | tabindex="-1" |
| | | aria-labelledby="modal-heading-01" |
| | | aria-modal="true" |
| | | aria-describedby="modal-content-id-1" |
| | | class="slds-modal slds-fade-in-open slds-modal_medium" |
| | | style="border: 1px solid #d4d4d4" |
| | | > |
| | | <div class="slds-modal__container"> |
| | | <header class="slds-modal__header" style="background-color: #F3F3F3;"> |
| | | <button style="" class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" |
| | | title="Close" onclick={closeModal}> |
| | | <lightning-icon icon-name="utility:close" alternative-text="close" variant="inverse" |
| | | size="small"></lightning-icon> |
| | | <header |
| | | class="slds-modal__header" |
| | | style="background-color: #f3f3f3" |
| | | > |
| | | <button |
| | | style="" |
| | | class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" |
| | | title="Close" |
| | | onclick={closeModal} |
| | | > |
| | | <lightning-icon |
| | | icon-name="utility:close" |
| | | alternative-text="close" |
| | | variant="inverse" |
| | | size="small" |
| | | ></lightning-icon> |
| | | <span class="slds-assistive-text">Close</span> |
| | | </button> |
| | | <h2 id="modal-heading-01" class="slds-text-heading_medium slds-hyphenate">经销商医院检索</h2> |
| | | <h2 |
| | | id="modal-heading-01" |
| | | class="slds-text-heading_medium slds-hyphenate" |
| | | > |
| | | 经销商医院检索 |
| | | </h2> |
| | | </header> |
| | | <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-1" |
| | | style="border: 1px solid #F3F3F3;"> |
| | | <table style="width: 100%;"> |
| | | <div |
| | | class="slds-modal__content slds-p-around_medium" |
| | | id="modal-content-id-1" |
| | | style="border: 1px solid #f3f3f3" |
| | | > |
| | | <table style="width: 100%"> |
| | | <tbody> |
| | | <tr> |
| | | <td style="width: 74px;"> |
| | | <div style="color:#696969;font-size:16px;text-align: left;">医院名称</div> |
| | | <td style="width: 74px"> |
| | | <div |
| | | style=" |
| | | color: #696969; |
| | | font-size: 16px; |
| | | text-align: left; |
| | | " |
| | | > |
| | | 医院名称 |
| | | </div> |
| | | </td> |
| | | <td style="width: 60%;"><lightning-input class="inputFont" label="医院名称" |
| | | variant="label-hidden" placeholder="请输入医院名称" value={searchHospitalName} |
| | | data-field="searchHospitalName" onchange={dataChange}></lightning-input></td> |
| | | <td style="width: 10px;"></td> |
| | | <td><button class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle" |
| | | style="height: 32px;" label="搜索" onclick={searchHospital}>搜索</button></td> |
| | | <td style="width: 60%"> |
| | | <lightning-input |
| | | class="inputFont" |
| | | label="医院名称" |
| | | variant="label-hidden" |
| | | placeholder="请输入医院名称" |
| | | value={searchHospitalName} |
| | | data-field="searchHospitalName" |
| | | onchange={dataChange} |
| | | ></lightning-input> |
| | | </td> |
| | | <td style="width: 10px"></td> |
| | | <td> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle" |
| | | style="height: 32px" |
| | | label="搜索" |
| | | onclick={searchHospital} |
| | | > |
| | | 搜索 |
| | | </button> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | <p style="height: 20px;"></p> |
| | | <p style="height: 20px"></p> |
| | | <!-- <p>已选择医院:{chooseHospital}</p> --> |
| | | <div |
| | | style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;"> |
| | | <div style="border-bottom: 1px solid #D4D4D4;padding:3px;"> |
| | | style=" |
| | | border: 1px solid #d4d4d4; |
| | | border-top: 3px solid #51606e; |
| | | border-radius: 5px; |
| | | margin-bottom: 7px; |
| | | " |
| | | > |
| | | <div style="border-bottom: 1px solid #d4d4d4; padding: 3px"> |
| | | <lightning-layout> |
| | | <lightning-layout-item padding="around-small"> |
| | | <p style="font-size: 18px"> |
| | |
| | | </lightning-layout> |
| | | <!-- <p style="font-size: 16px;"><strong>搜索结果</strong></p> --> |
| | | </div> |
| | | <div class="myTable" style="padding:10px;"> |
| | | <div class="myTable" style="padding: 10px"> |
| | | <!-- <lightning-datatable class="wrapped-header-datatable" key-field="id" |
| | | hide-checkbox-column="true" data={hospitalList} columns={hosCols} |
| | | onrowaction={chooseHos}></lightning-datatable> --> |
| | | <lightning-datatable class="datatabel slds-border_top wrapped-header-datatable" |
| | | key-field="id" data={hospitalList} columns={hospitalColumns} hide-checkbox-column="true" |
| | | onrowaction={searchHandleRowAction}> |
| | | <lightning-datatable |
| | | class="datatabel slds-border_top wrapped-header-datatable" |
| | | key-field="id" |
| | | data={hospitalList} |
| | | columns={hospitalColumns} |
| | | hide-checkbox-column="true" |
| | | onrowaction={searchHandleRowAction} |
| | | > |
| | | </lightning-datatable> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <footer class="slds-modal__footer"> |
| | | <button class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" label="取消" |
| | | onclick={closeModal}>取消</button> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" |
| | | label="取消" |
| | | onclick={closeModal} |
| | | > |
| | | 取消 |
| | | </button> |
| | | </footer> |
| | | </div> |
| | | </section> |
| | | <div class="slds-backdrop slds-backdrop_open"></div> |
| | | </template> |
| | | <div class="outerBorderCss"> |
| | | <div style="padding:5px;"> |
| | | |
| | | <div style="padding: 5px"> |
| | | <div class="borderCss"> |
| | | <div style="padding:10px;"> |
| | | <div style="padding: 10px"> |
| | | <div lwc:dom="manual" class="resultDiv"></div> |
| | | <div draggable="false"> |
| | | <template if:false={EditAble}> |
| | |
| | | <lightning-layout-item size="10"> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder" |
| | | onclick={SetEditAbleJs} disabled={isDisabledEdit} |
| | | style="width: 150px;">编辑</button> |
| | | onclick={SetEditAbleJs} |
| | | disabled={isDisabledEdit} |
| | | style="width: 150px" |
| | | > |
| | | 编辑 |
| | | </button> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder buttonminMarginLeft" |
| | | onclick={approvalJs} disabled={isDisabledEdit} |
| | | style="width: 150px;">提交</button> |
| | | onclick={approvalJs} |
| | | disabled={isDisabledEdit} |
| | | style="width: 150px" |
| | | > |
| | | 提交 |
| | | </button> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder buttonminMarginLeft" |
| | | onclick={openReportJs} disabled={isOpenReportDisabled} |
| | | style="width: 150px;">显示明细</button> |
| | | onclick={openReportJs} |
| | | disabled={isOpenReportDisabled} |
| | | style="width: 150px" |
| | | > |
| | | 显示明细 |
| | | </button> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder buttonminMarginLeft" |
| | | onclick={reopenJs} disabled={isDisabledReopen} |
| | | style="width: 150px;">作废重开</button> |
| | | onclick={reopenJs} |
| | | disabled={isDisabledReopen} |
| | | style="width: 150px" |
| | | > |
| | | 作废重开 |
| | | </button> |
| | | </lightning-layout-item> |
| | | </lightning-layout> |
| | | |
| | | <lightning-layout multiple-rows="true" style="margin-top: 20px;"> |
| | | <lightning-layout |
| | | multiple-rows="true" |
| | | style="margin-top: 20px" |
| | | > |
| | | <lightning-layout-item size="2"></lightning-layout-item> |
| | | <lightning-layout-item size="10"> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder" |
| | | onclick={deleteButtonJs} disabled={isDisabledDelete} |
| | | style="width: 150px;">删除</button> |
| | | onclick={deleteButtonJs} |
| | | disabled={isDisabledDelete} |
| | | style="width: 150px" |
| | | > |
| | | 删除 |
| | | </button> |
| | | |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder buttonminMarginLeft" |
| | | disabled={isDisabledReopen} onclick={uploadOrder} |
| | | style="width: 150px;">上传附件</button> |
| | | disabled={isDisabledReopen} |
| | | onclick={uploadOrder} |
| | | style="width: 150px" |
| | | > |
| | | 上传附件 |
| | | </button> |
| | | |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder buttonminMarginLeft" |
| | | onclick={saveAttachmentJs} disabled={isDisabledReopen} |
| | | style="width: 150px;">保存附件</button> |
| | | onclick={saveAttachmentJs} |
| | | disabled={isDisabledReopen} |
| | | style="width: 150px" |
| | | > |
| | | 保存附件 |
| | | </button> |
| | | </lightning-layout-item> |
| | | </lightning-layout> |
| | | </template> |
| | | |
| | | <!-- 上传附件弹窗 --> |
| | | <template if:true={showAttPop}> |
| | | <section role="dialog" tabindex="-1" aria-labelledby="modal-heading-02" |
| | | aria-modal="true" aria-describedby="modal-content-id-2" |
| | | <section |
| | | role="dialog" |
| | | tabindex="-1" |
| | | aria-labelledby="modal-heading-02" |
| | | aria-modal="true" |
| | | aria-describedby="modal-content-id-2" |
| | | class="slds-modal slds-fade-in-open slds-modal_small" |
| | | style="border: 1px solid #D4D4D4;"> |
| | | style="border: 1px solid #d4d4d4" |
| | | > |
| | | <template if:true={showPopSpinner}> |
| | | <lightning-spinner size="medium" variant="brand"></lightning-spinner> |
| | | <lightning-spinner |
| | | size="medium" |
| | | variant="brand" |
| | | ></lightning-spinner> |
| | | </template> |
| | | <div class="slds-modal__container"> |
| | | <header class="slds-modal__header" style="background-color: #F3F3F3;"> |
| | | <button style="" |
| | | <header |
| | | class="slds-modal__header" |
| | | style="background-color: #f3f3f3" |
| | | > |
| | | <button |
| | | style="" |
| | | class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" |
| | | title="Close" onclick={closePop}> |
| | | <lightning-icon icon-name="utility:close" alternative-text="close" |
| | | variant="inverse" size="small"></lightning-icon> |
| | | title="Close" |
| | | onclick={closePop} |
| | | > |
| | | <lightning-icon |
| | | icon-name="utility:close" |
| | | alternative-text="close" |
| | | variant="inverse" |
| | | size="small" |
| | | ></lightning-icon> |
| | | <span class="slds-assistive-text">Close</span> |
| | | </button> |
| | | <h2 id="modal-heading-02" |
| | | class="slds-text-heading_medium slds-hyphenate">上传附件</h2> |
| | | <h2 |
| | | id="modal-heading-02" |
| | | class="slds-text-heading_medium slds-hyphenate" |
| | | > |
| | | 上传附件 |
| | | </h2> |
| | | </header> |
| | | <div class="slds-modal__content slds-p-around_medium searchName" |
| | | id="modal-content-id-2" style="border: 1px solid #F3F3F3;"> |
| | | <div |
| | | class="slds-modal__content slds-p-around_medium searchName" |
| | | id="modal-content-id-2" |
| | | style="border: 1px solid #f3f3f3" |
| | | > |
| | | <div class="slds-m-top_medium slds-m-bottom_x-large"> |
| | | <div class="slds-p-around_medium lgc-bg"> |
| | | <lightning-input class="fileUpload" type="file" label="附件上传" |
| | | <lightning-input |
| | | class="fileUpload" |
| | | type="file" |
| | | label="附件上传" |
| | | accept=".xlsx, .xls, .csv, .png, .doc, .docx, .pdf" |
| | | onchange={attChange}></lightning-input> |
| | | onchange={attChange} |
| | | ></lightning-input> |
| | | </div> |
| | | <p class="fontWeight">已选择文件:{fileName} |
| | | <p class="fontWeight"> |
| | | 已选择文件:{fileName} |
| | | |
| | | <template if:true={attDelBtn}> |
| | | <a onclick={removeAtt}>移除</a> |
| | |
| | | label="取消" onclick={closePop}></lightning-button> |
| | | <lightning-button style="margin-left: 10px;" variant="neutral" |
| | | label="上传" onclick={handleFilesChange}></lightning-button> --> |
| | | <button class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" style="margin-left: 10px;" |
| | | label="取消" onclick={closePop}>取消</button> |
| | | <button class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle" style="margin-left: 10px;" |
| | | label="上传" onclick={handleFilesChange}>上传</button> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" |
| | | style="margin-left: 10px" |
| | | label="取消" |
| | | onclick={closePop} |
| | | > |
| | | 取消 |
| | | </button> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle" |
| | | style="margin-left: 10px" |
| | | label="上传" |
| | | onclick={handleFilesChange} |
| | | > |
| | | 上传 |
| | | </button> |
| | | </footer> |
| | | </div> |
| | | </section> |
| | |
| | | |
| | | <template if:true={EditAble}> |
| | | <lightning-layout> |
| | | <lightning-layout-item size="1" padding="around-small"></lightning-layout-item> |
| | | <lightning-layout-item size="2" padding="around-small"></lightning-layout-item> |
| | | <lightning-layout-item |
| | | size="1" |
| | | padding="around-small" |
| | | ></lightning-layout-item> |
| | | <lightning-layout-item |
| | | size="2" |
| | | padding="around-small" |
| | | ></lightning-layout-item> |
| | | <lightning-layout-item padding="around-small"> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder" |
| | | onclick={SaveJs}>确定</button> |
| | | onclick={SaveJs} |
| | | > |
| | | 确定 |
| | | </button> |
| | | </lightning-layout-item> |
| | | </lightning-layout> |
| | | </template> |
| | |
| | | </template> |
| | | |
| | | </lightning-layout> --> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </lightning-layout-item> |
| | | </lightning-layout> |
| | | </div> |
| | | <div style="padding:7px;"> |
| | | <div style="padding: 7px"> |
| | | <div lwc:dom="manual" class="resultDiv"></div> |
| | | <div draggable="false"> |
| | | <!--发票信息 显示用 --> |
| | | <template if:false={isEditInvoice}> |
| | | <lightning-record-edit-form object-api-name="Consumable_order__c" record-id={cocId} |
| | | onload={handleLoad2}> |
| | | <lightning-record-edit-form |
| | | object-api-name="Consumable_order__c" |
| | | record-id={cocId} |
| | | onload={handleLoad2} |
| | | > |
| | | <!-- 发票号 状态 --> |
| | | <lightning-layout multiple-rows="true"> |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | |
| | | <lightning-layout-item class="hehe-layoutItem" size="5"> |
| | | <lightning-output-field field-name="Name"></lightning-output-field> |
| | | <lightning-output-field |
| | | field-name="Name" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item class="hehe-layoutItem" size="5" style="padding-left: 100px;"> |
| | | <lightning-layout-item |
| | | class="hehe-layoutItem" |
| | | size="5" |
| | | style="padding-left: 100px" |
| | | > |
| | | <lightning-output-field |
| | | field-name="Invoice_status__c"></lightning-output-field> |
| | | field-name="Invoice_status__c" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | |
| | | </lightning-layout> |
| | | |
| | | <!-- 发票日期 --> |
| | |
| | | |
| | | <lightning-layout-item class="hehe-layoutItem" size="5"> |
| | | <lightning-output-field |
| | | field-name="Invoice_Date__c"></lightning-output-field> |
| | | field-name="Invoice_Date__c" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | </lightning-layout> |
| | | |
| | |
| | | <lightning-layout multiple-rows="true"> |
| | | <lightning-layout-item class="hehe-layoutItem" size="5"> |
| | | <lightning-output-field |
| | | field-name="Order_Dealer_Info__c"></lightning-output-field> |
| | | field-name="Order_Dealer_Info__c" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | </lightning-layout> |
| | | </template> |
| | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | |
| | | <lightning-layout-item class="hehe-layoutItem" size="5"> |
| | | <lightning-output-field field-name="ShipmentAccount__c" |
| | | class="hideHelpText"></lightning-output-field> |
| | | <lightning-output-field |
| | | field-name="ShipmentAccount__c" |
| | | class="hideHelpText" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | </lightning-layout> |
| | | |
| | | <!-- 科室 发票票面金额 --> |
| | | <lightning-layout multiple-rows="true" style="height:35.5px"> |
| | | <lightning-layout |
| | | multiple-rows="true" |
| | | style="height: 35.5px" |
| | | > |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | |
| | | <lightning-layout-item class="hehe-layoutItem" size="5"> |
| | | <lightning-output-field |
| | | field-name="Order_ForCustomerText__c"></lightning-output-field> |
| | | field-name="Order_ForCustomerText__c" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item size="5" class="readOnly" style="padding-left: 100px;"> |
| | | <lightning-input label="发票票面金额(元)" value={sumPrice} read-only |
| | | variant="label-inline"></lightning-input> |
| | | <lightning-layout-item |
| | | size="5" |
| | | class="readOnly" |
| | | style="padding-left: 100px" |
| | | > |
| | | <lightning-input |
| | | label="发票票面金额(元)" |
| | | value={sumPrice} |
| | | read-only |
| | | variant="label-inline" |
| | | ></lightning-input> |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | <lightning-layout-item class="hehe-layoutItem" size="5"> |
| | | <lightning-output-field |
| | | field-name="Invoice_Note__c"></lightning-output-field> |
| | | field-name="Invoice_Note__c" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | </lightning-layout> |
| | | |
| | |
| | | |
| | | <lightning-layout-item class="hehe-layoutItem" size="5"> |
| | | <lightning-output-field |
| | | field-name="Invoice_attachment__c"></lightning-output-field> |
| | | field-name="Invoice_attachment__c" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item class="hehe-layoutItem" size="5" style="padding-left: 100px;"> |
| | | <lightning-layout-item |
| | | class="hehe-layoutItem" |
| | | size="5" |
| | | style="padding-left: 100px" |
| | | > |
| | | <lightning-output-field |
| | | field-name="Invoicedet_attachment__c"></lightning-output-field> |
| | | field-name="Invoicedet_attachment__c" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | |
| | | |
| | | <!-- 附件预览 --> |
| | | <lightning-layout multiple-rows="true"> |
| | | <lightning-layout-item size="1"> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item size="1"> </lightning-layout-item> |
| | | <lightning-layout-item size="10"> |
| | | <lightning-card class="attListTitle" variant="Narrow" title="附件列表" |
| | | icon-name="utility:attach"> |
| | | |
| | | <lightning-card |
| | | class="attListTitle" |
| | | variant="Narrow" |
| | | title="附件列表" |
| | | icon-name="utility:attach" |
| | | > |
| | | <lightning-layout slot="footer" multiple-rows="true"> |
| | | <template for:each={fileData} for:item="item" for:index="index"> |
| | | <lightning-layout-item padding="around-none" size="2" |
| | | <template |
| | | for:each={fileData} |
| | | for:item="item" |
| | | for:index="index" |
| | | > |
| | | <lightning-layout-item |
| | | padding="around-none" |
| | | size="2" |
| | | key={item.recordId} |
| | | style="text-align: left;padding:5px"> |
| | | <lightning-icon title={item.Title} |
| | | style="margin-left: 20px;" icon-name="doctype:gform" |
| | | style="text-align: left; padding: 5px" |
| | | > |
| | | <lightning-icon |
| | | title={item.Title} |
| | | style="margin-left: 20px" |
| | | icon-name="doctype:gform" |
| | | alternative-text={item.Title} |
| | | size="large"></lightning-icon><br /> |
| | | <div title={item.Title} style="width: 100px;text-overflow: ellipsis;overflow: hidden;white-space: nowrap;"> |
| | | size="large" |
| | | ></lightning-icon |
| | | ><br /> |
| | | <div |
| | | title={item.Title} |
| | | style=" |
| | | width: 100px; |
| | | text-overflow: ellipsis; |
| | | overflow: hidden; |
| | | white-space: nowrap; |
| | | " |
| | | > |
| | | {item.Title} |
| | | </div> |
| | | <p> |
| | | <!-- <a data-fileid ={item.documentId} onclick={previweAtt}> --> |
| | | <a href={item.attUrl} target="_blank"> |
| | | 预览 |
| | | </a> · |
| | | <a href={item.downloadUrl}> |
| | | 下载 |
| | | </a> · |
| | | 预览 </a |
| | | > · |
| | | <a href={item.downloadUrl}> 下载 </a |
| | | > · |
| | | <a data-fileid={item.Id} onclick={deleteAtt}> |
| | | 删除 |
| | | </a> |
| | |
| | | </template> |
| | | <!--发票信息 编辑用 --> |
| | | <template if:true={isEditInvoice}> |
| | | <lightning-record-edit-form object-api-name="Consumable_order__c" record-id={cocId} |
| | | onload={handleLoad2}> |
| | | <lightning-record-edit-form |
| | | object-api-name="Consumable_order__c" |
| | | record-id={cocId} |
| | | onload={handleLoad2} |
| | | > |
| | | <!-- 发票号 状态 --> |
| | | <lightning-layout multiple-rows="true"> |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | |
| | | <lightning-layout-item class="hehe-layoutItem" size="5"> |
| | | <lightning-input label="发票号" value={OrderCode} data-field="OrderCode" |
| | | onchange={dataChange} variant="label-inline" required |
| | | class="inputFont"></lightning-input> |
| | | <lightning-input |
| | | label="发票号" |
| | | value={OrderCode} |
| | | data-field="OrderCode" |
| | | onchange={dataChange} |
| | | variant="label-inline" |
| | | required |
| | | class="inputFont" |
| | | ></lightning-input> |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item class="hehe-layoutItem" size="5" style="padding-left: 100px;"> |
| | | <lightning-layout-item |
| | | class="hehe-layoutItem" |
| | | size="5" |
| | | style="padding-left: 100px" |
| | | > |
| | | <lightning-output-field |
| | | field-name="Invoice_status__c"></lightning-output-field> |
| | | field-name="Invoice_status__c" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | |
| | | <lightning-layout-item class="hehe-layoutItem" size="5"> |
| | | <lightning-input type="date" label="发票日期" variant="label-inline" |
| | | value={InvoiceDate} onchange={invoiceDateChange} required |
| | | class="inputFont"></lightning-input> |
| | | <lightning-input |
| | | type="date" |
| | | label="发票日期" |
| | | variant="label-inline" |
| | | value={InvoiceDate} |
| | | onchange={invoiceDateChange} |
| | | required |
| | | class="inputFont" |
| | | ></lightning-input> |
| | | </lightning-layout-item> |
| | | </lightning-layout> |
| | | |
| | |
| | | |
| | | <lightning-layout-item class="hehe-layoutItem" size="5"> |
| | | <div |
| | | class="slds-form-element__control slds-input-has-icon slds-input-has-icon_right"> |
| | | <lightning-icon size="x-small" |
| | | class="slds-form-element__control slds-input-has-icon slds-input-has-icon_right" |
| | | > |
| | | <lightning-icon |
| | | size="x-small" |
| | | class="iconMargin slds-icon slds-input__icon slds-input__icon_right slds-icon-text-default hideHelpText" |
| | | icon-name="utility:search"></lightning-icon> |
| | | <lightning-input type="text" name="HospitalName" label="客户名" |
| | | value={HospitalName} variant="label-inline" |
| | | onclick={searchHospitalNameModal} data-field="HospitalName" |
| | | onchange={clearAgencyI} class="inputFont"></lightning-input> |
| | | icon-name="utility:search" |
| | | ></lightning-icon> |
| | | <lightning-input |
| | | type="text" |
| | | name="HospitalName" |
| | | label="客户名" |
| | | value={HospitalName} |
| | | variant="label-inline" |
| | | onclick={searchHospitalNameModal} |
| | | data-field="HospitalName" |
| | | onchange={clearAgencyI} |
| | | class="inputFont" |
| | | ></lightning-input> |
| | | </div> |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item class="hehe-layoutItem" size="5" style="padding-left: 100px;"> |
| | | <lightning-combobox data-field="secondaryDistributor" |
| | | name="secondaryDistributor" label="二级经销商" |
| | | value={secondaryDistributor} placeholder="请选择..." |
| | | options={provinceOptsMap} variant="label-inline" |
| | | onchange={dataChange} class="inputFont"></lightning-combobox> |
| | | <lightning-layout-item |
| | | class="hehe-layoutItem" |
| | | size="5" |
| | | style="padding-left: 100px" |
| | | > |
| | | <lightning-combobox |
| | | data-field="secondaryDistributor" |
| | | name="secondaryDistributor" |
| | | label="二级经销商" |
| | | value={secondaryDistributor} |
| | | placeholder="请选择..." |
| | | options={provinceOptsMap} |
| | | variant="label-inline" |
| | | onchange={dataChange} |
| | | class="inputFont" |
| | | ></lightning-combobox> |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | |
| | | <lightning-layout-item class="hehe-layoutItem" size="5"> |
| | | <lightning-input-field onchange={dataChange} |
| | | data-field="ForCustomerText" value={ForCustomerText} |
| | | <lightning-input-field |
| | | onchange={dataChange} |
| | | data-field="ForCustomerText" |
| | | value={ForCustomerText} |
| | | field-name="Order_ForCustomerText__c" |
| | | class="inputFont"></lightning-input-field> |
| | | class="inputFont" |
| | | ></lightning-input-field> |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item class="hehe-layoutItem" size="5" style="padding-left: 100px;"> |
| | | <lightning-layout-item |
| | | class="hehe-layoutItem" |
| | | size="5" |
| | | style="padding-left: 100px" |
| | | > |
| | | <lightning-output-field |
| | | field-name="Order_ForDealerText__c"></lightning-output-field> |
| | | field-name="Order_ForDealerText__c" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | |
| | | <lightning-layout-item class="hehe-layoutItem" size="5"> |
| | | <lightning-input-field onchange={dataChange} data-field="InvoiceNote" |
| | | value={InvoiceNote} field-name="Invoice_Note__c" |
| | | class="inputFont"></lightning-input-field> |
| | | <lightning-input-field |
| | | onchange={dataChange} |
| | | data-field="InvoiceNote" |
| | | value={InvoiceNote} |
| | | field-name="Invoice_Note__c" |
| | | class="inputFont" |
| | | ></lightning-input-field> |
| | | </lightning-layout-item> |
| | | </lightning-layout> |
| | | |
| | | </lightning-record-edit-form> |
| | | </template> |
| | | </div> |
| | |
| | | <!-- 出库单一览 --> |
| | | <div class="borderCss"> |
| | | <div class="headerDorderCss"> |
| | | |
| | | <lightning-layout> |
| | | <lightning-layout-item padding="around-small"> |
| | | <p style="font-size: 18px"> |
| | |
| | | onclick={InvoiceorderSearchJs}></lightning-button> --> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle" |
| | | onclick={InvoiceorderSearchJs}>检索</button> |
| | | onclick={InvoiceorderSearchJs} |
| | | > |
| | | 检索 |
| | | </button> |
| | | </lightning-layout-item> |
| | | </template> |
| | | |
| | | </lightning-layout> |
| | | </div> |
| | | |
| | |
| | | <div style="padding: 7px"> |
| | | <div lwc:dom="manual" class="resultDiv"></div> |
| | | <div draggable="false"> |
| | | <lightning-datatable key-field="Id" data={outboundData} columns={outboundColumns} |
| | | hide-checkbox-column={hideCheckbox} onrowselection={getSelectedRows} |
| | | selected-rows={selectedRows} class="wrapped-header-datatable" data-field="outbound"> |
| | | <lightning-datatable |
| | | key-field="Id" |
| | | data={outboundData} |
| | | columns={outboundColumns} |
| | | hide-checkbox-column={hideCheckbox} |
| | | onrowselection={getSelectedRows} |
| | | selected-rows={selectedRows} |
| | | class="wrapped-header-datatable" |
| | | data-field="outbound" |
| | | > |
| | | </lightning-datatable> |
| | | <lightning-datatable key-field="id" data={outboundDataSumPrice} |
| | | columns={outboundColumns} hide-checkbox-column hide-table-header |
| | | class="wrapped-header-datatable"> |
| | | <lightning-datatable |
| | | key-field="id" |
| | | data={outboundDataSumPrice} |
| | | columns={outboundColumns} |
| | | hide-checkbox-column |
| | | hide-table-header |
| | | class="wrapped-header-datatable" |
| | | > |
| | | </lightning-datatable> |
| | | </div> |
| | | </div> |
| | |
| | | <div style="padding: 7px"> |
| | | <div lwc:dom="manual" class="resultDiv"></div> |
| | | <div draggable="false"> |
| | | <lightning-datatable key-field="id" data={invoiceOrderdetail1Recoeds} |
| | | columns={invoiceDetailsColumns} hide-checkbox-column |
| | | class="wrapped-header-datatable"> |
| | | <lightning-datatable |
| | | key-field="id" |
| | | data={invoiceOrderdetail1Recoeds} |
| | | columns={invoiceDetailsColumns} |
| | | hide-checkbox-column |
| | | class="wrapped-header-datatable" |
| | | > |
| | | </lightning-datatable> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | <template if:true={isConInvoiceList}> |
| | | <div class="outerBorderCss"> |
| | | <div style="padding:5px;"> |
| | | <div style="padding: 5px"> |
| | | <!-- 新建发票 --> |
| | | <div class="borderCss"> |
| | | <div style="padding:15px;"> |
| | | <div style="padding: 15px"> |
| | | <div lwc:dom="manual" class="resultDiv"></div> |
| | | <div draggable="false"> |
| | | <!-- <lightning-button label="新建发票" onclick={newInvoiceJs}></lightning-button> --> |
| | | <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" |
| | | onclick={newInvoiceJs}>新建发票</button> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder" |
| | | onclick={newInvoiceJs} |
| | | > |
| | | 新建发票 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 检索条件 --> |
| | | <div class="borderCss" style="margin-top: 5px;"> |
| | | <div class="borderCss" style="margin-top: 5px"> |
| | | <div class="headerDorderCss"> |
| | | <lightning-layout> |
| | | <lightning-layout-item padding="around-small"> |
| | |
| | | <div style="padding: 15px"> |
| | | <div lwc:dom="manual" class="resultDiv"></div> |
| | | <div draggable="false"> |
| | | |
| | | <lightning-layout multiple-rows> |
| | | <lightning-layout-item flexibility="auto"> |
| | | <div class="slds-text-align_center"> |
| | | <div class="slds-grid slds-grid_vertical-align-center"> |
| | | <div class="slds-form-element__label ">出库日 从</div> |
| | | <lightning-input type="date" variant="label-hidden" label="出库日 从" |
| | | onchange={dataChange} data-field="deliveryFromDate" |
| | | value={deliveryFromDate} class="inputFont" |
| | | style="max-width: 150px;"></lightning-input> |
| | | <div class="slds-form-element__label"> |
| | | 出库日 从 |
| | | </div> |
| | | <lightning-input |
| | | type="date" |
| | | variant="label-hidden" |
| | | label="出库日 从" |
| | | onchange={dataChange} |
| | | data-field="deliveryFromDate" |
| | | value={deliveryFromDate} |
| | | class="inputFont" |
| | | style="max-width: 150px" |
| | | ></lightning-input> |
| | | </div> |
| | | |
| | | </br> |
| | | <!-- </br> --> |
| | | <div class="slds-grid slds-grid_vertical-align-center"> |
| | | <div class="slds-form-element__label ">    到 |
| | | <div class="slds-form-element__label"> |
| | |     到 |
| | | </div> |
| | | <lightning-input type="date" variant="label-hidden" label="到" |
| | | onchange={dataChange} data-field="deliveryToDate" |
| | | value={deliveryToDate} class="inputFont" |
| | | style="max-width: 150px;"></lightning-input> |
| | | <lightning-input |
| | | type="date" |
| | | variant="label-hidden" |
| | | label="到" |
| | | onchange={dataChange} |
| | | data-field="deliveryToDate" |
| | | value={deliveryToDate} |
| | | class="inputFont" |
| | | style="max-width: 150px" |
| | | ></lightning-input> |
| | | </div> |
| | | </div> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item flexibility="auto"> |
| | | <div class="slds-grid slds-grid_vertical-align-center"> |
| | | <div class="slds-form-element__label ">发票号</div> |
| | | <lightning-input variant="label-hidden" label="发票号" onchange={dataChange} |
| | | data-field="category1" value={category1} class="inputFont" |
| | | style="max-width: 150px;"></lightning-input> |
| | | <lightning-input |
| | | variant="label-hidden" |
| | | label="发票号" |
| | | onchange={dataChange} |
| | | data-field="category1" |
| | | value={category1} |
| | | class="inputFont" |
| | | style="max-width: 150px" |
| | | ></lightning-input> |
| | | </div> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item flexibility="auto"> |
| | | <div class="slds-grid slds-grid_vertical-align-center"> |
| | | <div class="slds-form-element__label ">客户名</div> |
| | | <lightning-input variant="label-hidden" label="客户名" onchange={dataChange} |
| | | data-field="category2" value={category2} class="inputFont" |
| | | style="max-width: 150px;"></lightning-input> |
| | | <lightning-input |
| | | variant="label-hidden" |
| | | label="客户名" |
| | | onchange={dataChange} |
| | | data-field="category2" |
| | | value={category2} |
| | | class="inputFont" |
| | | style="max-width: 150px" |
| | | ></lightning-input> |
| | | </div> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item flexibility="auto"> |
| | | <div class="slds-grid slds-grid_vertical-align-center"> |
| | | <div class="slds-form-element__label ">状态</div> |
| | | <lightning-combobox data-field="invoiceStatus" name="invoiceStatus" |
| | | label="状态" value={invoiceStatusValue} placeholder="请选择..." |
| | | options={Options} variant="label-hidden" onchange={dataChange} |
| | | style="min-width: 100px;max-width: 200px;" |
| | | class="inputFont"></lightning-combobox> |
| | | <lightning-combobox |
| | | data-field="invoiceStatus" |
| | | name="invoiceStatus" |
| | | label="状态" |
| | | value={invoiceStatusValue} |
| | | placeholder="请选择..." |
| | | options={Options} |
| | | variant="label-hidden" |
| | | onchange={dataChange} |
| | | style="min-width: 100px; max-width: 200px" |
| | | class="inputFont" |
| | | ></lightning-combobox> |
| | | </div> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item flexibility="auto"> |
| | | <div class="slds-grid slds-grid_vertical-align-center"> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle" |
| | | onclick={invoiceCodeSearchJs} style="max-width: 110px;">检索</button> |
| | | onclick={invoiceCodeSearchJs} |
| | | style="max-width: 110px" |
| | | > |
| | | 检索 |
| | | </button> |
| | | </div> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item flexibility="auto"> |
| | | <div class="slds-grid slds-grid_vertical-align-center"> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" |
| | | onclick={ClearJs} style="max-width: 110px;">清空</button> |
| | | onclick={ClearJs} |
| | | style="max-width: 110px" |
| | | > |
| | | 清空 |
| | | </button> |
| | | </div> |
| | | </lightning-layout-item> |
| | | </lightning-layout> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 发票一览 --> |
| | | <div class="borderCss" style="margin-top: 5px;"> |
| | | <div class="borderCss" style="margin-top: 5px"> |
| | | <div class="headerDorderCss"> |
| | | <lightning-layout> |
| | | <lightning-layout-item padding="around-small"> |
| | |
| | | <div style="padding: 7px"> |
| | | <div lwc:dom="manual" class="resultDiv"></div> |
| | | <div draggable="false"> |
| | | <lightning-datatable key-field="id" data={invoiceData} columns={invoiceColumns} |
| | | hide-checkbox-column="true" class="wrapped-header-datatable"> |
| | | <lightning-datatable |
| | | key-field="id" |
| | | data={invoiceData} |
| | | columns={invoiceColumns} |
| | | hide-checkbox-column="true" |
| | | class="wrapped-header-datatable" |
| | | > |
| | | </lightning-datatable> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | <template if:true={isDetailsShow}> |
| | | <div class="outerBorderCss"> |
| | | <div style="padding:5px;"> |
| | | <div style="padding: 5px"> |
| | | <!-- 确定 --> |
| | | <div class="borderCss"> |
| | | <div style="padding:10px;"> |
| | | <div style="padding: 10px"> |
| | | <div lwc:dom="manual" class="resultDiv"></div> |
| | | <div draggable="false"> |
| | | <!-- <lightning-button label="确定" onclick={detailsSaveJs}></lightning-button> --> |
| | | <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" |
| | | onclick={detailsSaveJs}>确定</button> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder" |
| | | onclick={detailsSaveJs} |
| | | > |
| | | 确定 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 发票信息 --> |
| | | <div class="borderCss" style="margin-top: 5px;"> |
| | | <div class="borderCss" style="margin-top: 5px"> |
| | | <div class="headerDorderCss"> |
| | | <lightning-layout> |
| | | <lightning-layout-item padding="around-small"> |
| | |
| | | <div style="padding: 7px"> |
| | | <div lwc:dom="manual" class="resultDiv"></div> |
| | | <div draggable="false"> |
| | | <lightning-record-edit-form object-api-name="Consumable_order__c" |
| | | record-id={detailsInvoiceId} onload={handleLoad2}> |
| | | <lightning-record-edit-form |
| | | object-api-name="Consumable_order__c" |
| | | record-id={detailsInvoiceId} |
| | | onload={handleLoad2} |
| | | > |
| | | <lightning-layout multiple-rows="true"> |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | <lightning-layout-item size="5"> |
| | | <lightning-output-field field-name="Name"></lightning-output-field> |
| | | <lightning-output-field |
| | | field-name="Name" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | </lightning-layout> |
| | | <lightning-layout multiple-rows="true"> |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | <lightning-layout-item size="5" class="hehe-layoutItem"> |
| | | <lightning-output-field field-name="ShipmentAccount__c" |
| | | class="hideHelpText"></lightning-output-field> |
| | | <lightning-output-field |
| | | field-name="ShipmentAccount__c" |
| | | class="hideHelpText" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | </lightning-layout> |
| | | <lightning-layout multiple-rows="true"> |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | <lightning-layout-item size="5"> |
| | | <lightning-output-field |
| | | field-name="Order_ForCustomerText__c"></lightning-output-field> |
| | | field-name="Order_ForCustomerText__c" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | </lightning-layout> |
| | | </lightning-record-edit-form> |
| | |
| | | </div> |
| | | |
| | | <!-- 出库单 --> |
| | | <div class="borderCss" style="margin-top: 5px;"> |
| | | <div class="borderCss" style="margin-top: 5px"> |
| | | <div class="headerDorderCss"> |
| | | <lightning-layout> |
| | | <lightning-layout-item padding="around-small"> |
| | |
| | | <div style="padding: 7px"> |
| | | <div lwc:dom="manual" class="resultDiv"></div> |
| | | <div draggable="false"> |
| | | <lightning-record-edit-form object-api-name="Consumable_order__c" record-id={detailsCocId}> |
| | | <lightning-record-edit-form |
| | | object-api-name="Consumable_order__c" |
| | | record-id={detailsCocId} |
| | | > |
| | | <lightning-layout multiple-rows="true"> |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | <lightning-layout-item size="5"> |
| | | <lightning-output-field field-name="Name"></lightning-output-field> |
| | | <lightning-output-field |
| | | field-name="Name" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | </lightning-layout> |
| | | <lightning-layout multiple-rows="true"> |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | <lightning-layout-item size="5"> |
| | | <lightning-output-field field-name="Outbound_Date__c"></lightning-output-field> |
| | | <lightning-output-field |
| | | field-name="Outbound_Date__c" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | </lightning-layout> |
| | | </lightning-record-edit-form> |
| | |
| | | </div> |
| | | |
| | | <!-- 出库单明细 --> |
| | | <div class="borderCss" style="margin-top: 5px;"> |
| | | <div class="borderCss" style="margin-top: 5px"> |
| | | <div class="headerDorderCss"> |
| | | <lightning-layout> |
| | | <lightning-layout-item padding="around-small"> |
| | |
| | | <!-- <lightning-datatable class="datatabel slds-border_top" key-field="id" |
| | | data={detaisData} columns={detailsColumns}> |
| | | </lightning-datatable> --> |
| | | <c-lex-custom-lightning-datatable key-field="Id" data={detailsData} columns={detailsColumns} |
| | | onunitchange={handleUnitChange} onshipmentnumber={handleShipmentNumber} |
| | | onrowselection={detailsGetSelectedRows} selected-rows={detailsSelectedRows} |
| | | style="word-wrap:break-word; word-break:break-all; " class="wrapped-header-datatable" |
| | | min-column-width="115"> |
| | | <c-lex-custom-lightning-datatable |
| | | key-field="Id" |
| | | data={detailsData} |
| | | columns={detailsColumns} |
| | | onunitchange={handleUnitChange} |
| | | onshipmentnumber={handleShipmentNumber} |
| | | onrowselection={detailsGetSelectedRows} |
| | | selected-rows={detailsSelectedRows} |
| | | style="word-wrap: break-word; word-break: break-all" |
| | | class="wrapped-header-datatable" |
| | | > |
| | | </c-lex-custom-lightning-datatable> |
| | | <lightning-datatable class="datatabel slds-border_top wrapped-header-datatable" |
| | | key-field="id" data={invoiceAllpriceData} columns={detailsColumns} hide-checkbox-column |
| | | hide-table-header> |
| | | <lightning-datatable |
| | | class="datatabel slds-border_top wrapped-header-datatable" |
| | | key-field="id" |
| | | data={invoiceAllpriceData} |
| | | columns={detailsColumns} |
| | | hide-checkbox-column |
| | | hide-table-header |
| | | > |
| | | </lightning-datatable> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | </template> |
| | |
| | | import { LightningElement, api, track, wire } from 'lwc'; |
| | | import { LightningElement, api, track, wire } from "lwc"; |
| | | import { ShowToastEvent } from "lightning/platformShowToastEvent"; |
| | | import init from "@salesforce/apex/LexConInvoiceViewController.init"; |
| | | import save from "@salesforce/apex/LexConInvoiceViewController.save"; |
| | |
| | | import serContact from "@salesforce/apex/lexSearchAgencyHospitalController.serContact"; |
| | | import detailsInit from "@salesforce/apex/LexConInvoicedetailsController.init"; |
| | | import detailsSave from "@salesforce/apex/LexConInvoicedetailsController.save"; |
| | | import deleteAtt from '@salesforce/apex/LexSummonsCreatController.deleteAtt'; |
| | | import deleteAtt from "@salesforce/apex/LexSummonsCreatController.deleteAtt"; |
| | | import { NavigationMixin } from "lightning/navigation"; |
| | | //table css |
| | | import { loadStyle } from "lightning/platformResourceLoader"; |
| | | import WrappedHeaderTable from "@salesforce/resourceUrl/lexdatatable"; |
| | | import LexConInvoiceViewReport from '@salesforce/label/c.LexConInvoiceViewReport'; |
| | | import LexConInvoiceViewReport from "@salesforce/label/c.LexConInvoiceViewReport"; |
| | | |
| | | const hospitalColumns = [ |
| | | { |
| | |
| | | typeAttributes: { |
| | | label: "选择", |
| | | name: "Id2", |
| | | size: 1, |
| | | }, |
| | | size: 1 |
| | | } |
| | | }, |
| | | { |
| | | label: "医院名称", |
| | | fieldName: "Name", |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: "省份", |
| | | fieldName: "stateMasterName", |
| | | hideDefaultActions: true, |
| | | hideDefaultActions: true |
| | | } |
| | | ]; |
| | | const invoiceDetailsColumns = [ |
| | |
| | | label: "出库日期", |
| | | fieldName: "esdetProductOutDate", |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: "出库单编码", |
| | | fieldName: "esdetInvoicedet1ODlinkName", |
| | | wrapText: true, |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: "产品型号", |
| | | fieldName: "esdetAssetModelNo", |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | initialWidth: 400, |
| | | initialWidth: 400 |
| | | }, |
| | | { |
| | | label: "单位", |
| | | fieldName: "esdetInvoiceUnit", |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | initialWidth: 50, |
| | | initialWidth: 50 |
| | | }, |
| | | { |
| | | label: "发票单价", |
| | |
| | | wrapText: true, |
| | | type: "number", |
| | | typeAttributes: { |
| | | minimumFractionDigits: 2, |
| | | }, |
| | | minimumFractionDigits: 2 |
| | | } |
| | | }, |
| | | { |
| | | label: "发票数量", |
| | | fieldName: "esdetInvoicedCount", |
| | | cellAttributes: { alignment: 'right' }, |
| | | cellAttributes: { alignment: "right" }, |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: "发票票面金额(元)", |
| | | fieldName: "esdetInvoicedProCostRMB", |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | cellAttributes: { alignment: 'right' }, |
| | | cellAttributes: { alignment: "right" }, |
| | | initialWidth:145, |
| | | type: "number", |
| | | typeAttributes: { |
| | | minimumFractionDigits: 2, |
| | | }, |
| | | }, |
| | | minimumFractionDigits: 2 |
| | | } |
| | | } |
| | | ]; |
| | | const invoiceColumns = [ |
| | | { |
| | |
| | | }, |
| | | { |
| | | label: "发票号", |
| | | type: 'url', |
| | | type: "url", |
| | | fieldName: "NameUrl", |
| | | typeAttributes: { |
| | | label: { fieldName: "Name" }, |
| | | label: { fieldName: "Name" } |
| | | }, |
| | | hideDefaultActions: true, |
| | | hideDefaultActions: true |
| | | }, |
| | | { |
| | | label: "客户名", |
| | | fieldName: "ShipmentAccount__c", |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: "发票状态", |
| | |
| | | hideDefaultActions: true, |
| | | type: "number", |
| | | typeAttributes: { |
| | | minimumFractionDigits: 2, |
| | | minimumFractionDigits: 2 |
| | | }, |
| | | initialWidth: 180 |
| | | }, |
| | | { |
| | | label: "发票附件", |
| | | fieldName: "Invoice_attachment__c", |
| | | type: 'boolean', |
| | | type: "boolean", |
| | | hideDefaultActions: true, |
| | | initialWidth: 120 |
| | | }, |
| | | { |
| | | label: "发票明细附件", |
| | | fieldName: "Invoicedet_attachment__c", |
| | | type: 'boolean', |
| | | type: "boolean", |
| | | hideDefaultActions: true, |
| | | initialWidth: 120 |
| | | }, |
| | | } |
| | | ]; |
| | | const detailsColumns = [ |
| | | { |
| | | label: "产品型号", |
| | | fieldName: "esdAssetModelNo", |
| | | hideDefaultActions: true, |
| | | initialWidth: 200, |
| | | wrapText: true, |
| | | initialWidth: 150, |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: "规格", |
| | | fieldName: "packingListManual", |
| | | hideDefaultActions: true, |
| | | initialWidth: 30 |
| | | initialWidth: 50 |
| | | }, |
| | | { |
| | | label: "出货单价(元)", |
| | | fieldName: "esdDeliveryListRMB", |
| | | hideDefaultActions: true, |
| | | initialWidth: 100, |
| | | type: "number", |
| | | typeAttributes: { |
| | | minimumFractionDigits: 2, |
| | | }, |
| | | minimumFractionDigits: 2 |
| | | } |
| | | }, |
| | | { |
| | | label: "出货数量", |
| | | fieldName: "esdShipmentCount", |
| | | hideDefaultActions: true, |
| | | hideDefaultActions: true |
| | | }, |
| | | { |
| | | label: "返品数量", |
| | | fieldName: "esdRrturnProCount", |
| | | hideDefaultActions: true, |
| | | hideDefaultActions: true |
| | | }, |
| | | { |
| | | label: "出库单位", |
| | | fieldName: "esdBoxPiece", |
| | | hideDefaultActions: true, |
| | | hideDefaultActions: true |
| | | }, |
| | | { |
| | | label: "已发票数量", |
| | |
| | | hideDefaultActions: true, |
| | | type: "number", |
| | | typeAttributes: { |
| | | minimumFractionDigits: 2, |
| | | }, |
| | | minimumFractionDigits: 2 |
| | | } |
| | | }, |
| | | { |
| | | label: "还没发票数量", |
| | | fieldName: "esdInvoiceProNotCount", |
| | | hideDefaultActions: true, |
| | | initialWidth: 100, |
| | | type: "number", |
| | | typeAttributes: { |
| | | minimumFractionDigits: 2, |
| | | }, |
| | | minimumFractionDigits: 2 |
| | | } |
| | | }, |
| | | { |
| | | label: "开票单位", |
| | |
| | | unitValue: { fieldName: "unitValue" }, |
| | | unitOptions: { fieldName: "unitOptions" }, |
| | | recordId: { fieldName: "recordId" }, |
| | | isDisabled: { fieldName: "isDisabled" }, |
| | | }, |
| | | isDisabled: { fieldName: "isDisabled" } |
| | | } |
| | | }, |
| | | { |
| | | label: "发票单价", |
| | |
| | | hideDefaultActions: true, |
| | | type: "number", |
| | | typeAttributes: { |
| | | minimumFractionDigits: 2, |
| | | minimumFractionDigits: 2 |
| | | }, |
| | | initialWidth: 130 |
| | | }, |
| | |
| | | //fieldName: "invoiceCount", |
| | | hideDefaultActions: true, |
| | | type: "customShipment", |
| | | cellAttributes: { alignment: 'right' }, |
| | | cellAttributes: { alignment: "right" }, |
| | | typeAttributes: { |
| | | recordId: { fieldName: "recordId" }, |
| | | shipmentNumber: { fieldName: "shipmentNumber" }, |
| | | isConinvoice: { fieldName: "isConinvoice" }, |
| | | esdInvoiceProNotCount: { fieldName: "esdInvoiceProNotCount" }, |
| | | }, |
| | | esdInvoiceProNotCount: { fieldName: "esdInvoiceProNotCount" } |
| | | } |
| | | }, |
| | | { |
| | | label: "发票票面金额(元)", |
| | | cellAttributes: { alignment: 'right' }, |
| | | cellAttributes: { alignment: "right" }, |
| | | fieldName: "invoiceAllprice", |
| | | hideDefaultActions: true, |
| | | type: "number", |
| | | initialWidth: 150, |
| | | typeAttributes: { |
| | | minimumFractionDigits: 2, |
| | | }, |
| | | }, |
| | | ] |
| | | minimumFractionDigits: 2 |
| | | } |
| | | } |
| | | ]; |
| | | const customLabel = { |
| | | LexConInvoiceViewReport |
| | | } |
| | | export default class LexConInvoiceView extends NavigationMixin(LightningElement) { |
| | | |
| | | }; |
| | | export default class LexConInvoiceView extends NavigationMixin( |
| | | LightningElement |
| | | ) { |
| | | @track label = customLabel; |
| | | invoiceColumns = invoiceColumns; |
| | | detailsColumns = detailsColumns; |
| | |
| | | label: "出库日期", |
| | | fieldName: "esdOutboundDate", |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: "出库单编码", |
| | | fieldName: "esdNameUrl", |
| | | type: 'url', |
| | | type: "url", |
| | | typeAttributes: { |
| | | label: { fieldName: "esdName" }, |
| | | target: "_blank", |
| | | target: "_blank" |
| | | }, |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | wrapText: true |
| | | } |
| | | ] |
| | | ]; |
| | | @track outboundData = []; |
| | | @track outboundDataSumPrice = []; |
| | | @track invoiceData = []; |
| | |
| | | @track detailsSelectedRows = []; |
| | | @track showAttPop = false; |
| | | |
| | | @track invoiceId = ''; |
| | | @track orderId = ''; |
| | | @track userWorkLocation = ''; |
| | | @track deliveryId = ''; |
| | | @track cocId = ''; |
| | | @track statusEdit = ''; |
| | | @track invoiceId = ""; |
| | | @track orderId = ""; |
| | | @track userWorkLocation = ""; |
| | | @track deliveryId = ""; |
| | | @track cocId = ""; |
| | | @track statusEdit = ""; |
| | | @track coc = {}; |
| | | @track EditAble = false; |
| | | @track isChange = false; |
| | | @track sumPrice = 0.00; |
| | | @track OrderCode = ''; |
| | | @track sumPrice = 0.0; |
| | | @track OrderCode = ""; |
| | | @track ExistOutbound = false; |
| | | @track reopen = ''; |
| | | @track reopen = ""; |
| | | @track invoiceOrderRecoedschange = []; |
| | | @track isNew = ''; |
| | | @track isNew = ""; |
| | | @track outOrderStringListLwc = []; |
| | | @track outordercountMapLwc = {}; |
| | | @track selectedRows = []; |
| | | @track detailsInvoiceId = ''; |
| | | @track detailsCocId = ''; |
| | | @track detailsInvoiceId = ""; |
| | | @track detailsCocId = ""; |
| | | @track detailsData = []; |
| | | @track invoiceAllprice = 0.00; |
| | | @track invoiceAllprice = 0.0; |
| | | //状态 |
| | | @track invoiceStatusValue = ''; |
| | | @track invoiceStatusValue = ""; |
| | | @track invoiceStatusOptions = []; |
| | | get Options() { |
| | | return this.invoiceStatusOptions; |
| | | } |
| | | //出库从 |
| | | @track deliveryFromDate = ''; |
| | | @track deliveryFromDate = ""; |
| | | //出库到 |
| | | @track deliveryToDate = ''; |
| | | @track deliveryToDate = ""; |
| | | //发票号 |
| | | @track category1 = ''; |
| | | @track category1 = ""; |
| | | //客户名 |
| | | @track category2 = ''; |
| | | @track ConInvoiceListAccountId = ''; |
| | | @track ConInvoiceListUserWorkLocation = ''; |
| | | @track ConInvoiceListAgencyProType = ''; |
| | | @track category2 = ""; |
| | | @track ConInvoiceListAccountId = ""; |
| | | @track ConInvoiceListUserWorkLocation = ""; |
| | | @track ConInvoiceListAgencyProType = ""; |
| | | |
| | | //二级经销商 |
| | | @track provinceOptsMap = []; |
| | | @track secondaryDistributor = ''; |
| | | @track secondaryDistributor = ""; |
| | | //客户名 |
| | | @track isModalOpen = false; |
| | | @track HospitalName = ""; |
| | | @track HospitalInfo = ""; |
| | | @track searchHospitalName = ""; |
| | | @track isDisabledHospitalName = false; |
| | | @track agencyProType = ''; |
| | | @track accountid = ''; |
| | | @track agencyProType = ""; |
| | | @track accountid = ""; |
| | | @track hospitalList = []; |
| | | hospitalColumns = hospitalColumns; |
| | | //发票日期 |
| | | @track InvoiceDate = ''; |
| | | @track InvoiceDate = ""; |
| | | //科室 |
| | | @track ForCustomerText = ''; |
| | | @track ForCustomerText = ""; |
| | | //备注 |
| | | @track InvoiceNote = ''; |
| | | @track InvoiceNote = ""; |
| | | |
| | | //发票明细 |
| | | @track invoiceOrderdetail1Recoeds = []; |
| | |
| | | fieldName: "url", |
| | | type: "url", |
| | | typeAttributes: { label: { fieldName: "Title" }, target: "_blank" }, |
| | | hideDefaultActions: true, |
| | | hideDefaultActions: true |
| | | }, |
| | | { |
| | | label: "创建人", |
| | | type: "url", |
| | | fieldName: "CreatedByNameUrl", |
| | | typeAttributes: { label: { fieldName: "CreatedByName" }, target: "_blank" }, |
| | | hideDefaultActions: true, |
| | | typeAttributes: { |
| | | label: { fieldName: "CreatedByName" }, |
| | | target: "_blank" |
| | | }, |
| | | hideDefaultActions: true |
| | | }, |
| | | { |
| | | label: "上传日期", |
| | | type: 'date', |
| | | type: "date", |
| | | typeAttributes: { |
| | | year: "numeric", |
| | | month: "long", |
| | |
| | | minute: "2-digit" |
| | | }, |
| | | fieldName: "CreatedDate", |
| | | hideDefaultActions: true, |
| | | hideDefaultActions: true |
| | | }, |
| | | { |
| | | label: "附件类型", |
| | |
| | | typeValue: { fieldName: "typeValue" }, |
| | | typeOptions: { fieldName: "typeOptions" }, |
| | | recordId: { fieldName: "recordId" }, |
| | | isDisabledAttachment: { fieldName: "isDisabledAttachment" }, |
| | | isDisabledAttachment: { fieldName: "isDisabledAttachment" } |
| | | }, |
| | | hideDefaultActions: true, |
| | | hideDefaultActions: true |
| | | }, |
| | | { |
| | | label: '', |
| | | type: 'tableCellIcon', |
| | | label: "", |
| | | type: "tableCellIcon", |
| | | typeAttributes: { |
| | | iconName: 'utility:delete', |
| | | iconName: "utility:delete", |
| | | recordId: { |
| | | fieldName: 'Id' |
| | | fieldName: "Id" |
| | | } |
| | | }, |
| | | initialWidth: 50, |
| | | hideDefaultActions: true |
| | | }, |
| | | } |
| | | ]; |
| | | filesUploaded = []; |
| | | fileContents; |
| | |
| | | this.reopen = this.reopen == null ? "" : this.reopen; |
| | | this.isNew = this.getQueryString("isNew"); |
| | | this.isNew = this.isNew == null ? "" : this.isNew; |
| | | console.log('this.deliveryId = ' + this.deliveryId + ' this.invoiceId = ' + this.invoiceId + ' this.statusEdit = ' + this.statusEdit); |
| | | if (this.invoiceId != '' && this.orderId != '') { |
| | | console.log( |
| | | "this.deliveryId = " + |
| | | this.deliveryId + |
| | | " this.invoiceId = " + |
| | | this.invoiceId + |
| | | " this.statusEdit = " + |
| | | this.statusEdit |
| | | ); |
| | | if (this.invoiceId != "" && this.orderId != "") { |
| | | //进入coninvoiceDetails |
| | | detailsInit({ |
| | | orderIdLwc: this.orderId, |
| | | invoiceIdLwc: this.invoiceId |
| | | }).then((r) => { |
| | | }) |
| | | .then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | if (r.status == "Success") { |
| | | this.detailsInvoiceId = r.entity.invoicecode.Id; |
| | | this.detailsCocId = r.entity.coc.Id; |
| | | this.detailsData = r.entity.consumableorderdetails1Records; |
| | | for (var i in this.detailsData) { |
| | | this.detailsData[i]['Id'] = this.detailsData[i].esd.Id; |
| | | this.detailsData[i]["Id"] = this.detailsData[i].esd.Id; |
| | | |
| | | this.detailsData[i]['esdAssetModelNo'] = this.detailsData[i].esd.Asset_Model_No__c; |
| | | this.detailsData[i]['packingListManual'] = this.detailsData[i].Packing_list_manual; |
| | | this.detailsData[i]['esdDeliveryListRMB'] = this.detailsData[i].esd.Delivery_List_RMB__c; |
| | | this.detailsData[i]['esdShipmentCount'] = this.detailsData[i].esd.Shipment_Count__c; |
| | | this.detailsData[i]['esdRrturnProCount'] = this.detailsData[i].esd.RrturnPro_count__c; |
| | | this.detailsData[i]['esdBoxPiece'] = this.detailsData[i].esd.Box_Piece__c; |
| | | this.detailsData[i]["esdAssetModelNo"] = |
| | | this.detailsData[i].esd.Asset_Model_No__c; |
| | | this.detailsData[i]["packingListManual"] = |
| | | this.detailsData[i].Packing_list_manual; |
| | | this.detailsData[i]["esdDeliveryListRMB"] = |
| | | this.detailsData[i].esd.Delivery_List_RMB__c; |
| | | this.detailsData[i]["esdShipmentCount"] = |
| | | this.detailsData[i].esd.Shipment_Count__c; |
| | | this.detailsData[i]["esdRrturnProCount"] = |
| | | this.detailsData[i].esd.RrturnPro_count__c; |
| | | this.detailsData[i]["esdBoxPiece"] = |
| | | this.detailsData[i].esd.Box_Piece__c; |
| | | |
| | | this.detailsData[i]['esdInvoicedProcount'] = this.detailsData[i].esd.Invoiced_Procount__c; |
| | | this.detailsData[i]['esdInvoiceProNotCount'] = this.detailsData[i].esd.InvoiceProNot_count__c; |
| | | this.detailsData[i]["esdInvoicedProcount"] = |
| | | this.detailsData[i].esd.Invoiced_Procount__c; |
| | | this.detailsData[i]["esdInvoiceProNotCount"] = |
| | | this.detailsData[i].esd.InvoiceProNot_count__c; |
| | | //开票单位 |
| | | //this.detailsData[i].esd.Box_Piece__c |
| | | //this.detailsData[i]['unitValue'] = this.detailsData[i].esd.Invoice_Unit__c; |
| | | this.detailsData[i]['unitValue'] = this.detailsData[i].esd.Box_Piece__c; |
| | | console.log('unitValue = ' + this.detailsData[i]['unitValue']); |
| | | this.detailsData[i]['recordId'] = this.detailsData[i].esd.Id; |
| | | this.detailsData[i]["unitValue"] = |
| | | this.detailsData[i].esd.Box_Piece__c; |
| | | console.log("unitValue = " + this.detailsData[i]["unitValue"]); |
| | | this.detailsData[i]["recordId"] = this.detailsData[i].esd.Id; |
| | | //disabled="{!IF(records.esd.Box_Piece__c =='个' || (records.esd.Box_Piece__c =='盒' && records.Packing_list_manual ==1),true,false)}" |
| | | //this.detailsData[i]['isDisabled'] = (this.detailsData[i].esd.Box_Piece__c == '个' || (this.detailsData[i].esd.Box_Piece__c =='盒' && this.detailsData[i].Packing_list_manual ==1)) ? true:false; |
| | | this.detailsData[i]['isDisabled'] = true; |
| | | this.detailsData[i]["isDisabled"] = true; |
| | | let unitOptions = []; |
| | | for (var key in this.detailsData[i].Invoice_UnitOptsMap) { |
| | | let unitOption = {}; |
| | | unitOption["label"] = this.detailsData[i].Invoice_UnitOptsMap[key]; |
| | | unitOption["label"] = |
| | | this.detailsData[i].Invoice_UnitOptsMap[key]; |
| | | unitOption["value"] = key; |
| | | unitOptions.push(unitOption); |
| | | } |
| | | this.detailsData[i]["unitOptions"] = unitOptions; |
| | | this.detailsData[i]['esdInvoiceUnitprice'] = this.detailsData[i].esd.Invoice_Unitprice__c; |
| | | this.detailsData[i]["esdInvoiceUnitprice"] = |
| | | this.detailsData[i].esd.Invoice_Unitprice__c; |
| | | //发票数量 |
| | | this.detailsData[i]['shipmentNumber'] = this.detailsData[i].invoiceCount; |
| | | this.detailsData[i]['isConinvoice'] = true; |
| | | this.detailsData[i]['invoiceAllprice'] = this.detailsData[i].invoiceAllprice; |
| | | this.detailsData[i]["shipmentNumber"] = |
| | | this.detailsData[i].invoiceCount; |
| | | this.detailsData[i]["isConinvoice"] = true; |
| | | this.detailsData[i]["invoiceAllprice"] = |
| | | this.detailsData[i].invoiceAllprice; |
| | | |
| | | if (this.detailsData[i].check) { |
| | | this.detailsSelectedRows.push(this.detailsData[i]['Id']); |
| | | this.invoiceAllprice += this.detailsData[i]['invoiceAllprice']; |
| | | this.detailsSelectedRows.push(this.detailsData[i]["Id"]); |
| | | this.invoiceAllprice += this.detailsData[i]["invoiceAllprice"]; |
| | | } |
| | | } |
| | | |
| | | console.log('this.detailsData = ' + JSON.stringify(this.detailsData)); |
| | | console.log( |
| | | "this.detailsData = " + JSON.stringify(this.detailsData) |
| | | ); |
| | | |
| | | let lastInvoiceAllprice = { |
| | | invoiceAllprice: this.invoiceAllprice |
| | | } |
| | | }; |
| | | this.invoiceAllpriceData.push(lastInvoiceAllprice); |
| | | console.log('this.invoiceAllpriceData = ' + JSON.stringify(this.invoiceAllpriceData)) |
| | | console.log( |
| | | "this.invoiceAllpriceData = " + |
| | | JSON.stringify(this.invoiceAllpriceData) |
| | | ); |
| | | |
| | | this.isShowSpinner = false; |
| | | this.isDetailsShow = true; |
| | | } else { |
| | | this.showMyToast('初始化失败', r.msg, 'Error'); |
| | | this.showMyToast("初始化失败", r.msg, "Error"); |
| | | } |
| | | }).catch((error) => { |
| | | }) |
| | | .catch((error) => { |
| | | this.isShowSpinner = false; |
| | | console.log("error = " + JSON.stringify(error)); |
| | | }); |
| | | } else if (this.deliveryId == '' && this.invoiceId == '' && this.isNew == '') { |
| | | console.log('conInvoiceListInit'); |
| | | conInvoiceListInit().then((r) => { |
| | | } else if ( |
| | | this.deliveryId == "" && |
| | | this.invoiceId == "" && |
| | | this.isNew == "" |
| | | ) { |
| | | console.log("conInvoiceListInit"); |
| | | conInvoiceListInit() |
| | | .then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | console.log("conInvoiceListInit r = " + JSON.stringify(r)); |
| | | if (r.status == "Success") { |
| | |
| | | this.isOpenReportDisabled = false; |
| | | this.invoiceData = r.entity.raesList; |
| | | for (var i in this.invoiceData) { |
| | | this.invoiceData[i]['NameUrl'] = '/lexconinvoiceview?invoiceId=' + this.invoiceData[i].Id; |
| | | this.invoiceData[i]["NameUrl"] = |
| | | "/lexconinvoiceview?invoiceId=" + this.invoiceData[i].Id; |
| | | } |
| | | console.log("this.invoiceData = " + JSON.stringify(this.invoiceData)); |
| | | console.log( |
| | | "this.invoiceData = " + JSON.stringify(this.invoiceData) |
| | | ); |
| | | for (var key in r.entity.statusMap) { |
| | | let object = {}; |
| | | object["label"] = key; |
| | |
| | | this.invoiceStatusOptions.push(object); |
| | | } |
| | | this.invoiceStatusOptions = [...this.invoiceStatusOptions]; |
| | | console.log("this.invoiceStatusOptions = " + JSON.stringify(this.invoiceStatusOptions)); |
| | | console.log( |
| | | "this.invoiceStatusOptions = " + |
| | | JSON.stringify(this.invoiceStatusOptions) |
| | | ); |
| | | this.isShowSpinner = false; |
| | | } else { |
| | | this.showMyToast('初始化失败', r.msg, 'Error'); |
| | | this.showMyToast("初始化失败", r.msg, "Error"); |
| | | } |
| | | }).catch((error) => { |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error = " + JSON.stringify(error)); |
| | | }); |
| | | |
| | | } else { |
| | | console.log('init'); |
| | | console.log("init"); |
| | | this.isConInvoiceList = false; |
| | | init({ |
| | | invoiceId: this.invoiceId, |
| | | statusEdit: this.statusEdit, |
| | | deliveryId: this.deliveryId |
| | | }).then((r) => { |
| | | }) |
| | | .then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | console.log("r = " + JSON.stringify(r)); |
| | | if (r.status == "Success") { |
| | |
| | | this.isChange = r.entity.isChange; |
| | | this.ExistOutbound = r.entity.ExistOutbound; |
| | | this.outboundData = r.entity.invoiceOrderRecoeds; |
| | | console.log('this.outboundData = ' + JSON.stringify(this.outboundData)) |
| | | console.log( |
| | | "this.outboundData = " + JSON.stringify(this.outboundData) |
| | | ); |
| | | this.done = r.entity.done; |
| | | this.accountid = r.entity.accountid; |
| | | this.userWorkLocation = r.entity.userWorkLocation; |
| | | this.outOrderStringListLwc = r.entity.outOrderStringList; |
| | | this.outordercountMapLwc = r.entity.outordercountMap; |
| | | this.invoiceOrderRecoedschange = r.entity.invoiceOrderRecoedschange; |
| | | this.isDisabledEdit = (this.coc.Invoice_status__c == '提交' || this.coc.Invoice_status__c == '已完成') ? true : false; |
| | | this.isDisabledReopen = this.coc.Invoice_status__c == '提交' ? false : true; |
| | | this.isDisabledDelete = this.coc.Invoice_status__c == '草案中' ? false : true; |
| | | this.isDisabledAttachment = this.coc.Invoice_status__c == '已完成' ? true : false; |
| | | this.isDisabledEdit = |
| | | this.coc.Invoice_status__c == "提交" || |
| | | this.coc.Invoice_status__c == "已完成" |
| | | ? true |
| | | : false; |
| | | this.isDisabledReopen = |
| | | this.coc.Invoice_status__c == "提交" ? false : true; |
| | | this.isDisabledDelete = |
| | | this.coc.Invoice_status__c == "草案中" ? false : true; |
| | | this.isDisabledAttachment = |
| | | this.coc.Invoice_status__c == "已完成" ? true : false; |
| | | this.OrderCode = this.coc.Name; |
| | | this.InvoiceDate = this.coc.Invoice_Date__c; |
| | | |
| | |
| | | this.selectedRows.push(this.outboundData[i].esd.Id); |
| | | } |
| | | this.selectedRows = [...this.selectedRows]; |
| | | console.log('r.entity.attachmentRecoeds = ' + JSON.stringify(r.entity.attachmentRecoeds)) |
| | | console.log( |
| | | "r.entity.attachmentRecoeds = " + |
| | | JSON.stringify(r.entity.attachmentRecoeds) |
| | | ); |
| | | if (!this.EditAble) { |
| | | //附件显示 |
| | | this.showLoadingSpinner = true; |
| | |
| | | this.fileData[i]["recordId"] = this.fileData[i].cvInfo.Id; |
| | | this.fileData[i]["url"] = "/" + this.fileData[i].cvInfo.Id; |
| | | this.fileData[i]["Title"] = this.fileData[i].cvInfo.Title; |
| | | this.fileData[i]["CreatedByName"] = this.fileData[i].cvInfo.Owner.Name; |
| | | this.fileData[i]["CreatedByNameUrl"] = "/" + this.fileData[i].cvInfo.OwnerId;; |
| | | this.fileData[i]["CreatedDate"] = this.fileData[i].cvInfo.CreatedDate; |
| | | this.fileData[i]["attUrl"] = '/' + this.fileData[i].cvInfo.Id; |
| | | this.fileData[i]['downloadUrl'] = '/sfc/servlet.shepherd/document/download/' + this.fileData[i].cvInfo.ContentDocumentId + '?operationContext=S1'; |
| | | this.fileData[i]["CreatedByName"] = |
| | | this.fileData[i].cvInfo.Owner.Name; |
| | | this.fileData[i]["CreatedByNameUrl"] = |
| | | "/" + this.fileData[i].cvInfo.OwnerId; |
| | | this.fileData[i]["CreatedDate"] = |
| | | this.fileData[i].cvInfo.CreatedDate; |
| | | this.fileData[i]["attUrl"] = "/" + this.fileData[i].cvInfo.Id; |
| | | this.fileData[i]["downloadUrl"] = |
| | | "/sfc/servlet.shepherd/document/download/" + |
| | | this.fileData[i].cvInfo.ContentDocumentId + |
| | | "?operationContext=S1"; |
| | | if (this.isDisabledAttachment) { |
| | | console.log('进入this.isDisabledAttachment') |
| | | console.log("进入this.isDisabledAttachment"); |
| | | this.fileData[i]["isDisabledAttachment"] = true; |
| | | } |
| | | let typeOptions = []; |
| | |
| | | typeOption["value"] = key; |
| | | typeOptions.push(typeOption); |
| | | } |
| | | this.fileData[i]["typeValue"] = this.fileData[i].mailSelectOptsin == null ? typeOptions[0].value : this.fileData[i].mailSelectOptsin; |
| | | this.fileData[i]["typeValue"] = |
| | | this.fileData[i].mailSelectOptsin == null |
| | | ? typeOptions[0].value |
| | | : this.fileData[i].mailSelectOptsin; |
| | | this.fileData[i]["typeOptions"] = typeOptions; |
| | | this.fileData[i]["mailSelectOptsin"] = this.fileData[i].mailSelectOptsin == null ? typeOptions[0].value : this.fileData[i].mailSelectOptsin; |
| | | this.fileData[i]["mailSelectOptsin"] = |
| | | this.fileData[i].mailSelectOptsin == null |
| | | ? typeOptions[0].value |
| | | : this.fileData[i].mailSelectOptsin; |
| | | } |
| | | console.log('this.fileData = ' + JSON.stringify(this.fileData)) |
| | | console.log("this.fileData = " + JSON.stringify(this.fileData)); |
| | | } |
| | | |
| | | //发票明细 |
| | | this.invoiceOrderdetail1Recoeds = r.entity.invoiceOrderdetail1Recoeds; |
| | | this.invoiceOrderdetail1Recoeds = |
| | | r.entity.invoiceOrderdetail1Recoeds; |
| | | for (var i in this.invoiceOrderdetail1Recoeds) { |
| | | this.invoiceOrderdetail1Recoeds[i]['esdetProductOutDate'] = this.invoiceOrderdetail1Recoeds[i].esdet.Product_OutDate__c; |
| | | this.invoiceOrderdetail1Recoeds[i]['esdetInvoicedet1ODlinkName'] = this.invoiceOrderdetail1Recoeds[i].esdet.Invoicedet1_OD_link__r.Name; |
| | | this.invoiceOrderdetail1Recoeds[i]['esdetAssetModelNo'] = this.invoiceOrderdetail1Recoeds[i].esdet.Asset_Model_No__c; |
| | | this.invoiceOrderdetail1Recoeds[i]['esdetInvoiceUnit'] = this.invoiceOrderdetail1Recoeds[i].esdet.Invoice_Unit__c; |
| | | this.invoiceOrderdetail1Recoeds[i]['esdetInvoiceUnitprice'] = this.invoiceOrderdetail1Recoeds[i].esdet.Invoice_Unitprice__c; |
| | | this.invoiceOrderdetail1Recoeds[i]['esdetInvoicedCount'] = this.invoiceOrderdetail1Recoeds[i].esdet.Invoiced_Count__c; |
| | | this.invoiceOrderdetail1Recoeds[i]['esdetInvoicedProCostRMB'] = this.invoiceOrderdetail1Recoeds[i].esdet.InvoicedProCost_RMB__c; |
| | | this.invoiceOrderdetail1Recoeds[i]["esdetProductOutDate"] = |
| | | this.invoiceOrderdetail1Recoeds[i].esdet.Product_OutDate__c; |
| | | this.invoiceOrderdetail1Recoeds[i]["esdetInvoicedet1ODlinkName"] = |
| | | this.invoiceOrderdetail1Recoeds[ |
| | | i |
| | | ].esdet.Invoicedet1_OD_link__r.Name; |
| | | this.invoiceOrderdetail1Recoeds[i]["esdetAssetModelNo"] = |
| | | this.invoiceOrderdetail1Recoeds[i].esdet.Asset_Model_No__c; |
| | | this.invoiceOrderdetail1Recoeds[i]["esdetInvoiceUnit"] = |
| | | this.invoiceOrderdetail1Recoeds[i].esdet.Invoice_Unit__c; |
| | | this.invoiceOrderdetail1Recoeds[i]["esdetInvoiceUnitprice"] = |
| | | this.invoiceOrderdetail1Recoeds[i].esdet.Invoice_Unitprice__c; |
| | | this.invoiceOrderdetail1Recoeds[i]["esdetInvoicedCount"] = |
| | | this.invoiceOrderdetail1Recoeds[i].esdet.Invoiced_Count__c; |
| | | this.invoiceOrderdetail1Recoeds[i]["esdetInvoicedProCostRMB"] = |
| | | this.invoiceOrderdetail1Recoeds[i].esdet.InvoicedProCost_RMB__c; |
| | | } |
| | | //客户名 |
| | | this.HospitalName = r.entity.HospitalName; |
| | |
| | | } |
| | | //出货一览columns |
| | | |
| | | |
| | | if (this.EditAble) { |
| | | let object1 = { |
| | | label: '客户名', |
| | | label: "客户名", |
| | | fieldName: "hospitalName", |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | wrapText: true |
| | | }; |
| | | let object2 = { |
| | | label: '出货金额(元)', |
| | | label: "出货金额(元)", |
| | | fieldName: "shipmentAmount", |
| | | type: "number", |
| | | typeAttributes: { |
| | | minimumFractionDigits: 2, |
| | | minimumFractionDigits: 2 |
| | | }, |
| | | hideDefaultActions: true, |
| | | hideDefaultActions: true |
| | | }; |
| | | let object3 = { |
| | | label: '返品金额(元)', |
| | | label: "返品金额(元)", |
| | | fieldName: "returnAmount", |
| | | type: "number", |
| | | typeAttributes: { |
| | | minimumFractionDigits: 2, |
| | | minimumFractionDigits: 2 |
| | | }, |
| | | hideDefaultActions: true, |
| | | hideDefaultActions: true |
| | | }; |
| | | this.outboundColumns.push(object1) |
| | | this.outboundColumns.push(object2) |
| | | this.outboundColumns.push(object3) |
| | | this.outboundColumns.push(object1); |
| | | this.outboundColumns.push(object2); |
| | | this.outboundColumns.push(object3); |
| | | } |
| | | let object4 = { |
| | | label: '未发票金额(元)', |
| | | label: "未发票金额(元)", |
| | | fieldName: "uninvoicedAmount", |
| | | type: "number", |
| | | typeAttributes: { |
| | | minimumFractionDigits: 2, |
| | | minimumFractionDigits: 2 |
| | | }, |
| | | hideDefaultActions: true, |
| | | hideDefaultActions: true |
| | | }; |
| | | this.outboundColumns.push(object4) |
| | | this.outboundColumns.push(object4); |
| | | |
| | | //出货一览Data |
| | | let index = 0; |
| | | for (var i in this.outboundData) { |
| | | this.outboundData[i]['esdOutboundDate'] = this.outboundData[i].esd.Outbound_Date__c; |
| | | this.outboundData[i]['esdNameUrl'] = '/s/lexsummonscreat?ESetid=' + this.outboundData[i].esd.Id; |
| | | this.outboundData[i]['esdName'] = this.outboundData[i].esd.Name; |
| | | this.outboundData[i]["esdOutboundDate"] = |
| | | this.outboundData[i].esd.Outbound_Date__c; |
| | | this.outboundData[i]["esdNameUrl"] = |
| | | "/s/lexsummonscreat?ESetid=" + this.outboundData[i].esd.Id; |
| | | this.outboundData[i]["esdName"] = this.outboundData[i].esd.Name; |
| | | if (this.EditAble) { |
| | | this.outboundData[i]['hospitalName'] = this.outboundData[i].esd.ShipmentAccount__c; |
| | | this.outboundData[i]['shipmentAmount'] = this.outboundData[i].esd.Shipment_total_amount__c; |
| | | this.outboundData[i]['returnAmount'] = this.outboundData[i].esd.RrturnPro_total_amount__c; |
| | | this.outboundData[i]["hospitalName"] = |
| | | this.outboundData[i].esd.ShipmentAccount__c; |
| | | this.outboundData[i]["shipmentAmount"] = |
| | | this.outboundData[i].esd.Shipment_total_amount__c; |
| | | this.outboundData[i]["returnAmount"] = |
| | | this.outboundData[i].esd.RrturnPro_total_amount__c; |
| | | } |
| | | this.outboundData[i]['uninvoicedAmount'] = this.outboundData[i].esd.InvoiceNotPro_money__c; |
| | | this.outboundData[i]['invoiceFaceAmount'] = this.keepTwoDecimalStr(this.outboundData[i].needInvoiceCount); |
| | | if (!(this.outboundData[i].esd.Billed_Status__c == '全部开票' || this.EditAble || this.coc.Invoice_status__c != '草案中')) { |
| | | console.log('进入 if') |
| | | let url = "/lexconinvoiceview?orderId=" + this.outboundData[i].esd.Id + "&invoiceId=" + this.invoiceId; |
| | | this.outboundData[i]['invoiceFaceAmountUrl'] = url; |
| | | this.outboundData[i]["uninvoicedAmount"] = |
| | | this.outboundData[i].esd.InvoiceNotPro_money__c; |
| | | this.outboundData[i]["invoiceFaceAmount"] = |
| | | this.keepTwoDecimalStr(this.outboundData[i].needInvoiceCount); |
| | | if ( |
| | | !( |
| | | this.outboundData[i].esd.Billed_Status__c == "全部开票" || |
| | | this.EditAble || |
| | | this.coc.Invoice_status__c != "草案中" |
| | | ) |
| | | ) { |
| | | console.log("进入 if"); |
| | | let url = |
| | | "/lexconinvoiceview?orderId=" + |
| | | this.outboundData[i].esd.Id + |
| | | "&invoiceId=" + |
| | | this.invoiceId; |
| | | this.outboundData[i]["invoiceFaceAmountUrl"] = url; |
| | | if (index == 0) { |
| | | let object5 = { |
| | | label: '发票票面金额(元)', |
| | | cellAttributes: { alignment: 'right' }, |
| | | type: 'url', |
| | | label: "发票票面金额(元)", |
| | | cellAttributes: { alignment: "right" }, |
| | | type: "url", |
| | | fieldName: "invoiceFaceAmountUrl", |
| | | typeAttributes: { |
| | | label: { fieldName: "invoiceFaceAmount" }, |
| | | label: { |
| | | fieldName: "invoiceFaceAmount" |
| | | } |
| | | //target: "_blank", |
| | | }, |
| | | hideDefaultActions: true, |
| | | hideDefaultActions: true |
| | | }; |
| | | this.outboundColumns.push(object5) |
| | | this.outboundColumns.push(object5); |
| | | index++; |
| | | } |
| | | } else { |
| | | console.log('进入 else') |
| | | console.log("进入 else"); |
| | | if (index == 0) { |
| | | let object5 = { |
| | | label: '发票票面金额(元)', |
| | | cellAttributes: { alignment: 'right' }, |
| | | label: "发票票面金额(元)", |
| | | cellAttributes: { alignment: "right" }, |
| | | fieldName: "invoiceFaceAmount", |
| | | hideDefaultActions: true, |
| | | type: "number", |
| | | typeAttributes: { |
| | | minimumFractionDigits: 2, |
| | | }, |
| | | minimumFractionDigits: 2 |
| | | } |
| | | }; |
| | | this.outboundColumns.push(object5) |
| | | this.outboundColumns.push(object5); |
| | | index++; |
| | | } |
| | | } |
| | |
| | | //四舍五入 |
| | | //this.sumPrice = this.sumPrice.toFixed(2); |
| | | //如果不四舍五入 |
| | | console.log('start keepTwoDecimalStr') |
| | | console.log("start keepTwoDecimalStr"); |
| | | this.sumPrice = this.keepTwoDecimalStr(this.sumPrice); |
| | | console.log('end keepTwoDecimalStr = ' + this.sumPrice) |
| | | console.log("end keepTwoDecimalStr = " + this.sumPrice); |
| | | //加最后一行显示金额 |
| | | if (this.EditAble) { |
| | | let lastOutboundData = { |
| | | invoiceFaceAmount: this.sumPrice |
| | | } |
| | | }; |
| | | this.outboundDataSumPrice.push(lastOutboundData); |
| | | } |
| | | this.outboundColumns = [...this.outboundColumns]; |
| | | |
| | | |
| | | this.isEditInvoice = !(!this.EditAble || this.isChange); |
| | | if (this.coc.SummonsForDirction__c == '销售给二级经销商') |
| | | if (this.coc.SummonsForDirction__c == "销售给二级经销商") |
| | | this.isShowSecondaryDistributor = true; |
| | | if (this.deliveryId == '' && !this.ExistOutbound && this.EditAble) |
| | | if (this.deliveryId == "" && !this.ExistOutbound && this.EditAble) |
| | | this.hideCheckbox = false; |
| | | this.isShowSpinner = false; |
| | | this.showLoadingSpinner = false; |
| | | } else { |
| | | this.showMyToast('失败', r.msg, 'Error'); |
| | | this.showMyToast("失败", r.msg, "Error"); |
| | | } |
| | | }).catch((error) => { |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error = " + JSON.stringify(error)); |
| | | }); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | //上传配置单 |
| | | uploadOrder(event) { |
| | |
| | | if (event.target.files.length > 0) { |
| | | this.filesUploaded = event.target.files; |
| | | this.fileName = event.target.files[0].name; |
| | | console.log('this.fileName:' + this.fileName); |
| | | console.log("this.fileName:" + this.fileName); |
| | | } |
| | | } |
| | | |
| | | //移除附件 |
| | | removeAtt() { |
| | | this.filesUploaded = []; |
| | | this.fileName = ''; |
| | | this.fileName = ""; |
| | | } |
| | | |
| | | //是否显示附件移除 |
| | | get attDelBtn() { |
| | | if (this.fileName != '' && this.fileName != null && this.fileName != '选择一个文件上传') { |
| | | if ( |
| | | this.fileName != "" && |
| | | this.fileName != null && |
| | | this.fileName != "选择一个文件上传" |
| | | ) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | |
| | | keepTwoDecimalStr(num) { |
| | | const result = Number(num.toString().match(/^\d+(?:\.\d{0,2})?/)); |
| | | let s = result.toString(); |
| | | let rs = s.indexOf('.'); |
| | | let rs = s.indexOf("."); |
| | | if (rs < 0) { |
| | | rs = s.length; |
| | | s += '.'; |
| | | s += "."; |
| | | } |
| | | while (s.length <= rs + 2) { |
| | | s += '0'; |
| | | s += "0"; |
| | | } |
| | | return s; |
| | | }; |
| | | } |
| | | |
| | | dataChange(event) { |
| | | let fieldName = event.target.getAttribute("data-field"); |
| | |
| | | switch (fieldName) { |
| | | case "OrderCode": |
| | | this.OrderCode = value; |
| | | this.coc['Name'] = value; |
| | | this.coc["Name"] = value; |
| | | break; |
| | | case "ForCustomerText": |
| | | this.ForCustomerText = value; |
| | | this.coc['Order_ForCustomerText__c'] = value; |
| | | this.coc["Order_ForCustomerText__c"] = value; |
| | | break; |
| | | case "InvoiceDate": |
| | | this.InvoiceDate = value; |
| | | this.coc['Invoice_Date__c'] = value; |
| | | this.coc["Invoice_Date__c"] = value; |
| | | break; |
| | | case "secondaryDistributor": |
| | | this.secondaryDistributor = value; |
| | |
| | | break; |
| | | case "InvoiceNote": |
| | | this.InvoiceNote = value; |
| | | this.coc['Invoice_Note__c'] = value; |
| | | this.coc["Invoice_Note__c"] = value; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | invoiceDateChange(event) { |
| | | this.InvoiceDate = event.detail.value; |
| | | this.coc['Invoice_Date__c'] = event.detail.value; |
| | | console.log('this.InvoiceDate = ' + this.InvoiceDate); |
| | | this.coc["Invoice_Date__c"] = event.detail.value; |
| | | console.log("this.InvoiceDate = " + this.InvoiceDate); |
| | | } |
| | | |
| | | //搜索客户名 |
| | | searchHospitalNameModal() { |
| | | console.log("searchHospitalNameModal"); |
| | | hospitalInit({ |
| | | ctype: this.agencyProType, |
| | | ctype: this.agencyProType |
| | | }).then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | if (r.status == "Success") { |
| | | this.hospitalList = r.entity.at; |
| | | for (var i in this.hospitalList) { |
| | | this.hospitalList[i]["stateMasterName"] = this.hospitalList[i].State_Master__r.Name; |
| | | this.hospitalList[i]["stateMasterName"] = |
| | | this.hospitalList[i].State_Master__r.Name; |
| | | } |
| | | console.log("hospitalInit r = " + JSON.stringify(this.hospitalList)); |
| | | this.isModalOpen = true; |
| | |
| | | console.log("this.searchHospitalName = " + this.searchHospitalName); |
| | | serContact({ |
| | | searchName: this.searchHospitalName, |
| | | ctype: this.agencyProType, |
| | | ctype: this.agencyProType |
| | | }).then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | if (r.status == "Success") { |
| | |
| | | let row = event.detail.row; |
| | | this.HospitalInfo = row.Id; |
| | | this.HospitalName = row.Name; |
| | | console.log("this.HospitalInfo = " + this.HospitalInfo + " this.HospitalName = " + this.HospitalName); |
| | | console.log( |
| | | "this.HospitalInfo = " + |
| | | this.HospitalInfo + |
| | | " this.HospitalName = " + |
| | | this.HospitalName |
| | | ); |
| | | this.isModalOpen = false; |
| | | } |
| | | |
| | |
| | | |
| | | SaveJs() { |
| | | this.isShowSpinner = true; |
| | | let cloneData = this.outboundData |
| | | let cloneData = this.outboundData; |
| | | |
| | | debugger |
| | | const selectedRows = this.template.querySelector("[data-field='outbound']").getSelectedRows(); |
| | | console.log('selectedRows = ' + JSON.stringify(selectedRows)); |
| | | debugger; |
| | | const selectedRows = this.template |
| | | .querySelector("[data-field='outbound']") |
| | | .getSelectedRows(); |
| | | console.log("selectedRows = " + JSON.stringify(selectedRows)); |
| | | |
| | | for (var i in cloneData) { |
| | | let b = false; |
| | |
| | | delete cloneData[i].invoiceFaceAmountUrl; |
| | | } |
| | | |
| | | console.log('this.coc = ' + JSON.stringify(this.coc)); |
| | | console.log('this.HospitalName = ' + this.HospitalName); |
| | | console.log('this.HospitalInfo = ' + this.HospitalInfo); |
| | | console.log('this.secondaryDistributor = ' + this.secondaryDistributor); |
| | | console.log('this.outboundData = ' + JSON.stringify(cloneData)); |
| | | console.log('this.deliveryId = ' + this.deliveryId); |
| | | console.log('this.invoiceId = ' + this.invoiceId); |
| | | console.log('this.accountid = ' + this.accountid); |
| | | console.log('this.agencyProType = ' + this.agencyProType); |
| | | console.log('this.reopen = ' + this.reopen); |
| | | console.log('this.invoiceOrderRecoedschangeLwc = ' + JSON.stringify(this.invoiceOrderRecoedschange)); |
| | | console.log("this.coc = " + JSON.stringify(this.coc)); |
| | | console.log("this.HospitalName = " + this.HospitalName); |
| | | console.log("this.HospitalInfo = " + this.HospitalInfo); |
| | | console.log("this.secondaryDistributor = " + this.secondaryDistributor); |
| | | console.log("this.outboundData = " + JSON.stringify(cloneData)); |
| | | console.log("this.deliveryId = " + this.deliveryId); |
| | | console.log("this.invoiceId = " + this.invoiceId); |
| | | console.log("this.accountid = " + this.accountid); |
| | | console.log("this.agencyProType = " + this.agencyProType); |
| | | console.log("this.reopen = " + this.reopen); |
| | | console.log( |
| | | "this.invoiceOrderRecoedschangeLwc = " + |
| | | JSON.stringify(this.invoiceOrderRecoedschange) |
| | | ); |
| | | save({ |
| | | cocLwc: this.coc, |
| | | HospitalNameLwc: this.HospitalName, |
| | |
| | | accountidLwc: this.accountid, |
| | | agencyProTypeLwc: this.agencyProType, |
| | | reopenLwc: this.reopen, |
| | | invoiceOrderRecoedschangeLwc: JSON.stringify(this.invoiceOrderRecoedschange) |
| | | }).then((r) => { |
| | | invoiceOrderRecoedschangeLwc: JSON.stringify( |
| | | this.invoiceOrderRecoedschange |
| | | ) |
| | | }) |
| | | .then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | console.log("r = " + JSON.stringify(r)); |
| | | if (r.status == "Success" && r.msg == '') { |
| | | if (r.status == "Success" && r.msg == "") { |
| | | this.isShowSpinner = false; |
| | | console.log('save success'); |
| | | console.log("save success"); |
| | | let url = "/lexconinvoiceview?invoiceId=" + r.entity.invoiceId; |
| | | console.log('url = ' + url); |
| | | console.log("url = " + url); |
| | | this[NavigationMixin.Navigate]({ |
| | | type: "standard__webPage", |
| | | attributes: { |
| | | url: url, |
| | | }, |
| | | url: url |
| | | } |
| | | }); |
| | | } else { |
| | | this.showMyToast('保存失败', r.msg, 'Error'); |
| | | this.showMyToast("保存失败", r.msg, "Error"); |
| | | } |
| | | }).catch((error) => { |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error = " + JSON.stringify(error)); |
| | | }); |
| | | } |
| | |
| | | this.showPopSpinner = true; |
| | | this.file = this.filesUploaded[0]; |
| | | if (this.file.size > this.MAX_FILE_SIZE) { |
| | | this.showMyToast('保存失败', '文件过大', 'Error'); |
| | | this.showMyToast("保存失败", "文件过大", "Error"); |
| | | return; |
| | | } |
| | | this.fileReader = new FileReader(); |
| | |
| | | saveFile({ |
| | | recordId: this.invoiceId, |
| | | fileName: this.fileName, |
| | | base64Data: encodeURIComponent(this.fileContents), |
| | | }).then((r) => { |
| | | base64Data: encodeURIComponent(this.fileContents) |
| | | }) |
| | | .then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | console.log("r = " + JSON.stringify(r)); |
| | | if (r != '') { |
| | | if (r != "") { |
| | | this.showPopSpinner = false; |
| | | this.showMyToast('上传成功', '', 'Success'); |
| | | this.showMyToast("上传成功", "", "Success"); |
| | | this.closePop(); |
| | | this.init(); |
| | | } else { |
| | | this.showMyToast('上传失败', r.msg, 'Error'); |
| | | this.showMyToast("上传失败", r.msg, "Error"); |
| | | } |
| | | }).catch((error) => { |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error = " + error.message); |
| | | this.showMyToast('错误', '上传失败', 'Error'); |
| | | this.showMyToast("错误", "上传失败", "Error"); |
| | | }); |
| | | } |
| | | |
| | | |
| | | handleTypeChange(event) { |
| | | console.log("handleTypeChange"); |
| | |
| | | |
| | | newInvoiceJs() { |
| | | let url = "/lexconinvoiceview?isNew=yes"; |
| | | console.log('url = ' + url); |
| | | console.log("url = " + url); |
| | | this[NavigationMixin.Navigate]({ |
| | | type: "standard__webPage", |
| | | attributes: { |
| | | url: url, |
| | | }, |
| | | url: url |
| | | } |
| | | }); |
| | | } |
| | | |
| | | saveAttachmentJs() { |
| | | debugger |
| | | debugger; |
| | | this.showLoadingSpinner = true; |
| | | let cloneData = this.deepClone(this.fileData) |
| | | let cloneData = this.deepClone(this.fileData); |
| | | for (var i in cloneData) { |
| | | delete cloneData[i].Id; |
| | | delete cloneData[i].recordId; |
| | |
| | | delete cloneData[i].typeOptions; |
| | | delete cloneData[i].mailSelectOptsMap; |
| | | } |
| | | console.log('cloneData = ' + JSON.stringify(cloneData)); |
| | | console.log("cloneData = " + JSON.stringify(cloneData)); |
| | | saveAttachment({ |
| | | attachmentRecoedsLwc: JSON.stringify(cloneData), |
| | | invoiceId: this.invoiceId |
| | | }).then((r) => { |
| | | }) |
| | | .then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | console.log("r = " + JSON.stringify(r)); |
| | | if (r.status == "Success") { |
| | |
| | | // message: '保存成功', |
| | | // }); |
| | | // this.dispatchEvent(event); |
| | | this.showMyToast('附件保存成功', '', 'Success'); |
| | | this.showMyToast("附件保存成功", "", "Success"); |
| | | //this.init(); |
| | | setTimeout(function () { |
| | | //1秒后执行刷新 |
| | |
| | | // }, |
| | | // }); |
| | | } else { |
| | | this.showMyToast('上传失败', r.msg, 'Error'); |
| | | this.showMyToast("上传失败", r.msg, "Error"); |
| | | } |
| | | }).catch((error) => { |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error = " + error.message); |
| | | this.showMyToast('错误', '上传失败', 'Error'); |
| | | this.showMyToast("错误", "上传失败", "Error"); |
| | | }); |
| | | } |
| | | |
| | | invoiceCodeSearchJs() { |
| | | this.isShowSpinner = true; |
| | | invoiceCodeSearch({ |
| | | orderDateLwc: this.deliveryFromDate == null ? null : new Date(this.deliveryFromDate), |
| | | deliverDateLwc: this.deliveryToDate == null ? null : new Date(this.deliveryToDate), |
| | | orderDateLwc: |
| | | this.deliveryFromDate == null ? null : new Date(this.deliveryFromDate), |
| | | deliverDateLwc: |
| | | this.deliveryToDate == null ? null : new Date(this.deliveryToDate), |
| | | invoiceStatusLwc: this.invoiceStatusValue, |
| | | category1Lwc: this.category1, |
| | | category2Lwc: this.category2, |
| | | accountidLwc: this.ConInvoiceListAccountId, |
| | | userWorkLocationLwc: this.ConInvoiceListUserWorkLocation, |
| | | agencyProTypeLwc: this.ConInvoiceListAgencyProType, |
| | | }).then((r) => { |
| | | agencyProTypeLwc: this.ConInvoiceListAgencyProType |
| | | }) |
| | | .then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | console.log("r = " + JSON.stringify(r)); |
| | | if (r.status == "Success") { |
| | | this.invoiceData = r.entity.raesList; |
| | | for (var i in this.invoiceData) { |
| | | this.invoiceData[i]['NameUrl'] = '/lexconinvoiceview?invoiceId=' + this.invoiceData[i].Id; |
| | | this.invoiceData[i]["NameUrl"] = |
| | | "/lexconinvoiceview?invoiceId=" + this.invoiceData[i].Id; |
| | | } |
| | | console.log("this.invoiceData = " + JSON.stringify(this.invoiceData)); |
| | | this.isShowSpinner = false; |
| | | if (r.entity.raesListSize > 0) { |
| | | this.showMyToast('搜索成功', '共检索到' + r.entity.raesListSize + '个发票', 'Success'); |
| | | this.showMyToast( |
| | | "搜索成功", |
| | | "共检索到" + r.entity.raesListSize + "个发票", |
| | | "Success" |
| | | ); |
| | | } else { |
| | | this.showMyToast('搜索失败', '没有搜索到相关发票', 'Error'); |
| | | this.showMyToast("搜索失败", "没有搜索到相关发票", "Error"); |
| | | } |
| | | } else { |
| | | this.showMyToast('搜索失败', r.msg, 'Error'); |
| | | this.showMyToast("搜索失败", r.msg, "Error"); |
| | | } |
| | | }).catch((error) => { |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error = " + error.message); |
| | | this.showMyToast('错误', '搜索失败', 'Error'); |
| | | this.showMyToast("错误", "搜索失败", "Error"); |
| | | }); |
| | | } |
| | | |
| | | ClearJs() { |
| | | this.deliveryFromDate = ''; |
| | | this.deliveryToDate = ''; |
| | | this.category1 = ''; |
| | | this.category2 = ''; |
| | | this.invoiceStatusValue = ''; |
| | | this.deliveryFromDate = ""; |
| | | this.deliveryToDate = ""; |
| | | this.category1 = ""; |
| | | this.category2 = ""; |
| | | this.invoiceStatusValue = ""; |
| | | this.isShowSpinner = true; |
| | | conInvoiceListInit().then((r) => { |
| | | conInvoiceListInit() |
| | | .then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | console.log("conInvoiceListInit r = " + JSON.stringify(r)); |
| | | if (r.status == "Success") { |
| | | this.invoiceData = r.entity.raesList; |
| | | for (var i in this.invoiceData) { |
| | | this.invoiceData[i]['NameUrl'] = '/lexconinvoiceview?invoiceId=' + this.invoiceData[i].Id; |
| | | this.invoiceData[i]["NameUrl"] = |
| | | "/lexconinvoiceview?invoiceId=" + this.invoiceData[i].Id; |
| | | } |
| | | console.log("this.invoiceData = " + JSON.stringify(this.invoiceData)); |
| | | this.isShowSpinner = false; |
| | | } else { |
| | | this.showMyToast('搜索失败', r.msg, 'Error'); |
| | | this.showMyToast("搜索失败", r.msg, "Error"); |
| | | } |
| | | }).catch((error) => { |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error = " + JSON.stringify(error)); |
| | | }); |
| | | } |
| | |
| | | InvoiceorderSearchJs() { |
| | | this.isShowSpinner = true; |
| | | |
| | | debugger |
| | | let cloneData = this.outboundData |
| | | const selectedRows = this.template.querySelector("[data-field='outbound']").getSelectedRows(); |
| | | console.log('selectedRows ' + JSON.stringify(selectedRows)); |
| | | debugger; |
| | | let cloneData = this.outboundData; |
| | | const selectedRows = this.template |
| | | .querySelector("[data-field='outbound']") |
| | | .getSelectedRows(); |
| | | console.log("selectedRows " + JSON.stringify(selectedRows)); |
| | | for (var i in cloneData) { |
| | | let b = false; |
| | | for (var j in selectedRows) { |
| | |
| | | delete cloneData[i].invoiceFaceAmountUrl; |
| | | } |
| | | |
| | | console.log('this.coc = ' + JSON.stringify(this.coc)); |
| | | console.log('this.invoiceId = ' + this.invoiceId); |
| | | console.log('this.accountid = ' + this.accountid); |
| | | console.log('this.userWorkLocation = ' + this.userWorkLocation); |
| | | console.log('this.agencyProType = ' + this.agencyProType); |
| | | console.log('this.HospitalInfo = ' + this.HospitalInfo); |
| | | console.log('SecondDealer = ' + this.secondaryDistributor); |
| | | console.log('invoiceOrderRecoedsLwc = ' + JSON.stringify(cloneData)); |
| | | console.log("this.coc = " + JSON.stringify(this.coc)); |
| | | console.log("this.invoiceId = " + this.invoiceId); |
| | | console.log("this.accountid = " + this.accountid); |
| | | console.log("this.userWorkLocation = " + this.userWorkLocation); |
| | | console.log("this.agencyProType = " + this.agencyProType); |
| | | console.log("this.HospitalInfo = " + this.HospitalInfo); |
| | | console.log("SecondDealer = " + this.secondaryDistributor); |
| | | console.log("invoiceOrderRecoedsLwc = " + JSON.stringify(cloneData)); |
| | | |
| | | InvoiceorderSearch({ |
| | | cocLwc: this.coc, |
| | |
| | | agencyProTypeLwc: this.agencyProType, |
| | | HospitalInfoLwc: this.HospitalInfo, |
| | | SecondDealerLwc: this.secondaryDistributor, |
| | | invoiceOrderRecoedsLwc: JSON.stringify(cloneData), |
| | | }).then((r) => { |
| | | invoiceOrderRecoedsLwc: JSON.stringify(cloneData) |
| | | }) |
| | | .then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | console.log("r = " + JSON.stringify(r)); |
| | | if (r.status == "Success") { |
| | | this.outboundData = r.entity.invoiceOrderRecoeds; |
| | | console.log('this.outboundData = ' + JSON.stringify(this.outboundData)); |
| | | console.log( |
| | | "this.outboundData = " + JSON.stringify(this.outboundData) |
| | | ); |
| | | let index = 0; |
| | | this.selectedRows = []; |
| | | for (var i in this.outboundData) { |
| | | |
| | | if (this.outboundData[i].check) |
| | | this.selectedRows.push(this.outboundData[i].esd.Id) |
| | | this.selectedRows.push(this.outboundData[i].esd.Id); |
| | | this.outboundData[i].Id = this.outboundData[i].esd.Id; |
| | | this.outboundData[i]['esdOutboundDate'] = this.outboundData[i].esd.Outbound_Date__c; |
| | | this.outboundData[i]['esdNameUrl'] = '/s/lexsummonscreat?ESetid=' + this.outboundData[i].esd.Id; |
| | | this.outboundData[i]['esdName'] = this.outboundData[i].esd.Name; |
| | | this.outboundData[i]["esdOutboundDate"] = |
| | | this.outboundData[i].esd.Outbound_Date__c; |
| | | this.outboundData[i]["esdNameUrl"] = |
| | | "/s/lexsummonscreat?ESetid=" + this.outboundData[i].esd.Id; |
| | | this.outboundData[i]["esdName"] = this.outboundData[i].esd.Name; |
| | | if (this.EditAble) { |
| | | this.outboundData[i]['hospitalName'] = this.outboundData[i].esd.ShipmentAccount__c; |
| | | this.outboundData[i]['shipmentAmount'] = this.outboundData[i].esd.Shipment_total_amount__c; |
| | | this.outboundData[i]['returnAmount'] = this.outboundData[i].esd.RrturnPro_total_amount__c; |
| | | this.outboundData[i]["hospitalName"] = |
| | | this.outboundData[i].esd.ShipmentAccount__c; |
| | | this.outboundData[i]["shipmentAmount"] = |
| | | this.outboundData[i].esd.Shipment_total_amount__c; |
| | | this.outboundData[i]["returnAmount"] = |
| | | this.outboundData[i].esd.RrturnPro_total_amount__c; |
| | | } |
| | | this.outboundData[i]['uninvoicedAmount'] = this.outboundData[i].esd.InvoiceNotPro_money__c; |
| | | this.outboundData[i]['invoiceFaceAmount'] = this.outboundData[i].needInvoiceCount; |
| | | if (!(this.outboundData[i].esd.Billed_Status__c == '全部开票' || this.EditAble || this.coc.Invoice_status__c != '草案中')) { |
| | | this.outboundData[i]["uninvoicedAmount"] = |
| | | this.outboundData[i].esd.InvoiceNotPro_money__c; |
| | | this.outboundData[i]["invoiceFaceAmount"] = |
| | | this.outboundData[i].needInvoiceCount; |
| | | if ( |
| | | !( |
| | | this.outboundData[i].esd.Billed_Status__c == "全部开票" || |
| | | this.EditAble || |
| | | this.coc.Invoice_status__c != "草案中" |
| | | ) |
| | | ) { |
| | | //let url = "/ConInvoicedetails?orderId=" + this.outboundData[i].esd.Id + "&invoiceId=" + this.invoiceId; |
| | | let url = "/s/lexconinvoiceview?orderId=" + this.outboundData[i].esd.Id + "&invoiceId=" + this.invoiceId; |
| | | this.outboundData[i]['invoiceFaceAmountUrl'] = url; |
| | | let url = |
| | | "/s/lexconinvoiceview?orderId=" + |
| | | this.outboundData[i].esd.Id + |
| | | "&invoiceId=" + |
| | | this.invoiceId; |
| | | this.outboundData[i]["invoiceFaceAmountUrl"] = url; |
| | | |
| | | if (index == 0) { |
| | | let object5 = { |
| | | label: '发票票面金额(元)', |
| | | cellAttributes: { alignment: 'right' }, |
| | | type: 'url', |
| | | label: "发票票面金额(元)", |
| | | cellAttributes: { alignment: "right" }, |
| | | type: "url", |
| | | fieldName: "invoiceFaceAmountUrl", |
| | | typeAttributes: { |
| | | label: { fieldName: "invoiceFaceAmount" }, |
| | | target: "_blank", |
| | | label: { |
| | | fieldName: "invoiceFaceAmount" |
| | | }, |
| | | hideDefaultActions: true, |
| | | target: "_blank" |
| | | }, |
| | | hideDefaultActions: true |
| | | }; |
| | | this.outboundColumns.push(object5) |
| | | this.outboundColumns.push(object5); |
| | | index++; |
| | | } |
| | | } else { |
| | | if (index == 0) { |
| | | let object5 = { |
| | | label: '发票票面金额(元)', |
| | | cellAttributes: { alignment: 'right' }, |
| | | label: "发票票面金额(元)", |
| | | cellAttributes: { alignment: "right" }, |
| | | fieldName: "invoiceFaceAmount", |
| | | hideDefaultActions: true, |
| | | hideDefaultActions: true |
| | | }; |
| | | this.outboundColumns.push(object5) |
| | | this.outboundColumns.push(object5); |
| | | index++; |
| | | } |
| | | } |
| | | //计算发票票面金额 |
| | | this.sumPrice += this.outboundData[i].needInvoiceCount; |
| | | } |
| | | console.log('this.selectedRows = ' + JSON.stringify(this.selectedRows)) |
| | | console.log( |
| | | "this.selectedRows = " + JSON.stringify(this.selectedRows) |
| | | ); |
| | | this.isShowSpinner = false; |
| | | } else { |
| | | this.showMyToast('搜索失败', r.msg, 'Error'); |
| | | this.showMyToast("搜索失败", r.msg, "Error"); |
| | | } |
| | | }).catch((error) => { |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error = " + error.message); |
| | | this.showMyToast('错误', '搜索失败', 'Error'); |
| | | this.showMyToast("错误", "搜索失败", "Error"); |
| | | }); |
| | | } |
| | | |
| | |
| | | this.isShowSpinner = true; |
| | | deleteButton({ |
| | | cocLwc: this.coc, |
| | | invoiceIdLwc: this.invoiceId, |
| | | }).then((r) => { |
| | | invoiceIdLwc: this.invoiceId |
| | | }) |
| | | .then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | console.log("r = " + JSON.stringify(r)); |
| | | if (r.status == "Success") { |
| | | this.isShowSpinner = false |
| | | this.isShowSpinner = false; |
| | | let url = "/lexconinvoiceview"; |
| | | console.log('url = ' + url); |
| | | console.log("url = " + url); |
| | | this[NavigationMixin.Navigate]({ |
| | | type: "standard__webPage", |
| | | attributes: { |
| | | url: url, |
| | | }, |
| | | url: url |
| | | } |
| | | }); |
| | | } else { |
| | | this.showMyToast('删除失败', r.msg, 'Error'); |
| | | this.showMyToast("删除失败", r.msg, "Error"); |
| | | } |
| | | }).catch((error) => { |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error = " + error.message); |
| | | }); |
| | | } |
| | | |
| | | SetEditAbleJs() { |
| | | let statusEditAbleJs = 'Redirect'; |
| | | let url = "/lexconinvoiceview?invoiceId=" + this.invoiceId + '&KeyWords=' + statusEditAbleJs; |
| | | console.log('url = ' + url); |
| | | let statusEditAbleJs = "Redirect"; |
| | | let url = |
| | | "/lexconinvoiceview?invoiceId=" + |
| | | this.invoiceId + |
| | | "&KeyWords=" + |
| | | statusEditAbleJs; |
| | | console.log("url = " + url); |
| | | this[NavigationMixin.Navigate]({ |
| | | type: "standard__webPage", |
| | | attributes: { |
| | | url: url, |
| | | }, |
| | | url: url |
| | | } |
| | | }); |
| | | } |
| | | |
| | |
| | | outOrderStringListLwc: this.outOrderStringListLwc, |
| | | outordercountMapLwc: this.outordercountMapLwc, |
| | | invoiceIdLwc: this.invoiceId |
| | | |
| | | }).then((r) => { |
| | | }) |
| | | .then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | console.log("r = " + JSON.stringify(r)); |
| | | if (r.status == "Success") { |
| | | this.isShowSpinner = false |
| | | this.isShowSpinner = false; |
| | | let url = "/s/lexconinvoiceview?invoiceId=" + this.invoiceId; |
| | | console.log('url = ' + url); |
| | | window.open(url, '_self'); |
| | | console.log("url = " + url); |
| | | window.open(url, "_self"); |
| | | // this[NavigationMixin.Navigate]({ |
| | | // type: "standard__webPage", |
| | | // attributes: { |
| | |
| | | // }, |
| | | // }); |
| | | } else { |
| | | this.showMyToast('错误', r.msg, 'Error'); |
| | | this.showMyToast("错误", r.msg, "Error"); |
| | | } |
| | | }).catch((error) => { |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error = " + error.message); |
| | | }); |
| | | } |
| | |
| | | openReportJs() { |
| | | console.log("openReportJs"); |
| | | let reportUrl = this.label.LexConInvoiceViewReport; |
| | | let reportFilters = '[{"operator":"equals","value":"' + this.OrderCode + '","column":"FK_NAME"}]'; |
| | | console.log('reportUrl = ' + reportUrl); |
| | | let url = "/s/report/" + reportUrl + "?reportFilters=" + encodeURIComponent(reportFilters); |
| | | let reportFilters = |
| | | '[{"operator":"equals","value":"' + |
| | | this.OrderCode + |
| | | '","column":"FK_NAME"}]'; |
| | | console.log("reportUrl = " + reportUrl); |
| | | let url = |
| | | "/s/report/" + |
| | | reportUrl + |
| | | "?reportFilters=" + |
| | | encodeURIComponent(reportFilters); |
| | | window.open(url); |
| | | // this[NavigationMixin.Navigate]({ |
| | | // type: "standard__webPage", |
| | |
| | | reopenJs() { |
| | | // statusEdit = 'Redirect'; |
| | | // PageReference ref = new Pagereference('/ConInvoiceView?invoiceId=' + invoiceId + '&reopen=isreopen' + '&KeyWords=' + statusEdit); |
| | | let statusEditAbleJs = 'Redirect'; |
| | | let url = "/lexconinvoiceview?invoiceId=" + this.invoiceId + '&reopen=isreopen' + '&KeyWords=' + statusEditAbleJs; |
| | | console.log('url = ' + url); |
| | | let statusEditAbleJs = "Redirect"; |
| | | let url = |
| | | "/lexconinvoiceview?invoiceId=" + |
| | | this.invoiceId + |
| | | "&reopen=isreopen" + |
| | | "&KeyWords=" + |
| | | statusEditAbleJs; |
| | | console.log("url = " + url); |
| | | this[NavigationMixin.Navigate]({ |
| | | type: "standard__webPage", |
| | | attributes: { |
| | | url: url, |
| | | }, |
| | | url: url |
| | | } |
| | | }); |
| | | } |
| | | |
| | |
| | | this.showAttPop = false; |
| | | this.filesUploaded = []; |
| | | this.fileName = null; |
| | | console.log('show custom message'); |
| | | var iconName = ''; |
| | | var content = ''; |
| | | if (variant.toLowerCase() == 'success') { |
| | | iconName = 'utility:check'; |
| | | console.log("show custom message"); |
| | | var iconName = ""; |
| | | var content = ""; |
| | | if (variant.toLowerCase() == "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); |
| | | } |
| | | |
| | | handleLoad() { |
| | | console.log('handleLoad') |
| | | console.log("handleLoad"); |
| | | try { |
| | | const style = document.createElement('style'); |
| | | style.innerText = '.hehe-layoutItem .slds-button__icon {display: none;}'; |
| | | this.template.querySelector('.hideHelpText').appendChild(style); |
| | | const style = document.createElement("style"); |
| | | style.innerText = ".hehe-layoutItem .slds-button__icon {display: none;}"; |
| | | this.template.querySelector(".hideHelpText").appendChild(style); |
| | | |
| | | const style2 = document.createElement('style'); |
| | | style2.innerText = '.hehe-layoutItem .slds-form-element__label {padding : 0px}'; |
| | | this.template.querySelector('.hideHelpText').appendChild(style2); |
| | | const style2 = document.createElement("style"); |
| | | style2.innerText = |
| | | ".hehe-layoutItem .slds-form-element__label {padding : 0px}"; |
| | | this.template.querySelector(".hideHelpText").appendChild(style2); |
| | | |
| | | const style3 = document.createElement('style'); |
| | | style3.innerText = '.readOnly .slds-form-element__label {padding-top: 7px;}'; |
| | | this.template.querySelector('.hideHelpText').appendChild(style3); |
| | | const style3 = document.createElement("style"); |
| | | style3.innerText = |
| | | ".readOnly .slds-form-element__label {padding-top: 7px;}"; |
| | | this.template.querySelector(".hideHelpText").appendChild(style3); |
| | | } catch (error) { |
| | | console.log(error); |
| | | } |
| | |
| | | keepTwoDecimalStr(num) { |
| | | const result = Number(num.toString().match(/^\d+(?:\.\d{0,2})?/)); |
| | | let s = result.toString(); |
| | | let rs = s.indexOf('.'); |
| | | let rs = s.indexOf("."); |
| | | if (rs < 0) { |
| | | rs = s.length; |
| | | s += '.'; |
| | | s += "."; |
| | | } |
| | | while (s.length <= rs + 2) { |
| | | s += '0'; |
| | | s += "0"; |
| | | } |
| | | return s; |
| | | }; |
| | | } |
| | | |
| | | handleLoad2() { |
| | | console.log('handleLoad2') |
| | | console.log("handleLoad2"); |
| | | try { |
| | | const style = document.createElement('style'); |
| | | style.innerText = '.hehe-layoutItem .slds-button__icon {display: none;}'; |
| | | this.template.querySelector('.hideHelpText').appendChild(style); |
| | | const style = document.createElement("style"); |
| | | style.innerText = ".hehe-layoutItem .slds-button__icon {display: none;}"; |
| | | this.template.querySelector(".hideHelpText").appendChild(style); |
| | | |
| | | const style2 = document.createElement('style'); |
| | | style2.innerText = '.hehe-layoutItem .slds-form-element__label {padding : 0px}'; |
| | | this.template.querySelector('.hideHelpText').appendChild(style2); |
| | | const style2 = document.createElement("style"); |
| | | style2.innerText = |
| | | ".hehe-layoutItem .slds-form-element__label {padding : 0px}"; |
| | | this.template.querySelector(".hideHelpText").appendChild(style2); |
| | | } catch (error) { |
| | | console.log(error); |
| | | } |
| | |
| | | |
| | | handleUnitChange(event) { |
| | | console.log("handleUnitChange"); |
| | | this.invoiceAllpriceData[0].invoiceAllprice = 0.00; |
| | | this.invoiceAllpriceData[0].invoiceAllprice = 0.0; |
| | | const unitDetail = event.detail; |
| | | console.log("unitDetail = " + JSON.stringify(unitDetail)); |
| | | for (var i in this.detailsData) { |
| | | if (this.detailsData[i].recordId == unitDetail.data.recordId) { |
| | | this.detailsData[i].unitValue = unitDetail.data.unitValue; |
| | | this.detailsData[i].esd.Invoice_Unit__c = unitDetail.data.unitValue; |
| | | if (this.detailsSelectedRows.indexOf(this.detailsData[i].recordId) == -1) |
| | | if ( |
| | | this.detailsSelectedRows.indexOf(this.detailsData[i].recordId) == -1 |
| | | ) |
| | | this.detailsSelectedRows.push(this.detailsData[i].recordId); |
| | | } |
| | | } |
| | | this.detailsSelectedRows = [...this.detailsSelectedRows]; |
| | | |
| | | |
| | | console.log('this.detailsSelectedRows = ' + JSON.stringify(this.detailsSelectedRows)) |
| | | console.log( |
| | | "this.detailsSelectedRows = " + JSON.stringify(this.detailsSelectedRows) |
| | | ); |
| | | for (var i in this.detailsData) { |
| | | this.detailsData[i].invoiceAllprice = 0.00; |
| | | this.detailsData[i].invoiceAllprice = 0.0; |
| | | for (var j in this.detailsSelectedRows) { |
| | | console.log('this.detailsData[i].Id = ' + this.detailsData[i].Id); |
| | | console.log('this.detailsSelectedRows[j] = ' + this.detailsSelectedRows[j]); |
| | | console.log("this.detailsData[i].Id = " + this.detailsData[i].Id); |
| | | console.log( |
| | | "this.detailsSelectedRows[j] = " + this.detailsSelectedRows[j] |
| | | ); |
| | | if (this.detailsData[i].Id == this.detailsSelectedRows[j]) { |
| | | this.detailsData[i].invoiceAllprice = this.amend(this.detailsData[i].shipmentNumber, this.detailsData[i].esdInvoiceUnitprice, '*'); |
| | | console.log('this.detailsData[i].invoiceAllprice = ' + this.detailsData[i].invoiceAllprice); |
| | | this.detailsData[i].invoiceAllprice = this.amend( |
| | | this.detailsData[i].shipmentNumber, |
| | | this.detailsData[i].esdInvoiceUnitprice, |
| | | "*" |
| | | ); |
| | | console.log( |
| | | "this.detailsData[i].invoiceAllprice = " + |
| | | this.detailsData[i].invoiceAllprice |
| | | ); |
| | | } |
| | | } |
| | | this.invoiceAllpriceData[0].invoiceAllprice = this.amend(this.invoiceAllpriceData[0].invoiceAllprice, this.detailsData[i].invoiceAllprice, '+'); |
| | | this.invoiceAllpriceData[0].invoiceAllprice = this.amend( |
| | | this.invoiceAllpriceData[0].invoiceAllprice, |
| | | this.detailsData[i].invoiceAllprice, |
| | | "+" |
| | | ); |
| | | } |
| | | this.detailsData = [...this.detailsData]; |
| | | this.invoiceAllpriceData = [...this.invoiceAllpriceData]; |
| | |
| | | |
| | | handleShipmentNumber(event) { |
| | | console.log("handleShipmentNumber"); |
| | | this.invoiceAllpriceData[0].invoiceAllprice = 0.00; |
| | | this.invoiceAllpriceData[0].invoiceAllprice = 0.0; |
| | | const numberDetail = event.detail; |
| | | console.log('numberDetail = ' + JSON.stringify(numberDetail)) |
| | | console.log("numberDetail = " + JSON.stringify(numberDetail)); |
| | | if (numberDetail.data.shipmentnumber == 0) { |
| | | if (this.detailsSelectedRows.indexOf(numberDetail.data.recordId) != -1) { |
| | | this.detailsSelectedRows.splice(this.detailsSelectedRows.indexOf(numberDetail.data.recordId), 1); |
| | | this.detailsSelectedRows.splice( |
| | | this.detailsSelectedRows.indexOf(numberDetail.data.recordId), |
| | | 1 |
| | | ); |
| | | } |
| | | } |
| | | console.log("start this.detailsSelectedRows = " + JSON.stringify(this.detailsSelectedRows)); |
| | | console.log( |
| | | "start this.detailsSelectedRows = " + |
| | | JSON.stringify(this.detailsSelectedRows) |
| | | ); |
| | | console.log("numberDetail = " + JSON.stringify(numberDetail)); |
| | | for (var i in this.detailsData) { |
| | | if (this.detailsData[i].recordId == numberDetail.data.recordId) { |
| | | this.detailsData[i].shipmentNumber = Number(numberDetail.data.shipmentnumber); |
| | | this.detailsData[i].invoiceCount = Number(numberDetail.data.shipmentnumber); |
| | | if (this.detailsSelectedRows.indexOf(this.detailsData[i].recordId) == -1 && numberDetail.data.shipmentnumber != 0) |
| | | this.detailsData[i].shipmentNumber = Number( |
| | | numberDetail.data.shipmentnumber |
| | | ); |
| | | this.detailsData[i].invoiceCount = Number( |
| | | numberDetail.data.shipmentnumber |
| | | ); |
| | | if ( |
| | | this.detailsSelectedRows.indexOf(this.detailsData[i].recordId) == |
| | | -1 && |
| | | numberDetail.data.shipmentnumber != 0 |
| | | ) |
| | | this.detailsSelectedRows.push(this.detailsData[i].recordId); |
| | | } |
| | | } |
| | | |
| | | console.log("end this.detailsSelectedRows = " + JSON.stringify(this.detailsSelectedRows)); |
| | | console.log( |
| | | "end this.detailsSelectedRows = " + |
| | | JSON.stringify(this.detailsSelectedRows) |
| | | ); |
| | | this.detailsSelectedRows = [...this.detailsSelectedRows]; |
| | | |
| | | |
| | | console.log('this.detailsSelectedRows = ' + JSON.stringify(this.detailsSelectedRows)); |
| | | console.log( |
| | | "this.detailsSelectedRows = " + JSON.stringify(this.detailsSelectedRows) |
| | | ); |
| | | for (var i in this.detailsData) { |
| | | this.detailsData[i].invoiceAllprice = 0.00; |
| | | this.detailsData[i].invoiceAllprice = 0.0; |
| | | for (var j in this.detailsSelectedRows) { |
| | | console.log('this.detailsData[i].Id = ' + this.detailsData[i].Id); |
| | | console.log('this.detailsSelectedRows[j] = ' + this.detailsSelectedRows[j]); |
| | | console.log("this.detailsData[i].Id = " + this.detailsData[i].Id); |
| | | console.log( |
| | | "this.detailsSelectedRows[j] = " + this.detailsSelectedRows[j] |
| | | ); |
| | | if (this.detailsData[i].Id == this.detailsSelectedRows[j]) { |
| | | this.detailsData[i].invoiceAllprice = this.amend(this.detailsData[i].shipmentNumber, this.detailsData[i].esdInvoiceUnitprice, '*'); |
| | | console.log('this.detailsData[i].invoiceAllprice = ' + this.detailsData[i].invoiceAllprice); |
| | | this.detailsData[i].invoiceAllprice = this.amend( |
| | | this.detailsData[i].shipmentNumber, |
| | | this.detailsData[i].esdInvoiceUnitprice, |
| | | "*" |
| | | ); |
| | | console.log( |
| | | "this.detailsData[i].invoiceAllprice = " + |
| | | this.detailsData[i].invoiceAllprice |
| | | ); |
| | | } |
| | | } |
| | | this.invoiceAllpriceData[0].invoiceAllprice = this.amend(this.invoiceAllpriceData[0].invoiceAllprice, this.detailsData[i].invoiceAllprice, '+'); |
| | | this.invoiceAllpriceData[0].invoiceAllprice = this.amend( |
| | | this.invoiceAllpriceData[0].invoiceAllprice, |
| | | this.detailsData[i].invoiceAllprice, |
| | | "+" |
| | | ); |
| | | } |
| | | this.detailsData = [...this.detailsData]; |
| | | this.invoiceAllpriceData = [...this.invoiceAllpriceData]; |
| | |
| | | |
| | | detailsGetSelectedRows(event) { |
| | | console.log("detailsGetSelectedRows "); |
| | | this.invoiceAllpriceData[0].invoiceAllprice = 0.00; |
| | | this.invoiceAllpriceData[0].invoiceAllprice = 0.0; |
| | | let selectedRows = event.detail.selectedRows; |
| | | for (var i in this.detailsData) { |
| | | this.detailsData[i].invoiceAllprice = 0.00; |
| | | this.detailsData[i].invoiceAllprice = 0.0; |
| | | for (var j in selectedRows) { |
| | | if (this.detailsData[i].Id == selectedRows[j].esd.Id) { |
| | | this.detailsData[i].invoiceAllprice = this.amend(this.detailsData[i].shipmentNumber, this.detailsData[i].esdInvoiceUnitprice, '*'); |
| | | console.log('this.detailsData[i].invoiceAllprice = ' + this.detailsData[i].invoiceAllprice); |
| | | this.detailsData[i].invoiceAllprice = this.amend( |
| | | this.detailsData[i].shipmentNumber, |
| | | this.detailsData[i].esdInvoiceUnitprice, |
| | | "*" |
| | | ); |
| | | console.log( |
| | | "this.detailsData[i].invoiceAllprice = " + |
| | | this.detailsData[i].invoiceAllprice |
| | | ); |
| | | } |
| | | } |
| | | this.invoiceAllpriceData[0].invoiceAllprice = this.amend(this.invoiceAllpriceData[0].invoiceAllprice, this.detailsData[i].invoiceAllprice, '+'); |
| | | console.log('this.invoiceAllpriceData[0].invoiceAllprice = ' + this.invoiceAllpriceData[0].invoiceAllprice); |
| | | this.invoiceAllpriceData[0].invoiceAllprice = this.amend( |
| | | this.invoiceAllpriceData[0].invoiceAllprice, |
| | | this.detailsData[i].invoiceAllprice, |
| | | "+" |
| | | ); |
| | | console.log( |
| | | "this.invoiceAllpriceData[0].invoiceAllprice = " + |
| | | this.invoiceAllpriceData[0].invoiceAllprice |
| | | ); |
| | | } |
| | | console.log('start this.detailsData = ' + JSON.stringify(this.detailsData)); |
| | | console.log("start this.detailsData = " + JSON.stringify(this.detailsData)); |
| | | this.detailsData = [...this.detailsData]; |
| | | console.log('end this.detailsData = ' + JSON.stringify(this.detailsData)); |
| | | console.log("end this.detailsData = " + JSON.stringify(this.detailsData)); |
| | | this.invoiceAllpriceData = [...this.invoiceAllpriceData]; |
| | | } |
| | | |
| | |
| | | if (this.selectedRows.indexOf(this.data[index].Id) == -1) |
| | | this.selectedRows.push(this.data[index].Id); |
| | | this.data = [...this.data]; |
| | | this.selectedRows = [...this.selectedRows] |
| | | this.selectedRows = [...this.selectedRows]; |
| | | console.log("this.selectedRows = " + JSON.stringify(this.selectedRows)); |
| | | console.log("this.data = " + JSON.stringify(this.data)); |
| | | } |
| | |
| | | this.isShowSpinner = true; |
| | | let cloneData = this.deepClone(this.detailsData); |
| | | |
| | | let selectedRows = this.template.querySelector('c-lex-custom-lightning-datatable').getSelectedRows(); |
| | | console.log('selectedRows = ' + JSON.stringify(selectedRows)); |
| | | let selectedRows = this.template |
| | | .querySelector("c-lex-custom-lightning-datatable") |
| | | .getSelectedRows(); |
| | | console.log("selectedRows = " + JSON.stringify(selectedRows)); |
| | | |
| | | for (var i in cloneData) { |
| | | delete cloneData[i].Id; |
| | |
| | | delete cloneData[i].invoiceAllprice; |
| | | for (var j in selectedRows) { |
| | | if (cloneData[i].esd.Id == selectedRows[j].esd.Id) { |
| | | cloneData[i]['check'] = true; |
| | | cloneData[i]["check"] = true; |
| | | } |
| | | } |
| | | } |
| | | console.log('cloneData = ' + JSON.stringify(cloneData)); |
| | | |
| | | |
| | | console.log("cloneData = " + JSON.stringify(cloneData)); |
| | | |
| | | detailsSave({ |
| | | consumableorderdetails1RecordsLwc: JSON.stringify(cloneData), |
| | | invoiceIdLwc: this.invoiceId, |
| | | orderIdLwc: this.orderId |
| | | }).then((r) => { |
| | | }) |
| | | .then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | console.log("r = " + JSON.stringify(r)); |
| | | if (r.status == "Success") { |
| | |
| | | this[NavigationMixin.Navigate]({ |
| | | type: "standard__webPage", |
| | | attributes: { |
| | | url: url, |
| | | }, |
| | | url: url |
| | | } |
| | | }); |
| | | } else { |
| | | this.showMyToast('保存失败', r.msg, 'Error'); |
| | | this.showMyToast("保存失败", r.msg, "Error"); |
| | | } |
| | | }).catch((error) => { |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error = " + error.message); |
| | | }); |
| | | } |
| | |
| | | this.isShowSpinner = true; |
| | | //var recordId = event.detail.data.recordId; |
| | | var recordId = event.target.getAttribute("data-fileid"); |
| | | console.log('attid:' + recordId); |
| | | console.log("attid:" + recordId); |
| | | deleteAtt({ |
| | | contentVersionId: recordId |
| | | }).then(r => { |
| | | }) |
| | | .then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | if (r.status == "Success") { |
| | | this.showMyToast('删除成功', '', 'Success'); |
| | | if (this.fileData.length == 1) |
| | | window.location.reload(); |
| | | else |
| | | this.init(); |
| | | this.showMyToast("删除成功", "", "Success"); |
| | | if (this.fileData.length == 1) window.location.reload(); |
| | | else this.init(); |
| | | } else { |
| | | this.showMyToast('删除失败', r.msg, 'Error'); |
| | | this.showMyToast("删除失败", r.msg, "Error"); |
| | | } |
| | | }).catch(error => { |
| | | this.showMyToast('错误', error.message, 'Error'); |
| | | }) |
| | | .catch((error) => { |
| | | this.showMyToast("错误", error.message, "Error"); |
| | | }); |
| | | } |
| | | } |
| | |
| | | wrapText: true, |
| | | hideDefaultActions: true, |
| | | sortable: true |
| | | // initialWidth: 150 |
| | | // initialWidth: 136 |
| | | }); |
| | | cols.push({ |
| | | label: "规格", |
| | |
| | | <div class="slds-grid slds-grid_vertical-align-center"> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder lexBorderWidth" |
| | | onclick={neworderhead}> |
| | | onclick={neworderhead} |
| | | > |
| | | 新建出库单 |
| | | </button> |
| | | |
| | | <div class="slds-form-element__label searchName" style="visibility: hidden"> |
| | | <div |
| | | class="slds-form-element__label searchName" |
| | | style="visibility: hidden" |
| | | > |
| | | 出库日 从 |
| | | </div> |
| | | <div class="slds-form-element__label searchName" style="visibility: hidden"> |
| | | <div |
| | | class="slds-form-element__label searchName" |
| | | style="visibility: hidden" |
| | | > |
| | |  到 |
| | | </div> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder lexBorderWidth" |
| | | onclick={editProductLimit} style="margin-left: 4px;"> |
| | | onclick={editProductLimit} |
| | | style="margin-left: 4px" |
| | | > |
| | | 上传已出库一览 |
| | | </button> |
| | | </div> |
| | |
| | | <div class="slds-form-element__label searchName"> |
| | | 出库日 从 |
| | | </div> |
| | | <lightning-input type="date" variant="label-hidden" label="出库日 从" |
| | | onchange={dataChange} data-field="deliveryFromDate" |
| | | value={deliveryFromDate} class="inputFont" |
| | | style="max-width: 150px;"></lightning-input> |
| | | <lightning-input |
| | | type="date" |
| | | variant="label-hidden" |
| | | label="出库日 从" |
| | | onchange={dataChange} |
| | | data-field="deliveryFromDate" |
| | | value={deliveryFromDate} |
| | | class="inputFont" |
| | | style="max-width: 150px" |
| | | ></lightning-input> |
| | | </div> |
| | | </lightning-layout-item> |
| | | |
| | |
| | | <div class="slds-form-element__label searchName"> |
| | | 到 |
| | | </div> |
| | | <lightning-input type="date" variant="label-hidden" label="到" |
| | | onchange={dataChange} data-field="deliveryToDate" |
| | | value={deliveryToDate} class="inputFont" |
| | | style="max-width: 150px;"></lightning-input> |
| | | <lightning-input |
| | | type="date" |
| | | variant="label-hidden" |
| | | label="到" |
| | | onchange={dataChange} |
| | | data-field="deliveryToDate" |
| | | value={deliveryToDate} |
| | | class="inputFont" |
| | | style="max-width: 150px" |
| | | ></lightning-input> |
| | | </div> |
| | | </lightning-layout-item> |
| | | </lightning-layout> |
| | |
| | | <div class="slds-form-element__label searchName"> |
| | | 出库单号 |
| | | </div> |
| | | <lightning-input variant="label-hidden" label="出库单号" onchange={dataChange} |
| | | data-field="deliveryOrderNo" value={deliveryOrderNo} class="inputFont" |
| | | style="max-width: 150px;"></lightning-input> |
| | | <lightning-input |
| | | variant="label-hidden" |
| | | label="出库单号" |
| | | onchange={dataChange} |
| | | data-field="deliveryOrderNo" |
| | | value={deliveryOrderNo} |
| | | class="inputFont" |
| | | style="max-width: 150px" |
| | | ></lightning-input> |
| | | </div> |
| | | </div> |
| | | </lightning-layout-item> |
| | |
| | | <div class="slds-form-element__label searchName"> |
| | | 客户名 |
| | | </div> |
| | | <lightning-input variant="label-hidden" label="客户名" onchange={dataChange} |
| | | data-field="contactName" value={contactName} class="inputFont" |
| | | style="max-width: 150px;"></lightning-input> |
| | | <lightning-input |
| | | variant="label-hidden" |
| | | label="客户名" |
| | | onchange={dataChange} |
| | | data-field="contactName" |
| | | value={contactName} |
| | | class="inputFont" |
| | | style="max-width: 150px" |
| | | ></lightning-input> |
| | | </div> |
| | | </div> |
| | | </lightning-layout-item> |
| | |
| | | <lightning-layout-item size="6"> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle" |
| | | onclick={searchConsumableorderdetailsJs} style="min-width: 180px;"> |
| | | onclick={searchConsumableorderdetailsJs} |
| | | style="min-width: 180px" |
| | | > |
| | | 还没出库的出库单 |
| | | </button> |
| | | </lightning-layout-item> |
| | |
| | | <lightning-layout-item size="6"> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle" |
| | | onclick={searchOrderInstatusJs} style="min-width: 215px;"> |
| | | onclick={searchOrderInstatusJs} |
| | | style="min-width: 215px" |
| | | > |
| | | 已出库未开票的出库单 |
| | | </button> |
| | | </lightning-layout-item> |
| | |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item size="3"> |
| | | <button class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle" |
| | | onclick={searchConsumableorFinishJs} style="min-width: 225px"> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle" |
| | | onclick={searchConsumableorFinishJs} |
| | | style="min-width: 225px" |
| | | > |
| | | 已出库已开票的出库单 |
| | | </button> |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item> |
| | | <button class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" |
| | | onclick={clearJs} style="width: 206px;"> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" |
| | | onclick={clearJs} |
| | | style="width: 206px" |
| | | > |
| | | 清空 |
| | | </button> |
| | | </lightning-layout-item> |
| | |
| | | <div class="borderCss"> |
| | | <template if:true={isShowSpinner}> |
| | | <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> |
| | | |
| | | <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> |
| | |
| | | </div> |
| | | <template if:true={showTable}> |
| | | <div style="padding: 7px; height: 500px"> |
| | | <lightning-datatable key-field="id" data={data} columns={columns} |
| | | hide-checkbox-column default-sort-direction={defaultSortDirection} |
| | | sorted-direction={sortDirection} sorted-by={sortedBy} onsort={onHandleSort} |
| | | class="wrapped-header-datatable"> |
| | | <lightning-datatable |
| | | key-field="id" |
| | | data={data} |
| | | columns={columns} |
| | | hide-checkbox-column |
| | | default-sort-direction={defaultSortDirection} |
| | | sorted-direction={sortDirection} |
| | | sorted-by={sortedBy} |
| | | onsort={onHandleSort} |
| | | class="wrapped-header-datatable" |
| | | > |
| | | </lightning-datatable> |
| | | </div> |
| | | </template> |
| | |
| | | import { LightningElement, wire, api, track } from 'lwc'; |
| | | import { NavigationMixin } from 'lightning/navigation'; |
| | | import init from '@salesforce/apex/LexSaleAndDeliveryController.init';//cleanUp |
| | | import cleanUp from '@salesforce/apex/LexSaleAndDeliveryController.cleanUp'; |
| | | import { LightningElement, wire, api, track } from "lwc"; |
| | | import { NavigationMixin } from "lightning/navigation"; |
| | | import init from "@salesforce/apex/LexSaleAndDeliveryController.init"; //cleanUp |
| | | import cleanUp from "@salesforce/apex/LexSaleAndDeliveryController.cleanUp"; |
| | | import { ShowToastEvent } from "lightning/platformShowToastEvent"; |
| | | import searchOrderInstatus from '@salesforce/apex/LexSaleAndDeliveryController.searchOrderInstatus'; |
| | | import searchConsumableorderdetails from '@salesforce/apex/LexSaleAndDeliveryController.searchConsumableorderdetails'; |
| | | import searchConsumableorFinish from '@salesforce/apex/LexSaleAndDeliveryController.searchConsumableorFinish'; |
| | | import searchOrderInstatus from "@salesforce/apex/LexSaleAndDeliveryController.searchOrderInstatus"; |
| | | import searchConsumableorderdetails from "@salesforce/apex/LexSaleAndDeliveryController.searchConsumableorderdetails"; |
| | | import searchConsumableorFinish from "@salesforce/apex/LexSaleAndDeliveryController.searchConsumableorFinish"; |
| | | //table css |
| | | import { loadStyle } from "lightning/platformResourceLoader"; |
| | | import WrappedHeaderTable from "@salesforce/resourceUrl/lexdatatable"; |
| | | |
| | | const columns = [ |
| | | { |
| | | label: '出库日', |
| | | fieldName: 'Outbound_Date__c', |
| | | type: 'date', |
| | | label: "出库日", |
| | | fieldName: "Outbound_Date__c", |
| | | type: "date", |
| | | hideDefaultActions: true, |
| | | sortable: true, |
| | | wrapText: true, |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: '出库单号', |
| | | fieldName: 'url', |
| | | type: 'url', |
| | | label: "出库单号", |
| | | fieldName: "url", |
| | | type: "url", |
| | | initialWidth: 250, |
| | | typeAttributes: { |
| | | label: { |
| | | fieldName: 'Name' |
| | | fieldName: "Name" |
| | | }, |
| | | target: '_blank' |
| | | target: "_blank" |
| | | }, |
| | | hideDefaultActions: true, |
| | | sortable: true, |
| | | wrapText: true, |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: '客户名', |
| | | fieldName: 'ShipmentAccount__c', |
| | | label: "客户名", |
| | | fieldName: "ShipmentAccount__c", |
| | | hideDefaultActions: true, |
| | | initialWidth: 250, |
| | | wrapText: true, |
| | | sortable: true |
| | | }, |
| | | { |
| | | label: '科室', |
| | | fieldName: 'Order_ForCustomerText__c', |
| | | label: "科室", |
| | | fieldName: "Order_ForCustomerText__c", |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | initialWidth: 130, |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: '出库单状态', |
| | | fieldName: 'SummonsStatus_c__c', |
| | | label: "出库单状态", |
| | | fieldName: "SummonsStatus_c__c", |
| | | hideDefaultActions: true, |
| | | sortable: true, |
| | | wrapText: true, |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: '开票状态', |
| | | fieldName: 'Billed_Status__c', |
| | | label: "开票状态", |
| | | fieldName: "Billed_Status__c", |
| | | hideDefaultActions: true, |
| | | initialWidth: 130, |
| | | sortable: true, |
| | | wrapText: true, |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: '未发票金额(元)', |
| | | fieldName: 'InvoiceNotPro_money__c', |
| | | label: "未发票金额(元)", |
| | | fieldName: "InvoiceNotPro_money__c", |
| | | hideDefaultActions: true, |
| | | type: "number", |
| | | typeAttributes: { |
| | | minimumFractionDigits: 2, |
| | | minimumFractionDigits: 2 |
| | | }, |
| | | wrapText: true, |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: '创建日期', |
| | | fieldName: 'CreatedDate', |
| | | label: "创建日期", |
| | | fieldName: "CreatedDate", |
| | | hideDefaultActions: true, |
| | | sortable: true, |
| | | wrapText: true, |
| | |
| | | year: "numeric", |
| | | hour: "2-digit", |
| | | minute: "2-digit" |
| | | }, |
| | | } |
| | | } |
| | | ]; |
| | | export default class LexSaleAndDelivery extends NavigationMixin(LightningElement) { |
| | | export default class LexSaleAndDelivery extends NavigationMixin( |
| | | LightningElement |
| | | ) { |
| | | columns = columns; |
| | | @track isShowSpinner = true; |
| | | @track message = ''; |
| | | @track deliveryFromDate = ''; |
| | | @track deliveryToDate = ''; |
| | | @track deliveryOrderNo = ''; |
| | | @track contactName = ''; |
| | | @track message = ""; |
| | | @track deliveryFromDate = ""; |
| | | @track deliveryToDate = ""; |
| | | @track deliveryOrderNo = ""; |
| | | @track contactName = ""; |
| | | @track data = []; |
| | | @track userinfoId = ''; |
| | | @track accountid = ''; |
| | | @track agencyProType = ''; |
| | | @track userWorkLocation = ''; |
| | | @track userinfoId = ""; |
| | | @track accountid = ""; |
| | | @track agencyProType = ""; |
| | | @track userWorkLocation = ""; |
| | | @track showTable = false; |
| | | @track hidecheckboxcolumn = true; |
| | | |
| | | //排序 |
| | | defaultSortDirection = 'asc'; |
| | | sortDirection = 'asc'; |
| | | defaultSortDirection = "asc"; |
| | | sortDirection = "asc"; |
| | | sortedBy; |
| | | |
| | | |
| | | stylesLoaded = false; |
| | | renderedCallback() { |
| | |
| | | } |
| | | |
| | | connectedCallback() { |
| | | init().then((r) => { |
| | | init() |
| | | .then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | console.log('r = ' + JSON.stringify(r)); |
| | | if (r.status == 'Success') { |
| | | console.log("r = " + JSON.stringify(r)); |
| | | if (r.status == "Success") { |
| | | this.userinfoId = r.entity.userinfoId; |
| | | this.accountid = r.entity.accountid; |
| | | this.agencyProType = r.entity.agencyProType; |
| | | this.userWorkLocation = r.entity.userWorkLocation; |
| | | this.data = r.entity.raesList; |
| | | for (var i in this.data) { |
| | | this.data[i]['url'] = '/s/lexsummonscreat?ESetid=' + this.data[i].Id; |
| | | this.data[i]["url"] = |
| | | "/s/lexsummonscreat?ESetid=" + this.data[i].Id; |
| | | } |
| | | console.log('this.data = ' + JSON.stringify(this.data)); |
| | | console.log("this.data = " + JSON.stringify(this.data)); |
| | | this.isShowSpinner = false; |
| | | this.showTable = true; |
| | | |
| | | } else { |
| | | console.log('r = ' + JSON.stringify(r)) |
| | | this.showMyToast('初始化失败', r.msg,'Error'); |
| | | console.log("r = " + JSON.stringify(r)); |
| | | this.showMyToast("初始化失败", r.msg, "Error"); |
| | | } |
| | | }).catch((error) => { |
| | | console.log('error = ' + JSON.stringify(error)) |
| | | this.showMyToast('错误', '初始化失败','Error'); |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error = " + JSON.stringify(error)); |
| | | this.showMyToast("错误", "初始化失败", "Error"); |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | //新建出库单 |
| | | neworderhead() { |
| | | this[NavigationMixin.Navigate]({ |
| | | type: 'standard__webPage', |
| | | type: "standard__webPage", |
| | | attributes: { |
| | | url: '/lexsummonscreat' |
| | | url: "/lexsummonscreat" |
| | | } |
| | | }); |
| | | } |
| | |
| | | searchOrderInstatusJs() { |
| | | this.isShowSpinner = true; |
| | | this.showTable = false; |
| | | console.log('searchOrderInstatusJs'); |
| | | console.log("searchOrderInstatusJs"); |
| | | searchOrderInstatus({ |
| | | orderDate: this.deliveryFromDate, |
| | | deliverDate: this.deliveryToDate, |
| | |
| | | userWorkLocation: this.userWorkLocation, |
| | | category1: this.deliveryOrderNo, |
| | | category2: this.contactName |
| | | }).then((r) => { |
| | | }) |
| | | .then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | console.log('r = ' + JSON.stringify(r)); |
| | | if (r.status == 'Success') { |
| | | console.log("r = " + JSON.stringify(r)); |
| | | if (r.status == "Success") { |
| | | this.data = r.entity.raesList; |
| | | for (var i in this.data) { |
| | | this.data[i]['url'] = '/s/lexsummonscreat?ESetid=' + this.data[i].Id; |
| | | this.data[i]["url"] = |
| | | "/s/lexsummonscreat?ESetid=" + this.data[i].Id; |
| | | } |
| | | this.message = r.msg; |
| | | if (this.message == '没有搜索到相关出库单') { |
| | | this.showMyToast('搜索失败', this.message,'Error'); |
| | | if (this.message == "没有搜索到相关出库单") { |
| | | this.showMyToast("搜索失败", this.message, "Error"); |
| | | } else { |
| | | this.showMyToast('搜索成功', this.message,'Success'); |
| | | this.showMyToast("搜索成功", this.message, "Success"); |
| | | } |
| | | this.isShowSpinner = false; |
| | | //this.isCssLoaded = true |
| | | this.showTable = true; |
| | | } else { |
| | | this.showMyToast('错误', r.msg,'Error'); |
| | | this.showMyToast("错误", r.msg, "Error"); |
| | | } |
| | | }).catch((error) => { |
| | | console.log('error = ' + JSON.stringify(error)) |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error = " + JSON.stringify(error)); |
| | | }); |
| | | } |
| | | |
| | | //还没出库的出库单 |
| | | searchConsumableorderdetailsJs() { |
| | | this.isShowSpinner = true; |
| | | this.showTable = false; |
| | | console.log('searchConsumableorderdetailsJs'); |
| | | console.log('this.deliveryFromDate = ' + this.deliveryFromDate); |
| | | console.log('this.deliveryToDate = ' + this.deliveryToDate); |
| | | console.log("searchConsumableorderdetailsJs"); |
| | | console.log("this.deliveryFromDate = " + this.deliveryFromDate); |
| | | console.log("this.deliveryToDate = " + this.deliveryToDate); |
| | | searchConsumableorderdetails({ |
| | | orderDate: this.deliveryFromDate, |
| | | deliverDate: this.deliveryToDate, |
| | |
| | | userWorkLocation: this.userWorkLocation, |
| | | category1: this.deliveryOrderNo, |
| | | category2: this.contactName |
| | | }).then((r) => { |
| | | }) |
| | | .then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | console.log('r = ' + JSON.stringify(r)); |
| | | if (r.status == 'Success') { |
| | | console.log("r = " + JSON.stringify(r)); |
| | | if (r.status == "Success") { |
| | | this.data = r.entity.raesList; |
| | | for (var i in this.data) { |
| | | this.data[i]['url'] = '/s/lexsummonscreat?ESetid=' + this.data[i].Id; |
| | | this.data[i]["url"] = |
| | | "/s/lexsummonscreat?ESetid=" + this.data[i].Id; |
| | | } |
| | | this.message = r.msg; |
| | | if (this.message == '没有搜索到相关出库单') { |
| | | this.showMyToast('搜索失败', this.message,'Error'); |
| | | if (this.message == "没有搜索到相关出库单") { |
| | | this.showMyToast("搜索失败", this.message, "Error"); |
| | | } else { |
| | | this.showMyToast('搜索成功', this.message,'Success'); |
| | | this.showMyToast("搜索成功", this.message, "Success"); |
| | | } |
| | | this.isShowSpinner = false; |
| | | this.showTable = true; |
| | | } else { |
| | | this.showMyToast('搜索失败', r.msg,'Error'); |
| | | this.showMyToast("搜索失败", r.msg, "Error"); |
| | | } |
| | | }).catch((error) => { |
| | | console.log('error = ' + JSON.stringify(error)) |
| | | this.showMyToast('搜索失败', '搜索还没出库的出库单出错','Error'); |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error = " + JSON.stringify(error)); |
| | | this.showMyToast("搜索失败", "搜索还没出库的出库单出错", "Error"); |
| | | }); |
| | | } |
| | | |
| | | //已出库已开票的出库单 |
| | | searchConsumableorFinishJs() { |
| | | this.isShowSpinner = true; |
| | | this.showTable = false; |
| | | console.log('searchConsumableorFinishJs'); |
| | | console.log("searchConsumableorFinishJs"); |
| | | searchConsumableorFinish({ |
| | | orderDate: this.deliveryFromDate, |
| | | deliverDate: this.deliveryToDate, |
| | |
| | | userWorkLocation: this.userWorkLocation, |
| | | category1: this.deliveryOrderNo, |
| | | category2: this.contactName |
| | | }).then((r) => { |
| | | }) |
| | | .then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | console.log('r = ' + JSON.stringify(r)); |
| | | if (r.status == 'Success') { |
| | | console.log("r = " + JSON.stringify(r)); |
| | | if (r.status == "Success") { |
| | | this.data = r.entity.raesList; |
| | | for (var i in this.data) { |
| | | this.data[i]['url'] = '/s/lexsummonscreat?ESetid=' + this.data[i].Id; |
| | | this.data[i]["url"] = |
| | | "/s/lexsummonscreat?ESetid=" + this.data[i].Id; |
| | | } |
| | | this.message = r.msg; |
| | | if (this.message == '没有搜索到相关出库单') { |
| | | this.showMyToast('搜索失败', this.message,'Error'); |
| | | if (this.message == "没有搜索到相关出库单") { |
| | | this.showMyToast("搜索失败", this.message, "Error"); |
| | | } else { |
| | | this.showMyToast('搜索成功', this.message,'Success'); |
| | | this.showMyToast("搜索成功", this.message, "Success"); |
| | | } |
| | | this.isShowSpinner = false; |
| | | this.showTable = true; |
| | | } else { |
| | | this.showMyToast('搜索失败', r.msg,'Error'); |
| | | this.showMyToast("搜索失败", r.msg, "Error"); |
| | | } |
| | | }).catch((error) => { |
| | | console.log('error = ' + JSON.stringify(error)) |
| | | this.showMyToast('搜索失败', '搜索已出库已开票的出库单出错','Error'); |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error = " + JSON.stringify(error)); |
| | | this.showMyToast("搜索失败", "搜索已出库已开票的出库单出错", "Error"); |
| | | }); |
| | | } |
| | | |
| | | //清空 |
| | | clearJs() { |
| | | this.deliveryFromDate = ''; |
| | | this.deliveryToDate = ''; |
| | | this.deliveryOrderNo = ''; |
| | | this.contactName = ''; |
| | | this.deliveryFromDate = ""; |
| | | this.deliveryToDate = ""; |
| | | this.deliveryOrderNo = ""; |
| | | this.contactName = ""; |
| | | this.isShowSpinner = true; |
| | | this.showTable = false; |
| | | cleanUp({ |
| | | accountid: this.accountid, |
| | | agencyProType: this.agencyProType, |
| | | userWorkLocation: this.userWorkLocation, |
| | | }).then((r) => { |
| | | userWorkLocation: this.userWorkLocation |
| | | }) |
| | | .then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | console.log('r = ' + JSON.stringify(r)); |
| | | if (r.status == 'Success') { |
| | | console.log("r = " + JSON.stringify(r)); |
| | | if (r.status == "Success") { |
| | | this.data = r.entity.raesList; |
| | | for (var i in this.data) { |
| | | this.data[i]['url'] = '/s/lexsummonscreat?ESetid=' + this.data[i].Id; |
| | | this.data[i]["url"] = |
| | | "/s/lexsummonscreat?ESetid=" + this.data[i].Id; |
| | | } |
| | | this.message = r.msg; |
| | | if (this.message == '没有搜索到相关出库单') { |
| | | this.showMyToast('搜索失败', this.message,'Error'); |
| | | if (this.message == "没有搜索到相关出库单") { |
| | | this.showMyToast("搜索失败", this.message, "Error"); |
| | | } else { |
| | | this.showMyToast('搜索成功', this.message,'Success'); |
| | | this.showMyToast("搜索成功", this.message, "Success"); |
| | | } |
| | | this.isShowSpinner = false; |
| | | this.showTable = true; |
| | | } else { |
| | | this.showMyToast('搜索失败', r.msg,'Error'); |
| | | this.showMyToast("搜索失败", r.msg, "Error"); |
| | | } |
| | | }).catch((error) => { |
| | | console.log('error = ' + JSON.stringify(error)) |
| | | this.showMyToast('搜索失败', '搜索失败','Error'); |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error = " + JSON.stringify(error)); |
| | | this.showMyToast("搜索失败", "搜索失败", "Error"); |
| | | }); |
| | | } |
| | | |
| | | //Capture the event fired from the paginator component |
| | |
| | | onHandleSort(event) { |
| | | const { fieldName: sortedBy, sortDirection } = event.detail; |
| | | const cloneData = [...this.data]; |
| | | cloneData.sort(this.sortBy(sortedBy, sortDirection === 'asc' ? 1 : -1)); |
| | | cloneData.sort(this.sortBy(sortedBy, sortDirection === "asc" ? 1 : -1)); |
| | | this.data = cloneData; |
| | | this.sortDirection = sortDirection; |
| | | this.sortedBy = sortedBy; |
| | |
| | | }; |
| | | } |
| | | |
| | | |
| | | dataChange(event) { |
| | | let fieldName = event.target.getAttribute("data-field"); |
| | | let value = event.detail.value; |
| | | switch (fieldName) { |
| | | case 'deliveryFromDate': |
| | | case "deliveryFromDate": |
| | | this.deliveryFromDate = value; |
| | | break |
| | | case 'deliveryToDate': |
| | | break; |
| | | case "deliveryToDate": |
| | | this.deliveryToDate = value; |
| | | break |
| | | case 'deliveryOrderNo': |
| | | break; |
| | | case "deliveryOrderNo": |
| | | this.deliveryOrderNo = value; |
| | | break |
| | | case 'contactName': |
| | | break; |
| | | case "contactName": |
| | | this.contactName = value; |
| | | break |
| | | break; |
| | | default: |
| | | console.log('no data'); |
| | | console.log("no data"); |
| | | } |
| | | |
| | | } |
| | | |
| | | editProductLimit() { |
| | | this[NavigationMixin.Navigate]({ |
| | | type: 'standard__webPage', |
| | | type: "standard__webPage", |
| | | attributes: { |
| | | url: '/lexoutboundorderimport' |
| | | url: "/lexoutboundorderimport" |
| | | } |
| | | }); |
| | | } |
| | | |
| | | showMyToast(title, message, variant) { |
| | | this.isShowSpinner = false; |
| | | console.log('show custom message'); |
| | | var iconName = ''; |
| | | var content = ''; |
| | | if (variant.toLowerCase() == 'success') { |
| | | iconName = 'utility:check'; |
| | | console.log("show custom message"); |
| | | var iconName = ""; |
| | | var content = ""; |
| | | if (variant.toLowerCase() == "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); |
| | | } |
| | | |
| | | @track isModalOpen = false; |
| | |
| | | <c-common-toast></c-common-toast> |
| | | <template if:true={isShowSpinner}> |
| | | <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> |
| | | |
| | | <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}> |
| | | <section role="dialog" tabindex="-1" aria-labelledby="modal-heading-01" aria-modal="true" |
| | | aria-describedby="modal-content-id-1" class="slds-modal slds-fade-in-open slds-modal_medium" |
| | | style="border: 1px solid #D4D4D4;"> |
| | | <section |
| | | role="dialog" |
| | | tabindex="-1" |
| | | aria-labelledby="modal-heading-01" |
| | | aria-modal="true" |
| | | aria-describedby="modal-content-id-1" |
| | | class="slds-modal slds-fade-in-open slds-modal_medium" |
| | | style="border: 1px solid #d4d4d4" |
| | | > |
| | | <div class="slds-modal__container"> |
| | | <header class="slds-modal__header" style="background-color: #F3F3F3;"> |
| | | <button style="" class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" |
| | | title="Close" onclick={closeModal}> |
| | | <lightning-icon icon-name="utility:close" alternative-text="close" variant="inverse" |
| | | size="small"></lightning-icon> |
| | | <header class="slds-modal__header" style="background-color: #f3f3f3"> |
| | | <button |
| | | style="" |
| | | class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" |
| | | title="Close" |
| | | onclick={closeModal} |
| | | > |
| | | <lightning-icon |
| | | icon-name="utility:close" |
| | | alternative-text="close" |
| | | variant="inverse" |
| | | size="small" |
| | | ></lightning-icon> |
| | | <span class="slds-assistive-text">Close</span> |
| | | </button> |
| | | <h2 id="modal-heading-01" class="slds-text-heading_medium slds-hyphenate">经销商医院检索</h2> |
| | | <h2 |
| | | id="modal-heading-01" |
| | | class="slds-text-heading_medium slds-hyphenate" |
| | | > |
| | | 经销商医院检索 |
| | | </h2> |
| | | </header> |
| | | <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-1" |
| | | style="border: 1px solid #F3F3F3;"> |
| | | <table style="width: 100%;"> |
| | | <div |
| | | class="slds-modal__content slds-p-around_medium" |
| | | id="modal-content-id-1" |
| | | style="border: 1px solid #f3f3f3" |
| | | > |
| | | <table style="width: 100%"> |
| | | <tbody> |
| | | <tr> |
| | | <td style="width: 74px;"> |
| | | <div style="color:#696969;font-size:16px;text-align: left;">医院名称</div> |
| | | <td style="width: 74px"> |
| | | <div |
| | | style="color: #696969; font-size: 16px; text-align: left" |
| | | > |
| | | 医院名称 |
| | | </div> |
| | | </td> |
| | | <td style="width: 60%;"><lightning-input class="inputFont" label="医院名称" |
| | | variant="label-hidden" placeholder="请输入医院名称" value={searchHospitalName} |
| | | data-field="searchHospitalName" onchange={dataChange}></lightning-input></td> |
| | | <td style="width: 10px;"></td> |
| | | <td><button class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle" |
| | | style="height: 32px;" label="搜索" onclick={searchHospital}>搜索</button></td> |
| | | <td style="width: 60%"> |
| | | <lightning-input |
| | | class="inputFont" |
| | | label="医院名称" |
| | | variant="label-hidden" |
| | | placeholder="请输入医院名称" |
| | | value={searchHospitalName} |
| | | data-field="searchHospitalName" |
| | | onchange={dataChange} |
| | | ></lightning-input> |
| | | </td> |
| | | <td style="width: 10px"></td> |
| | | <td> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle" |
| | | style="height: 32px" |
| | | label="搜索" |
| | | onclick={searchHospital} |
| | | > |
| | | 搜索 |
| | | </button> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | <p style="height: 20px;"></p> |
| | | <p style="height: 20px"></p> |
| | | <!-- <p>已选择医院:{chooseHospital}</p> --> |
| | | <div |
| | | style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;"> |
| | | <div style="border-bottom: 1px solid #D4D4D4;padding:3px;"> |
| | | style=" |
| | | border: 1px solid #d4d4d4; |
| | | border-top: 3px solid #51606e; |
| | | border-radius: 5px; |
| | | margin-bottom: 7px; |
| | | " |
| | | > |
| | | <div style="border-bottom: 1px solid #d4d4d4; padding: 3px"> |
| | | <lightning-layout> |
| | | <lightning-layout-item padding="around-small"> |
| | | <p style="font-size: 18px"> |
| | |
| | | </lightning-layout> |
| | | <!-- <p style="font-size: 16px;"><strong>搜索结果</strong></p> --> |
| | | </div> |
| | | <div class="myTable" style="padding:10px;"> |
| | | <div class="myTable" style="padding: 10px"> |
| | | <!-- <lightning-datatable class="wrapped-header-datatable" key-field="id" |
| | | hide-checkbox-column="true" data={hospitalList} columns={hosCols} |
| | | onrowaction={chooseHos}></lightning-datatable> --> |
| | | <lightning-datatable class="datatabel slds-border_top wrapped-header-datatable" |
| | | key-field="id" data={hospitalList} columns={hospitalColumns} hide-checkbox-column="true" |
| | | onrowaction={searchHandleRowAction}> |
| | | <lightning-datatable |
| | | class="datatabel slds-border_top wrapped-header-datatable" |
| | | key-field="id" |
| | | data={hospitalList} |
| | | columns={hospitalColumns} |
| | | hide-checkbox-column="true" |
| | | onrowaction={searchHandleRowAction} |
| | | > |
| | | </lightning-datatable> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <footer class="slds-modal__footer"> |
| | | <button class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" label="取消" |
| | | onclick={closeModal}>取消</button> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" |
| | | label="取消" |
| | | onclick={closeModal} |
| | | > |
| | | 取消 |
| | | </button> |
| | | </footer> |
| | | </div> |
| | | </section> |
| | |
| | | |
| | | <!-- 上传附件弹窗 --> |
| | | <template if:true={showAttPop}> |
| | | <section role="dialog" tabindex="-1" aria-labelledby="modal-heading-01" aria-modal="true" |
| | | aria-describedby="modal-content-id-1" class="slds-modal slds-fade-in-open slds-modal_small" |
| | | style="border: 1px solid #D4D4D4;"> |
| | | <section |
| | | role="dialog" |
| | | tabindex="-1" |
| | | aria-labelledby="modal-heading-01" |
| | | aria-modal="true" |
| | | aria-describedby="modal-content-id-1" |
| | | class="slds-modal slds-fade-in-open slds-modal_small" |
| | | style="border: 1px solid #d4d4d4" |
| | | > |
| | | <template if:true={showPopSpinner}> |
| | | <lightning-spinner size="medium" variant="brand"></lightning-spinner> |
| | | </template> |
| | | <div class="slds-modal__container"> |
| | | <header class="slds-modal__header" style="background-color: #F3F3F3;"> |
| | | <button style="" class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" |
| | | title="Close" onclick={closePop}> |
| | | <lightning-icon icon-name="utility:close" alternative-text="close" variant="inverse" |
| | | size="small"></lightning-icon> |
| | | <header class="slds-modal__header" style="background-color: #f3f3f3"> |
| | | <button |
| | | style="" |
| | | class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" |
| | | title="Close" |
| | | onclick={closePop} |
| | | > |
| | | <lightning-icon |
| | | icon-name="utility:close" |
| | | alternative-text="close" |
| | | variant="inverse" |
| | | size="small" |
| | | ></lightning-icon> |
| | | <span class="slds-assistive-text">Close</span> |
| | | </button> |
| | | <h2 id="modal-heading-02" class="slds-text-heading_medium slds-hyphenate">上传附件</h2> |
| | | <h2 |
| | | id="modal-heading-02" |
| | | class="slds-text-heading_medium slds-hyphenate" |
| | | > |
| | | 上传附件 |
| | | </h2> |
| | | </header> |
| | | <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-2" |
| | | style="border: 1px solid #F3F3F3;"> |
| | | <div |
| | | class="slds-modal__content slds-p-around_medium" |
| | | id="modal-content-id-2" |
| | | style="border: 1px solid #f3f3f3" |
| | | > |
| | | <div class="slds-m-top_medium slds-m-bottom_x-large"> |
| | | <div class="slds-p-around_medium lgc-bg"> |
| | | <lightning-input class="fileUpload" type="file" label="附件上传" |
| | | <lightning-input |
| | | class="fileUpload" |
| | | type="file" |
| | | label="附件上传" |
| | | accept=".xlsx, .xls, .csv, .png, .doc, .docx, .pdf" |
| | | onchange={attChange}></lightning-input> |
| | | onchange={attChange} |
| | | ></lightning-input> |
| | | </div> |
| | | <p style="font-size: 16px;">已选择文件:{fileName} |
| | | <p style="font-size: 16px"> |
| | | 已选择文件:{fileName} |
| | | <template if:true={attDelBtn}> |
| | | <a onclick={removeAtt}>移除</a> |
| | | </template> |
| | |
| | | onclick={closePop}></lightning-button> |
| | | <lightning-button style="margin-left: 10px;" variant="neutral" label="上传" |
| | | onclick={handleSave}></lightning-button> --> |
| | | <button class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" style="margin-left: 10px;" label="取消" |
| | | onclick={closePop}>取消</button> |
| | | <button class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle" style="margin-left: 10px;" label="上传" |
| | | onclick={handleSave}>上传</button> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" |
| | | style="margin-left: 10px" |
| | | label="取消" |
| | | onclick={closePop} |
| | | > |
| | | 取消 |
| | | </button> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle" |
| | | style="margin-left: 10px" |
| | | label="上传" |
| | | onclick={handleSave} |
| | | > |
| | | 上传 |
| | | </button> |
| | | </footer> |
| | | </div> |
| | | </section> |
| | |
| | | style="width: 150px"></lightning-button> --> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder" |
| | | onclick={saveConfirmJs}>保存</button> |
| | | onclick={saveConfirmJs} |
| | | > |
| | | 保存 |
| | | </button> |
| | | </template> |
| | | </td> |
| | | <td colspan="4"> |
| | |
| | | style="width: 150px" disabled={isEditDisabled}></lightning-button> --> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder" |
| | | onclick={EditConsumable} disabled={isEditDisabled}>编辑出库单</button> |
| | | onclick={EditConsumable} |
| | | disabled={isEditDisabled} |
| | | > |
| | | 编辑出库单 |
| | | </button> |
| | | </template> |
| | | </td> |
| | | |
| | |
| | | style="width: 150px;" disabled={isDeliveryDisabled}></lightning-button> --> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder" |
| | | onclick={GoodsDeliveryJs} disabled={isDeliveryDisabled}>出货/销售</button> |
| | | onclick={GoodsDeliveryJs} |
| | | disabled={isDeliveryDisabled} |
| | | > |
| | | 出货/销售 |
| | | </button> |
| | | </template> |
| | | </td> |
| | | |
| | |
| | | disabled={isOpenToInvoiceDisabled}></lightning-button> --> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder" |
| | | onclick={openToInvoiceJs} disabled={isOpenToInvoiceDisabled}>开票</button> |
| | | onclick={openToInvoiceJs} |
| | | disabled={isOpenToInvoiceDisabled} |
| | | > |
| | | 开票 |
| | | </button> |
| | | </template> |
| | | </td> |
| | | |
| | |
| | | <template if:false={EditAble}> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder" |
| | | onclick={uploadOrder}>上传附件</button> |
| | | onclick={uploadOrder} |
| | | > |
| | | 上传附件 |
| | | </button> |
| | | </template> |
| | | </td> |
| | | </tr> |
| | | <tr style="height: 5px;"></tr> |
| | | <tr style="height: 5px"></tr> |
| | | <tr> |
| | | <td></td> |
| | | <td> |
| | |
| | | disabled={isPraseToPDFDisabled}></lightning-button> --> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder" |
| | | onclick={PraseToPDFJs} disabled={isPraseToPDFDisabled}>打印指示单</button> |
| | | onclick={PraseToPDFJs} |
| | | disabled={isPraseToPDFDisabled} |
| | | > |
| | | 打印指示单 |
| | | </button> |
| | | </template> |
| | | </td> |
| | | |
| | | <td> |
| | | |
| | | <template if:true={isOpenReportShow}> |
| | | <!-- <lightning-button label="显示明细 " onclick={openReportJs} |
| | | style="width: 150px" disabled={isOpenReportDisabled}></lightning-button> --> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder" |
| | | onclick={openReportJs} disabled={isOpenReportDisabled}>显示明细</button> |
| | | onclick={openReportJs} |
| | | disabled={isOpenReportDisabled} |
| | | > |
| | | 显示明细 |
| | | </button> |
| | | </template> |
| | | </td> |
| | | <td> |
| | | |
| | | <template if:true={isDeleteShow}> |
| | | <!-- <lightning-button label="删除" onclick={DeleteConsumable} style="width: 150px" |
| | | disabled={isDeleteDisabled}></lightning-button> --> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder" |
| | | onclick={DeleteConsumable} disabled={isDeleteDisabled}>删除</button> |
| | | onclick={DeleteConsumable} |
| | | disabled={isDeleteDisabled} |
| | | > |
| | | 删除 |
| | | </button> |
| | | </template> |
| | | </td> |
| | | <td></td> |
| | |
| | | <div draggable="false"> |
| | | <!-- SummonsStatus_c__c == '价格未定' --> |
| | | <template if:true={summonsStatusPriceNotDetermined}> |
| | | <lightning-record-edit-form object-api-name="Consumable_order__c" record-id={cocId} |
| | | onload={handleLoad}> |
| | | <lightning-record-edit-form |
| | | object-api-name="Consumable_order__c" |
| | | record-id={cocId} |
| | | onload={handleLoad} |
| | | > |
| | | <!-- 出库单号 出库单状态 --> |
| | | <lightning-layout multiple-rows="true"> |
| | | <template if:true={isSummonsFlag}> |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | |
| | | <lightning-layout-item size="5"> |
| | | <lightning-output-field field-name="Name" |
| | | class="hehe-layoutItem"></lightning-output-field> |
| | | <lightning-output-field |
| | | field-name="Name" |
| | | class="hehe-layoutItem" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item class="hehe-layoutItem" size="5" |
| | | style="padding-left: 100px;"> |
| | | <lightning-layout-item |
| | | class="hehe-layoutItem" |
| | | size="5" |
| | | style="padding-left: 100px" |
| | | > |
| | | <lightning-output-field |
| | | field-name="SummonsStatus_c__c"></lightning-output-field> |
| | | field-name="SummonsStatus_c__c" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | |
| | | |
| | | </template> |
| | | </lightning-layout> |
| | | |
| | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | |
| | | <lightning-layout-item class="hehe-layoutItem" size="5"> |
| | | <lightning-output-field field-name="SummonsForDirction__c" |
| | | class="searchName"></lightning-output-field> |
| | | <lightning-output-field |
| | | field-name="SummonsForDirction__c" |
| | | class="searchName" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item class="hehe-layoutItem" size="5" |
| | | style="padding-left: 100px;"> |
| | | <lightning-output-field field-name="Billed_Status__c" |
| | | class="searchName"></lightning-output-field> |
| | | <lightning-layout-item |
| | | class="hehe-layoutItem" |
| | | size="5" |
| | | style="padding-left: 100px" |
| | | > |
| | | <lightning-output-field |
| | | field-name="Billed_Status__c" |
| | | class="searchName" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | |
| | | |
| | | </lightning-layout> |
| | | |
| | | <!-- 二级经销商 --> |
| | | <template if:true={isSummonsForDirctionTwoShow}> |
| | | <lightning-layout multiple-rows="true"> |
| | | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | |
| | | <lightning-layout-item class="hehe-layoutItem" size="5"> |
| | | <lightning-output-field |
| | | field-name="Order_Dealer_Info__c"></lightning-output-field> |
| | | field-name="Order_Dealer_Info__c" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | |
| | | |
| | | </lightning-layout> |
| | | </template> |
| | | |
| | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | |
| | | <lightning-layout-item class="hehe-layoutItem" size="5"> |
| | | <lightning-output-field class="hideHelpText" |
| | | field-name="ShipmentAccount__c"></lightning-output-field> |
| | | <lightning-output-field |
| | | class="hideHelpText" |
| | | field-name="ShipmentAccount__c" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item class="hehe-layoutItem" size="5" |
| | | style="padding-left: 100px;"> |
| | | <lightning-input-field data-field={ConInvoice_Code__c} |
| | | onchange={invoiceChange} field-name="ConInvoice_Code__c" |
| | | class="inputFont"></lightning-input-field> |
| | | <lightning-layout-item |
| | | class="hehe-layoutItem" |
| | | size="5" |
| | | style="padding-left: 100px" |
| | | > |
| | | <lightning-input-field |
| | | data-field={ConInvoice_Code__c} |
| | | onchange={invoiceChange} |
| | | field-name="ConInvoice_Code__c" |
| | | class="inputFont" |
| | | ></lightning-input-field> |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | |
| | | |
| | | </lightning-layout> |
| | | |
| | | <!-- 科室 出库金额 --> |
| | |
| | | |
| | | <lightning-layout-item class="hehe-layoutItem" size="5"> |
| | | <lightning-output-field |
| | | field-name="Order_ForCustomerText__c"></lightning-output-field> |
| | | field-name="Order_ForCustomerText__c" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item class="hehe-layoutItem" size="5" |
| | | style="padding-left: 100px;"> |
| | | <lightning-layout-item |
| | | class="hehe-layoutItem" |
| | | size="5" |
| | | style="padding-left: 100px" |
| | | > |
| | | <lightning-output-field |
| | | field-name="Shipment_total_amount__c"></lightning-output-field> |
| | | field-name="Shipment_total_amount__c" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | |
| | | |
| | | </lightning-layout> |
| | | |
| | | <!-- 没有确定价格 --> |
| | | <lightning-layout multiple-rows="true"> |
| | | |
| | | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | |
| | | <lightning-layout-item class="hehe-layoutItem" size="5"> |
| | | <lightning-output-field |
| | | field-name="NoConfirmedPrice__c"></lightning-output-field> |
| | | field-name="NoConfirmedPrice__c" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | |
| | | |
| | | </lightning-layout> |
| | | </lightning-record-edit-form> |
| | | </template> |
| | | |
| | | <!-- SummonsStatus_c__c != '价格未定' --> |
| | | <template if:false={summonsStatusPriceNotDetermined}> |
| | | <lightning-record-edit-form object-api-name="Consumable_order__c" record-id={cocId} |
| | | onsubmit={handleSubmit} onload={handleLoad}> |
| | | <lightning-record-edit-form |
| | | object-api-name="Consumable_order__c" |
| | | record-id={cocId} |
| | | onsubmit={handleSubmit} |
| | | onload={handleLoad} |
| | | > |
| | | <!-- 出库单号 出库单状态 --> |
| | | <lightning-layout multiple-rows="true"> |
| | | <template if:true={isSummonsFlag}> |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | |
| | | <lightning-layout-item class="hehe-layoutItem" size="5"> |
| | | <lightning-output-field field-name="Name"></lightning-output-field> |
| | | <lightning-output-field |
| | | field-name="Name" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item class="hehe-layoutItem" size="5" |
| | | style="padding-left: 100px;"> |
| | | <lightning-layout-item |
| | | class="hehe-layoutItem" |
| | | size="5" |
| | | style="padding-left: 100px" |
| | | > |
| | | <lightning-output-field |
| | | field-name="SummonsStatus_c__c"></lightning-output-field> |
| | | field-name="SummonsStatus_c__c" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | |
| | | <lightning-layout-item class="hehe-layoutItem" size="5"> |
| | | <lightning-input-field data-field="summonsForDirction" |
| | | value={summonsForDirction} field-name="SummonsForDirction__c" |
| | | required="true" onchange={ChangeDirction} |
| | | class="inputFont"></lightning-input-field> |
| | | <lightning-input-field |
| | | data-field="summonsForDirction" |
| | | value={summonsForDirction} |
| | | field-name="SummonsForDirction__c" |
| | | required="true" |
| | | onchange={ChangeDirction} |
| | | class="inputFont" |
| | | ></lightning-input-field> |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item class="hehe-layoutItem" size="5" |
| | | style="padding-left: 100px;"> |
| | | <lightning-combobox data-field="secondaryDistributor" |
| | | name="secondaryDistributor" label="二级经销商" |
| | | value={secondaryDistributor} placeholder="请选择..." |
| | | options={secondaryDistributorOptions} variant="label-inline" |
| | | onchange={dataChange} disabled={isDisabledSecondaryDistributor} |
| | | class="inputFont"></lightning-combobox> |
| | | <lightning-layout-item |
| | | class="hehe-layoutItem" |
| | | size="5" |
| | | style="padding-left: 100px" |
| | | > |
| | | <lightning-combobox |
| | | data-field="secondaryDistributor" |
| | | name="secondaryDistributor" |
| | | label="二级经销商" |
| | | value={secondaryDistributor} |
| | | placeholder="请选择..." |
| | | options={secondaryDistributorOptions} |
| | | variant="label-inline" |
| | | onchange={dataChange} |
| | | disabled={isDisabledSecondaryDistributor} |
| | | class="inputFont" |
| | | ></lightning-combobox> |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | |
| | | |
| | | </lightning-layout> |
| | | |
| | | <!-- 客户名 经销商录入 --> |
| | |
| | | |
| | | <lightning-layout-item class="hehe-layoutItem" size="5"> |
| | | <div |
| | | class="slds-form-element__control slds-input-has-icon slds-input-has-icon_right"> |
| | | <lightning-icon size="x-small" |
| | | class="slds-form-element__control slds-input-has-icon slds-input-has-icon_right" |
| | | > |
| | | <lightning-icon |
| | | size="x-small" |
| | | class="iconMargin slds-icon slds-input__icon slds-input__icon_right slds-icon-text-default" |
| | | icon-name="utility:search"></lightning-icon> |
| | | <lightning-input type="text" name="HospitalName" label="客户名" |
| | | value={HospitalName} variant="label-inline" |
| | | onclick={searchHospitalNameModal} data-field="HospitalName" |
| | | disabled={isDisabledHospitalName} onchange={clearAgencyI} |
| | | class="inputFont"></lightning-input> |
| | | icon-name="utility:search" |
| | | ></lightning-icon> |
| | | <lightning-input |
| | | type="text" |
| | | name="HospitalName" |
| | | label="客户名" |
| | | value={HospitalName} |
| | | variant="label-inline" |
| | | onclick={searchHospitalNameModal} |
| | | data-field="HospitalName" |
| | | disabled={isDisabledHospitalName} |
| | | onchange={clearAgencyI} |
| | | class="inputFont" |
| | | ></lightning-input> |
| | | </div> |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item class="hehe-layoutItem" size="5" |
| | | style="padding-left: 100px;"> |
| | | <lightning-layout-item |
| | | class="hehe-layoutItem" |
| | | size="5" |
| | | style="padding-left: 100px" |
| | | > |
| | | <template if:true={isMutualTransferGoods}> |
| | | <c-lex-lookup onsearch={handleSearch} |
| | | onselectionchange={handleSelectionChange} label="经销商(录入)" |
| | | variant="label-inline" placeholder="搜索经销商" |
| | | <c-lex-lookup |
| | | onsearch={handleSearch} |
| | | onselectionchange={handleSelectionChange} |
| | | label="经销商(录入)" |
| | | variant="label-inline" |
| | | placeholder="搜索经销商" |
| | | onisdisabledfordealertext={isDisabledForDealerText} |
| | | account-value={accountValue} onblur={vpClear2Delay} |
| | | disabled={isDisabledForDealerText} class="inputFont"> |
| | | account-value={accountValue} |
| | | onblur={vpClear2Delay} |
| | | disabled={isDisabledForDealerText} |
| | | class="inputFont" |
| | | > |
| | | </c-lex-lookup> |
| | | </template> |
| | | <template if:false={isMutualTransferGoods}> |
| | | <lightning-input type="text" name="Order_ForDealerText__c" |
| | | label="经销商(录入)" value={ForDealerText} onchange={dataChange} |
| | | <lightning-input |
| | | type="text" |
| | | name="Order_ForDealerText__c" |
| | | label="经销商(录入)" |
| | | value={ForDealerText} |
| | | onchange={dataChange} |
| | | data-field="Order_ForDealerText__c" |
| | | disabled={isDisabledForDealerText} variant="label-inline" |
| | | class="inputFont"> |
| | | disabled={isDisabledForDealerText} |
| | | variant="label-inline" |
| | | class="inputFont" |
| | | > |
| | | </lightning-input> |
| | | </template> |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | |
| | | |
| | | </lightning-layout> |
| | | |
| | | <!-- 科室 总金额 --> |
| | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | |
| | | <lightning-layout-item class="hehe-layoutItem" size="5"> |
| | | <lightning-input-field onchange={dataChange} |
| | | data-field="ForCustomerText" value={ForCustomerText} |
| | | <lightning-input-field |
| | | onchange={dataChange} |
| | | data-field="ForCustomerText" |
| | | value={ForCustomerText} |
| | | field-name="Order_ForCustomerText__c" |
| | | disabled={isDisabledForCustomerText} |
| | | class="inputFont"></lightning-input-field> |
| | | class="inputFont" |
| | | ></lightning-input-field> |
| | | </lightning-layout-item> |
| | | |
| | | |
| | | |
| | | <lightning-layout-item class="hehe-layoutItem" size="5" |
| | | style="padding-left: 100px;"> |
| | | <lightning-input type="text" name="sumPrice" label="总金额" |
| | | value={sumPrice} variant="label-inline" onchange={dataChange} |
| | | data-field="sumPrice" readonly></lightning-input> |
| | | <lightning-layout-item |
| | | class="hehe-layoutItem" |
| | | size="5" |
| | | style="padding-left: 100px" |
| | | > |
| | | <lightning-input |
| | | type="text" |
| | | name="sumPrice" |
| | | label="总金额" |
| | | value={sumPrice} |
| | | variant="label-inline" |
| | | onchange={dataChange} |
| | | data-field="sumPrice" |
| | | readonly |
| | | ></lightning-input> |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | |
| | | |
| | | <!-- 没有确定价格 --> |
| | | <lightning-layout multiple-rows="true"> |
| | | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | |
| | | <lightning-layout-item class="hehe-layoutItem" size="5"> |
| | | <lightning-input-field value={NoConfirmedPrice} |
| | | field-name="NoConfirmedPrice__c" data-field="NoConfirmedPrice" |
| | | onchange={dataChange}></lightning-input-field> |
| | | <lightning-input-field |
| | | value={NoConfirmedPrice} |
| | | field-name="NoConfirmedPrice__c" |
| | | data-field="NoConfirmedPrice" |
| | | onchange={dataChange} |
| | | ></lightning-input-field> |
| | | </lightning-layout-item> |
| | | |
| | | |
| | | |
| | | </lightning-layout> |
| | | </lightning-record-edit-form> |
| | | </template> |
| | |
| | | <div style="padding: 7px"> |
| | | <div lwc:dom="manual" class="resultDiv"></div> |
| | | <div draggable="false"> |
| | | <lightning-record-edit-form object-api-name="Consumable_order__c" record-id={cocId} |
| | | onload={handleLoad2}> |
| | | <lightning-record-edit-form |
| | | object-api-name="Consumable_order__c" |
| | | record-id={cocId} |
| | | onload={handleLoad2} |
| | | > |
| | | <!-- 出库单号 出库单状态 --> |
| | | <lightning-layout multiple-rows="true"> |
| | | <template if:true={isSummonsFlag}> |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | |
| | | <lightning-layout-item size="5"> |
| | | <lightning-output-field field-name="Name" |
| | | class="hehe-layoutItem"></lightning-output-field> |
| | | <lightning-output-field |
| | | field-name="Name" |
| | | class="hehe-layoutItem" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | |
| | | |
| | | |
| | | <lightning-layout-item size="5" style="padding-left: 100px;"> |
| | | <lightning-output-field field-name="SummonsStatus_c__c" |
| | | class="hehe-layoutItem"></lightning-output-field> |
| | | <lightning-layout-item |
| | | size="5" |
| | | style="padding-left: 100px" |
| | | > |
| | | <lightning-output-field |
| | | field-name="SummonsStatus_c__c" |
| | | class="hehe-layoutItem" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | |
| | | <lightning-layout-item size="5"> |
| | | <lightning-output-field field-name="SummonsForDirction__c" |
| | | class="hehe-layoutItem"></lightning-output-field> |
| | | <lightning-output-field |
| | | field-name="SummonsForDirction__c" |
| | | class="hehe-layoutItem" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item size="5" style="padding-left: 100px;"> |
| | | <lightning-output-field field-name="Billed_Status__c" |
| | | class="hehe-layoutItem"></lightning-output-field> |
| | | <lightning-layout-item size="5" style="padding-left: 100px"> |
| | | <lightning-output-field |
| | | field-name="Billed_Status__c" |
| | | class="hehe-layoutItem" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | |
| | | |
| | | </lightning-layout> |
| | | |
| | | <!-- 二级经销商 --> |
| | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | |
| | | <lightning-layout-item size="5"> |
| | | <lightning-output-field field-name="Order_Dealer_Info__c" |
| | | class="hehe-layoutItem"></lightning-output-field> |
| | | <lightning-output-field |
| | | field-name="Order_Dealer_Info__c" |
| | | class="hehe-layoutItem" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | </lightning-layout> |
| | | </template> |
| | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | |
| | | <lightning-layout-item size="5" class="hehe-layoutItem"> |
| | | <lightning-output-field class="hideHelpText" |
| | | field-name="ShipmentAccount__c"></lightning-output-field> |
| | | <lightning-output-field |
| | | class="hideHelpText" |
| | | field-name="ShipmentAccount__c" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | |
| | | <template if:true={isConInvoiceShow}> |
| | | <lightning-layout-item size="5" style="padding-left: 100px;"> |
| | | <lightning-input-field data-field={ConInvoice_Code__c} |
| | | onchange={invoiceChange} field-name="ConInvoice_Code__c" |
| | | class="hehe-layoutItem inputFont"></lightning-input-field> |
| | | <lightning-layout-item |
| | | size="5" |
| | | style="padding-left: 100px" |
| | | > |
| | | <lightning-input-field |
| | | data-field={ConInvoice_Code__c} |
| | | onchange={invoiceChange} |
| | | field-name="ConInvoice_Code__c" |
| | | class="hehe-layoutItem inputFont" |
| | | ></lightning-input-field> |
| | | </lightning-layout-item> |
| | | </template> |
| | | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | |
| | | |
| | | </lightning-layout> |
| | | |
| | | <!-- 科室 出库金额 --> |
| | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | |
| | | <lightning-layout-item size="5"> |
| | | <lightning-output-field field-name="Order_ForCustomerText__c" |
| | | class="hehe-layoutItem"></lightning-output-field> |
| | | <lightning-output-field |
| | | field-name="Order_ForCustomerText__c" |
| | | class="hehe-layoutItem" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item size="5" style="padding-left: 100px;"> |
| | | <lightning-output-field field-name="Shipment_total_amount__c" |
| | | class="hehe-layoutItem"></lightning-output-field> |
| | | <lightning-layout-item size="5" style="padding-left: 100px"> |
| | | <lightning-output-field |
| | | field-name="Shipment_total_amount__c" |
| | | class="hehe-layoutItem" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | |
| | | |
| | | </lightning-layout> |
| | | |
| | | <!-- 没有确定价格 --> |
| | | <lightning-layout multiple-rows="true"> |
| | | |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | |
| | | <lightning-layout-item size="5"> |
| | | <lightning-output-field field-name="NoConfirmedPrice__c" |
| | | class="hehe-layoutItem"></lightning-output-field> |
| | | <lightning-output-field |
| | | field-name="NoConfirmedPrice__c" |
| | | class="hehe-layoutItem" |
| | | ></lightning-output-field> |
| | | </lightning-layout-item> |
| | | </lightning-layout> |
| | | |
| | | <!-- 附件预览 --> |
| | | <template if:false={EditAble}> |
| | | <lightning-layout multiple-rows="true"> |
| | | <lightning-layout-item size="1"> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item size="1"> </lightning-layout-item> |
| | | <lightning-layout-item size="10"> |
| | | <lightning-card class="attListTitle" variant="Narrow" title="附件列表" |
| | | icon-name="utility:attach"> |
| | | |
| | | <lightning-card |
| | | class="attListTitle" |
| | | variant="Narrow" |
| | | title="附件列表" |
| | | icon-name="utility:attach" |
| | | > |
| | | <lightning-layout slot="footer" multiple-rows="true"> |
| | | <template for:each={fileData} for:item="item" for:index="index"> |
| | | <lightning-layout-item padding="around-none" size="2" |
| | | <template |
| | | for:each={fileData} |
| | | for:item="item" |
| | | for:index="index" |
| | | > |
| | | <lightning-layout-item |
| | | padding="around-none" |
| | | size="2" |
| | | key={item.recordId} |
| | | style="text-align: left;padding:5px;word-wrap:break-word; word-break:break-all;"> |
| | | <lightning-icon title={item.Title} |
| | | style="margin-left: 20px;" icon-name="doctype:gform" |
| | | style=" |
| | | text-align: left; |
| | | padding: 5px; |
| | | word-wrap: break-word; |
| | | word-break: break-all; |
| | | " |
| | | > |
| | | <lightning-icon |
| | | title={item.Title} |
| | | style="margin-left: 20px" |
| | | icon-name="doctype:gform" |
| | | alternative-text={item.Title} |
| | | size="large"></lightning-icon><br /> |
| | | <div title={item.Title} style="width: 100px;text-overflow: ellipsis;overflow: hidden;white-space: nowrap;"> |
| | | size="large" |
| | | ></lightning-icon |
| | | ><br /> |
| | | <div |
| | | title={item.Title} |
| | | style=" |
| | | width: 100px; |
| | | text-overflow: ellipsis; |
| | | overflow: hidden; |
| | | white-space: nowrap; |
| | | " |
| | | > |
| | | {item.Title} |
| | | </div> |
| | | <p> |
| | | <!-- <a data-fileid ={item.documentId} onclick={previweAtt}> --> |
| | | <a href={item.attUrl} target="_blank"> |
| | | 预览 |
| | | </a> · |
| | | <a href={item.downloadUrl}> |
| | | 下载 |
| | | </a> · |
| | | 预览 </a |
| | | > · |
| | | <a href={item.downloadUrl}> 下载 </a |
| | | > · |
| | | <a data-fileid={item.Id} onclick={deleteAtt}> |
| | | 删除 |
| | | </a> |
| | |
| | | </lightning-layout-item> |
| | | </lightning-layout> |
| | | </template> |
| | | |
| | | </lightning-record-edit-form> |
| | | </div> |
| | | </div> |
| | |
| | | <!-- 检索 --> |
| | | <template if:true={isSearchShow}> |
| | | <div class="borderCss"> |
| | | <div style="padding: 3px;"> |
| | | <div style="padding: 3px"> |
| | | <div lwc:dom="manual" class="resultDiv"></div> |
| | | <div draggable="false"> |
| | | <lightning-layout multiple-rows style="margin-top: 10px;"> |
| | | <lightning-layout-item style="padding-left: 10px;" flexibility="auto"> |
| | | <lightning-layout multiple-rows style="margin-top: 10px"> |
| | | <lightning-layout-item |
| | | style="padding-left: 10px" |
| | | flexibility="auto" |
| | | > |
| | | <div class="slds-grid slds-grid_vertical-align-center"> |
| | | <div class="slds-form-element__label">消耗品名称</div> |
| | | <lightning-input type="text" name="consumableName" label="消耗品名称" |
| | | value={consumableName} variant="label-hidden" onchange={dataChange} |
| | | data-field="consumableName" class="inputFont" |
| | | style="width:150px"></lightning-input> |
| | | <lightning-input |
| | | type="text" |
| | | name="consumableName" |
| | | label="消耗品名称" |
| | | value={consumableName} |
| | | variant="label-hidden" |
| | | onchange={dataChange} |
| | | data-field="consumableName" |
| | | class="inputFont" |
| | | style="width: 150px" |
| | | ></lightning-input> |
| | | </div> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item flexibility="auto"> |
| | | <div class="slds-grid slds-grid_vertical-align-center"> |
| | | <div class="slds-form-element__label" style="width:80px">第3分类</div> |
| | | <lightning-combobox name="progress" label="第3分类" value={Category3} |
| | | variant="label-hidden" options={category3Options} onchange={dataChange} |
| | | data-field="Category3" style="min-width: 120px;" |
| | | class="inputFont"></lightning-combobox> |
| | | <div class="slds-form-element__label" style="width: 80px"> |
| | | 第3分类 |
| | | </div> |
| | | <lightning-combobox |
| | | name="progress" |
| | | label="第3分类" |
| | | value={Category3} |
| | | variant="label-hidden" |
| | | options={category3Options} |
| | | onchange={dataChange} |
| | | data-field="Category3" |
| | | style="min-width: 120px" |
| | | class="inputFont" |
| | | ></lightning-combobox> |
| | | </div> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item flexibility="auto"> |
| | | <div class="slds-grid slds-grid_vertical-align-center"> |
| | | <div class="slds-form-element__label" style="width:80px">第4分类</div> |
| | | <lightning-combobox name="progress" label="第4分类" value={Category4} |
| | | variant="label-hidden" options={category4Options} onchange={dataChange} |
| | | data-field="Category4" style="min-width: 120px;" |
| | | class="inputFont"></lightning-combobox> |
| | | <div class="slds-form-element__label" style="width: 80px"> |
| | | 第4分类 |
| | | </div> |
| | | |
| | | <lightning-combobox |
| | | name="progress" |
| | | label="第4分类" |
| | | value={Category4} |
| | | variant="label-hidden" |
| | | options={category4Options} |
| | | onchange={dataChange} |
| | | data-field="Category4" |
| | | style="min-width: 120px" |
| | | class="inputFont" |
| | | ></lightning-combobox> |
| | | </div> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item flexibility="auto"> |
| | | <div class="slds-grid slds-grid_vertical-align-center"> |
| | | <div class="slds-form-element__label" style="width:80px">第5分类</div> |
| | | <lightning-combobox name="progress" label="第5分类" value={Category5} |
| | | variant="label-hidden" onchange={dataChange} data-field="Category5" |
| | | options={category5Options} style="min-width: 120px;" |
| | | class="inputFont"></lightning-combobox> |
| | | <div class="slds-form-element__label" style="width: 80px"> |
| | | 第5分类 |
| | | </div> |
| | | |
| | | <lightning-combobox |
| | | name="progress" |
| | | label="第5分类" |
| | | value={Category5} |
| | | variant="label-hidden" |
| | | onchange={dataChange} |
| | | data-field="Category5" |
| | | options={category5Options} |
| | | style="min-width: 120px" |
| | | class="inputFont" |
| | | ></lightning-combobox> |
| | | </div> |
| | | </lightning-layout-item> |
| | | <template if:true={hasHosPro}> |
| | | <lightning-layout-item flexibility="auto"> |
| | | <div class="slds-grid slds-grid_vertical-align-center"> |
| | | <div class="slds-form-element__label">医院特价</div> |
| | | <lightning-combobox name="progress" label="医院特价" value={outOutPattern} |
| | | variant="label-hidden" options={outOutPatternOptionList} |
| | | onchange={dataChange} data-field="outOutPattern" |
| | | style="min-width: 120px;" class="inputFont"></lightning-combobox> |
| | | <lightning-combobox |
| | | name="progress" |
| | | label="医院特价" |
| | | value={outOutPattern} |
| | | variant="label-hidden" |
| | | options={outOutPatternOptionList} |
| | | onchange={dataChange} |
| | | data-field="outOutPattern" |
| | | style="min-width: 120px" |
| | | class="inputFont" |
| | | ></lightning-combobox> |
| | | </div> |
| | | </lightning-layout-item> |
| | | </template> |
| | | </lightning-layout> |
| | | |
| | | <lightning-layout multiple-rows style="margin-top: 10px;"> |
| | | <lightning-layout-item style="padding-left: 10px;visibility:hidden;" |
| | | flexibility="auto"> |
| | | <lightning-layout multiple-rows style="margin-top: 10px"> |
| | | <lightning-layout-item |
| | | style="padding-left: 10px; visibility: hidden" |
| | | flexibility="auto" |
| | | > |
| | | <div class="slds-grid slds-grid_vertical-align-center"> |
| | | <div class="slds-form-element__label">消耗品名称</div> |
| | | <lightning-input type="text" name="consumableName" label="消耗品名称" |
| | | value={consumableName} variant="label-hidden" onchange={dataChange} |
| | | data-field="consumableName" class="inputFont" |
| | | style="width:150px"></lightning-input> |
| | | <lightning-input |
| | | type="text" |
| | | name="consumableName" |
| | | label="消耗品名称" |
| | | value={consumableName} |
| | | variant="label-hidden" |
| | | onchange={dataChange} |
| | | data-field="consumableName" |
| | | class="inputFont" |
| | | style="width: 150px" |
| | | ></lightning-input> |
| | | </div> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item flexibility="auto" style="visibility:hidden;"> |
| | | <lightning-layout-item |
| | | flexibility="auto" |
| | | style="visibility: hidden" |
| | | > |
| | | <div class="slds-grid slds-grid_vertical-align-center"> |
| | | <div class="slds-form-element__label" style="width:80px">第3分类</div> |
| | | <lightning-combobox name="progress" label="第3分类" value={Category3} |
| | | variant="label-hidden" options={category3Options} onchange={dataChange} |
| | | data-field="Category3" style="min-width: 120px;" |
| | | class="inputFont"></lightning-combobox> |
| | | <div class="slds-form-element__label" style="width: 80px"> |
| | | 第3分类 |
| | | </div> |
| | | <lightning-combobox |
| | | name="progress" |
| | | label="第3分类" |
| | | value={Category3} |
| | | variant="label-hidden" |
| | | options={category3Options} |
| | | onchange={dataChange} |
| | | data-field="Category3" |
| | | style="min-width: 120px" |
| | | class="inputFont" |
| | | ></lightning-combobox> |
| | | </div> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item flexibility="auto" style="visibility:hidden;"> |
| | | <lightning-layout-item |
| | | flexibility="auto" |
| | | style="visibility: hidden" |
| | | > |
| | | <div class="slds-grid slds-grid_vertical-align-center"> |
| | | <div class="slds-form-element__label" style="width:80px">第4分类</div> |
| | | <lightning-combobox name="progress" label="第4分类" value={Category4} |
| | | variant="label-hidden" options={category4Options} onchange={dataChange} |
| | | data-field="Category4" style="min-width: 120px;" |
| | | class="inputFont"></lightning-combobox> |
| | | <div class="slds-form-element__label" style="width: 80px"> |
| | | 第4分类 |
| | | </div> |
| | | |
| | | <lightning-combobox |
| | | name="progress" |
| | | label="第4分类" |
| | | value={Category4} |
| | | variant="label-hidden" |
| | | options={category4Options} |
| | | onchange={dataChange} |
| | | data-field="Category4" |
| | | style="min-width: 120px" |
| | | class="inputFont" |
| | | ></lightning-combobox> |
| | | </div> |
| | | </lightning-layout-item> |
| | | <template if:false={hasHosPro}> |
| | | <lightning-layout-item flexibility="auto"> |
| | |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder lexsearchStyle" |
| | | onclick={searchProductJs} |
| | | style="min-width: 80px;max-width: 100px;">检索</button> |
| | | <button style="margin-left:10px;min-width: 80px;max-width: 100px;" |
| | | style="min-width: 80px; max-width: 100px" |
| | | > |
| | | 检索 |
| | | </button> |
| | | <button |
| | | style=" |
| | | margin-left: 10px; |
| | | min-width: 80px; |
| | | max-width: 100px; |
| | | " |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder lexclearStyle" |
| | | onclick={ClearJs}>清空</button> |
| | | onclick={ClearJs} |
| | | > |
| | | 清空 |
| | | </button> |
| | | </div> |
| | | </lightning-layout-item> |
| | | </template> |
| | | <template if:true={hasHosPro}> |
| | | <lightning-layout-item flexibility="auto" style="visibility:hidden;"> |
| | | <lightning-layout-item |
| | | flexibility="auto" |
| | | style="visibility: hidden" |
| | | > |
| | | <div class="slds-grid slds-grid_vertical-align-center"> |
| | | <div class="slds-form-element__label" style="width:80px">第5分类</div> |
| | | <lightning-combobox name="progress" label="第5分类" value={Category5} |
| | | variant="label-hidden" onchange={dataChange} data-field="Category5" |
| | | options={category5Options} style="min-width: 120px;" |
| | | class="inputFont"></lightning-combobox> |
| | | <div |
| | | class="slds-form-element__label" |
| | | style="width: 80px" |
| | | > |
| | | 第5分类 |
| | | </div> |
| | | <lightning-combobox |
| | | name="progress" |
| | | label="第5分类" |
| | | value={Category5} |
| | | variant="label-hidden" |
| | | onchange={dataChange} |
| | | data-field="Category5" |
| | | options={category5Options} |
| | | style="min-width: 120px" |
| | | class="inputFont" |
| | | ></lightning-combobox> |
| | | </div> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item flexibility="auto"> |
| | |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder lexsearchStyle" |
| | | onclick={searchProductJs} |
| | | style="min-width: 80px;max-width: 110px;">检索</button> |
| | | <button style="margin-left:10px;min-width: 80px;max-width: 110px;" |
| | | style="min-width: 80px; max-width: 110px" |
| | | > |
| | | 检索 |
| | | </button> |
| | | <button |
| | | style=" |
| | | margin-left: 10px; |
| | | min-width: 80px; |
| | | max-width: 110px; |
| | | " |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder lexclearStyle" |
| | | onclick={ClearJs}>清空</button> |
| | | onclick={ClearJs} |
| | | > |
| | | 清空 |
| | | </button> |
| | | </div> |
| | | </lightning-layout-item> |
| | | </template> |
| | |
| | | <div style="padding: 7px"> |
| | | <template if:true={EditAble}> |
| | | <template if:true={showTable}> |
| | | <c-lex-custom-lightning-datatable key-field="Id" data={data} columns={columns} |
| | | hide-checkbox-column={hideCheckboxColumn} onunitchange={handleUnitChange} |
| | | <c-lex-custom-lightning-datatable |
| | | key-field="Id" |
| | | data={data} |
| | | columns={columns} |
| | | hide-checkbox-column={hideCheckboxColumn} |
| | | onunitchange={handleUnitChange} |
| | | onshipmentnumber={handleShipmentNumber} |
| | | onshipmentunitprice={handleShipmentUnitPrice} onrowselection={getSelectedRows} |
| | | selected-rows={selectedRows} default-sort-direction={defaultSortDirection} |
| | | sorted-direction={sortDirection} sorted-by={sortedBy} onsort={onHandleSort} |
| | | style="word-wrap:break-word; word-break:break-all; " |
| | | class="wrapped-header-datatable" min-column-width="110"> |
| | | onshipmentunitprice={handleShipmentUnitPrice} |
| | | onrowselection={getSelectedRows} |
| | | selected-rows={selectedRows} |
| | | default-sort-direction={defaultSortDirection} |
| | | sorted-direction={sortDirection} |
| | | sorted-by={sortedBy} |
| | | onsort={onHandleSort} |
| | | style="word-wrap: break-word; word-break: break-all" |
| | | class="wrapped-header-datatable slds-is-selected" |
| | | > |
| | | </c-lex-custom-lightning-datatable> |
| | | </template> |
| | | <c-paginator onprevious={handlePrevious} onnext={handleNext} |
| | | onpageschange={handlePageschange} onfirst={handleFirst} onlast={handleLast} |
| | | page-size-options={pageSizeOptions} previous-button-disabled={previousButtonDisabled} |
| | | next-button-disabled={nextButtonDisabled} record-start={recordStart} |
| | | record-end={recordEnd} total-records={totalRecords}></c-paginator> |
| | | <c-paginator |
| | | onprevious={handlePrevious} |
| | | onnext={handleNext} |
| | | onpageschange={handlePageschange} |
| | | onfirst={handleFirst} |
| | | onlast={handleLast} |
| | | page-size-options={pageSizeOptions} |
| | | previous-button-disabled={previousButtonDisabled} |
| | | next-button-disabled={nextButtonDisabled} |
| | | record-start={recordStart} |
| | | record-end={recordEnd} |
| | | total-records={totalRecords} |
| | | ></c-paginator> |
| | | </template> |
| | | |
| | | <template if:false={EditAble}> |
| | | <template if:true={showTable}> |
| | | <c-lex-custom-lightning-datatable hide-checkbox-column key-field="Id" data={editData} |
| | | columns={editColumns} onunitchange={handleUnitChange} |
| | | <c-lex-custom-lightning-datatable |
| | | hide-checkbox-column |
| | | key-field="Id" |
| | | data={editData} |
| | | columns={editColumns} |
| | | onunitchange={handleUnitChange} |
| | | onshipmentnumber={handleShipmentNumber} |
| | | onshipmentunitprice={handleShipmentUnitPrice} onrowselection={getSelectedRows} |
| | | selected-rows={selectedRows} default-sort-direction={defaultSortDirection} |
| | | sorted-direction={sortDirection} sorted-by={sortedBy} onsort={onHandleSort} |
| | | style="word-wrap:break-word; word-break:break-all; " |
| | | class="wrapped-header-datatable" min-column-width="110"> |
| | | onshipmentunitprice={handleShipmentUnitPrice} |
| | | onrowselection={getSelectedRows} |
| | | selected-rows={selectedRows} |
| | | default-sort-direction={defaultSortDirection} |
| | | sorted-direction={sortDirection} |
| | | sorted-by={sortedBy} |
| | | onsort={onHandleSort} |
| | | style="word-wrap: break-word; word-break: break-all" |
| | | class="wrapped-header-datatable slds-is-selected" |
| | | > |
| | | </c-lex-custom-lightning-datatable> |
| | | <c-paginator onprevious={editHandlePrevious} onnext={editHandleNext} |
| | | onpageschange={editHandlePageschange} onfirst={editHandleFirst} |
| | | onlast={editHandleLast} page-size-options={pageSizeOptions} |
| | | <c-paginator |
| | | onprevious={editHandlePrevious} |
| | | onnext={editHandleNext} |
| | | onpageschange={editHandlePageschange} |
| | | onfirst={editHandleFirst} |
| | | onlast={editHandleLast} |
| | | page-size-options={pageSizeOptions} |
| | | previous-button-disabled={previousButtonDisabled} |
| | | next-button-disabled={nextButtonDisabled} record-start={recordStart} |
| | | record-end={recordEnd} total-records={totalRecords}></c-paginator> |
| | | next-button-disabled={nextButtonDisabled} |
| | | record-start={recordStart} |
| | | record-end={recordEnd} |
| | | total-records={totalRecords} |
| | | ></c-paginator> |
| | | </template> |
| | | </template> |
| | | |
| | | <template if:true={isEditShowSpinner}> |
| | | <lightning-spinner alternative-text="Uploading now"></lightning-spinner> |
| | | <lightning-spinner |
| | | alternative-text="Uploading now" |
| | | ></lightning-spinner> |
| | | </template> |
| | | </div> |
| | | </div> |
| | |
| | | </lightning-layout> |
| | | </div> |
| | | <div style="padding: 7px"> |
| | | <lightning-datatable key-field="id" data={consumableorderdetails2Records} |
| | | columns={consumableorderdetails2RecordsColumns} hide-checkbox-column |
| | | class="wrapped-header-datatable"> |
| | | <lightning-datatable |
| | | key-field="id" |
| | | data={consumableorderdetails2Records} |
| | | columns={consumableorderdetails2RecordsColumns} |
| | | hide-checkbox-column |
| | | class="wrapped-header-datatable" |
| | | > |
| | | </lightning-datatable> |
| | | </div> |
| | | </div> |
| | |
| | | </lightning-layout-item> |
| | | </lightning-layout> |
| | | </div> |
| | | <div style="padding: 7px;"> |
| | | <div style="padding: 7px"> |
| | | <div lwc:dom="manual" class="resultDiv"></div> |
| | | <div draggable="false"> |
| | | <lightning-layout multiple-rows="true" style="height:50px"> |
| | |
| | | <lightning-layout-item class="hehe-layoutItem" size="4"> |
| | | <!-- <lightning-button label="销售" onclick={SaveP} |
| | | style="margin-top:-10px"></lightning-button> --> |
| | | <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" |
| | | onclick={SaveP}>销售</button> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder" |
| | | onclick={SaveP} |
| | | > |
| | | 销售 |
| | | </button> |
| | | </lightning-layout-item> |
| | | </template> |
| | | <template if:false={isSales}> |
| | | <lightning-layout-item class="hehe-layoutItem" size="4"> |
| | | <!-- <lightning-button label="出货" onclick={SaveE}></lightning-button> --> |
| | | <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" |
| | | onclick={SaveE}>出货</button> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder" |
| | | onclick={SaveE} |
| | | > |
| | | 出货 |
| | | </button> |
| | | </lightning-layout-item> |
| | | </template> |
| | | <lightning-layout-item class="hehe-layoutItem" size="4"> |
| | |
| | | </lightning-layout> |
| | | |
| | | <template if:true={isShowInformation}> |
| | | <div class="borderCss" style="margin-top: 5px;"> |
| | | <div class="borderCss" style="margin-top: 5px"> |
| | | <div class="headerDorderCss"> |
| | | <lightning-layout> |
| | | <lightning-layout-item padding="around-small"> |
| | |
| | | <div style="padding: 7px"> |
| | | <div lwc:dom="manual" class="resultDiv"></div> |
| | | <div draggable="false"> |
| | | <lightning-record-edit-form object-api-name="Consumable_order__c" |
| | | record-id={cocId} onload={handleLoad2}> |
| | | <lightning-record-edit-form |
| | | object-api-name="Consumable_order__c" |
| | | record-id={cocId} |
| | | onload={handleLoad2} |
| | | > |
| | | <lightning-layout multiple-rows="true"> |
| | | <lightning-layout-item size="3" padding="around-small"> |
| | | <lightning-layout-item |
| | | size="3" |
| | | padding="around-small" |
| | | > |
| | | <!-- <lightning-output-field field-name="Name"></lightning-output-field> --> |
| | | <div class="slds-grid slds-grid_vertical-align-center"> |
| | | <div class="slds-form-element__label" style="padding: 0px;"> |
| | | 出库单号:</div> |
| | | <lightning-output-field field-name="Name" |
| | | variant="label-hidden"></lightning-output-field> |
| | | <div |
| | | class="slds-grid slds-grid_vertical-align-center" |
| | | > |
| | | <div |
| | | class="slds-form-element__label" |
| | | style="padding: 0px" |
| | | > |
| | | 出库单号: |
| | | </div> |
| | | <lightning-output-field |
| | | field-name="Name" |
| | | variant="label-hidden" |
| | | ></lightning-output-field> |
| | | </div> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item size="4" padding="around-small"> |
| | | <lightning-layout-item |
| | | size="4" |
| | | padding="around-small" |
| | | > |
| | | <!-- <lightning-output-field |
| | | field-name="ShipmentAccount__c" class="hideHelpText"></lightning-output-field> --> |
| | | <div |
| | | class="slds-grid slds-grid_vertical-align-center hehe-layoutItem"> |
| | | <div class="slds-form-element__label" style="padding: 0px;"> |
| | | 客户名:</div> |
| | | <lightning-output-field field-name="ShipmentAccount__c" |
| | | variant="label-hidden"></lightning-output-field> |
| | | class="slds-grid slds-grid_vertical-align-center hehe-layoutItem" |
| | | > |
| | | <div |
| | | class="slds-form-element__label" |
| | | style="padding: 0px" |
| | | > |
| | | 客户名: |
| | | </div> |
| | | <lightning-output-field |
| | | field-name="ShipmentAccount__c" |
| | | variant="label-hidden" |
| | | ></lightning-output-field> |
| | | </div> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item size="2" padding="around-small"> |
| | | <lightning-layout-item |
| | | size="2" |
| | | padding="around-small" |
| | | > |
| | | <!-- <lightning-output-field |
| | | field-name="Order_ForCustomerText__c"></lightning-output-field> --> |
| | | <div class="slds-grid slds-grid_vertical-align-center"> |
| | | <div class="slds-form-element__label" style="padding: 0px;"> |
| | | 科室:</div> |
| | | <div |
| | | class="slds-grid slds-grid_vertical-align-center" |
| | | > |
| | | <div |
| | | class="slds-form-element__label" |
| | | style="padding: 0px" |
| | | > |
| | | 科室: |
| | | </div> |
| | | <lightning-output-field |
| | | field-name="Order_ForCustomerText__c" |
| | | variant="label-hidden"></lightning-output-field> |
| | | variant="label-hidden" |
| | | ></lightning-output-field> |
| | | </div> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item size="2" padding="around-small"> |
| | | <lightning-layout-item |
| | | size="2" |
| | | padding="around-small" |
| | | > |
| | | <!-- <lightning-output-field |
| | | field-name="SummonsForDirction__c"></lightning-output-field> --> |
| | | <div class="slds-grid slds-grid_vertical-align-center"> |
| | | <div class="slds-form-element__label" style="padding: 0px;"> |
| | | 目的:</div> |
| | | <lightning-output-field field-name="SummonsForDirction__c" |
| | | variant="label-hidden"></lightning-output-field> |
| | | <div |
| | | class="slds-grid slds-grid_vertical-align-center" |
| | | > |
| | | <div |
| | | class="slds-form-element__label" |
| | | style="padding: 0px" |
| | | > |
| | | 目的: |
| | | </div> |
| | | <lightning-output-field |
| | | field-name="SummonsForDirction__c" |
| | | variant="label-hidden" |
| | | ></lightning-output-field> |
| | | </div> |
| | | </lightning-layout-item> |
| | | </lightning-layout> |
| | |
| | | <div style="padding: 7px"> |
| | | <div lwc:dom="manual" class="resultDiv"></div> |
| | | <div draggable="false"> |
| | | <lightning-record-edit-form object-api-name="Consumable_order__c" |
| | | record-id={cocId}> |
| | | <lightning-record-edit-form |
| | | object-api-name="Consumable_order__c" |
| | | record-id={cocId} |
| | | > |
| | | <lightning-layout multiple-rows="true"> |
| | | <lightning-layout-item size="1"></lightning-layout-item> |
| | | <lightning-layout-item |
| | | size="1" |
| | | ></lightning-layout-item> |
| | | <lightning-layout-item padding="around-small"> |
| | | <!-- <lightning-textarea name="Barcode" label="BarCode号" |
| | | onchange={dataChange} variant="label-inline" |
| | |
| | | value={Barcode}></lightning-textarea> --> |
| | | |
| | | <div class="slds-grid"> |
| | | <div class="slds-form-element__label">BarCode号</div> |
| | | <lightning-textarea name="Barcode" label="BarCode号" |
| | | onchange={dataChange} variant="label-hidden" |
| | | data-field="Barcode" value={Barcode} |
| | | style="min-width: 400px;"></lightning-textarea> |
| | | <div class="slds-form-element__label"> |
| | | BarCode号 |
| | | </div> |
| | | <lightning-textarea |
| | | name="Barcode" |
| | | label="BarCode号" |
| | | onchange={dataChange} |
| | | variant="label-hidden" |
| | | data-field="Barcode" |
| | | value={Barcode} |
| | | style="min-width: 400px" |
| | | ></lightning-textarea> |
| | | </div> |
| | | </lightning-layout-item> |
| | | <lightning-layout-item padding="around-small"> |
| | | <div class="slds-grid slds-grid_vertical-align-center"> |
| | | <div |
| | | class="slds-grid slds-grid_vertical-align-center" |
| | | > |
| | | <div class="slds-form-element__label"> |
| | | <!-- <lightning-button label="确认" |
| | | onclick={SalesearchProductJs}></lightning-button> --> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder" |
| | | onclick={SalesearchProductJs}>获取明细</button> |
| | | onclick={SalesearchProductJs} |
| | | > |
| | | 获取明细 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </lightning-layout-item> |
| | |
| | | style="word-wrap:break-word; word-break:break-all; " |
| | | class="wrapped-header-datatable"> |
| | | </lightning-datatable> --> |
| | | <c-lex-custom-lightning-datatable key-field="Id" data={salesData} |
| | | columns={salesColumns} onoutboundcount={handleOutboundCount} |
| | | <c-lex-custom-lightning-datatable |
| | | key-field="Id" |
| | | data={salesData} |
| | | columns={salesColumns} |
| | | onoutboundcount={handleOutboundCount} |
| | | hide-checkbox-column |
| | | style="word-wrap:break-word; word-break:break-all; " |
| | | class="wrapped-header-datatable" min-column-width="120"> |
| | | style="word-wrap: break-word; word-break: break-all" |
| | | class="wrapped-header-datatable" |
| | | > |
| | | </c-lex-custom-lightning-datatable> |
| | | </div> |
| | | </div> |
| | |
| | | <div style="padding: 7px"> |
| | | <div lwc:dom="manual" class="resultDiv"></div> |
| | | <div draggable="false"> |
| | | <lightning-datatable key-field="id" data={salesErrorData} |
| | | columns={salesErrorColumns} hide-checkbox-column min-column-width="120" |
| | | style="word-wrap:break-word; word-break:break-all; " |
| | | class="wrapped-header-datatable"> |
| | | <lightning-datatable |
| | | key-field="id" |
| | | data={salesErrorData} |
| | | columns={salesErrorColumns} |
| | | hide-checkbox-column |
| | | style="word-wrap: break-word; word-break: break-all" |
| | | class="wrapped-header-datatable" |
| | | > |
| | | </lightning-datatable> |
| | | </div> |
| | | </div> |
| | |
| | | <!-- <lightning-button label="销售" onclick={SaveP}></lightning-button> --> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder" |
| | | onclick={SaveP}>销售</button> |
| | | onclick={SaveP} |
| | | > |
| | | 销售 |
| | | </button> |
| | | </lightning-layout-item> |
| | | </template> |
| | | <template if:false={isSales}> |
| | |
| | | <!-- <lightning-button label="出货" onclick={SaveE}></lightning-button> --> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder" |
| | | onclick={SaveE}>出货</button> |
| | | onclick={SaveE} |
| | | > |
| | | 出货 |
| | | </button> |
| | | </lightning-layout-item> |
| | | </template> |
| | | <lightning-layout-item class="hehe-layoutItem" size="4"> |
| | |
| | | import { LightningElement, wire, api, track } from "lwc"; save |
| | | import { LightningElement, wire, api, track } from "lwc"; |
| | | save; |
| | | import init from "@salesforce/apex/LexSummonsCreatController.init"; |
| | | import { ShowToastEvent } from "lightning/platformShowToastEvent"; |
| | | import searchConsumableorderdetails from "@salesforce/apex/LexSummonsCreatController.searchConsumableorderdetails"; |
| | |
| | | import { getObjectInfo } from "lightning/uiObjectInfoApi"; |
| | | import hospitalInit from "@salesforce/apex/lexSearchAgencyHospitalController.init"; |
| | | import serContact from "@salesforce/apex/lexSearchAgencyHospitalController.serContact"; |
| | | import deleteAtt from '@salesforce/apex/LexSummonsCreatController.deleteAtt'; |
| | | import deleteAtt from "@salesforce/apex/LexSummonsCreatController.deleteAtt"; |
| | | import { NavigationMixin } from "lightning/navigation"; |
| | | //table css |
| | | import { loadStyle } from "lightning/platformResourceLoader"; |
| | | import WrappedHeaderTable from "@salesforce/resourceUrl/lexdatatable"; |
| | | |
| | | import ConsumableOutboundReportId from '@salesforce/label/c.ConsumableOutboundReportId'; |
| | | import ConsumableOutboundReportId from "@salesforce/label/c.ConsumableOutboundReportId"; |
| | | const customLabel = { |
| | | ConsumableOutboundReportId |
| | | } |
| | | }; |
| | | |
| | | export default class LexSummonsCreat extends NavigationMixin(LightningElement) { |
| | | @track label = customLabel; |
| | |
| | | @track results = [ |
| | | { |
| | | Id: "1", |
| | | Name: "z", |
| | | Name: "z" |
| | | }, |
| | | { |
| | | Id: "2", |
| | | Name: "h", |
| | | Name: "h" |
| | | }, |
| | | { |
| | | Id: "3", |
| | | Name: "j", |
| | | }, |
| | | Name: "j" |
| | | } |
| | | ]; |
| | | |
| | | @track COLS = [ |
| | |
| | | label: "Account Name", |
| | | type: "customName", |
| | | typeAttributes: { |
| | | accountName: { fieldName: "Name" }, |
| | | }, |
| | | }, |
| | | accountName: { fieldName: "Name" } |
| | | } |
| | | } |
| | | ]; |
| | | @track columns = [ |
| | | { |
| | |
| | | cellAttributes: { alignment: "right" }, |
| | | wrapText: true, |
| | | initialWidth: 50, |
| | | hideDefaultActions: true, |
| | | hideDefaultActions: true |
| | | }, |
| | | { |
| | | label: "CFDA状态", |
| | | fieldName: "SFDA_Status__c", |
| | | initialWidth: 105, |
| | | wrapText: true, |
| | | hideDefaultActions: true, |
| | | hideDefaultActions: true |
| | | }, |
| | | { |
| | | label: "注册证编码号", |
| | | fieldName: "approbation_No", |
| | | wrapText: true, |
| | | initialWidth: 130, |
| | | hideDefaultActions: true, |
| | | initialWidth: 105, |
| | | hideDefaultActions: true |
| | | }, |
| | | { |
| | | label: "注册证效期", |
| | | wrapText: true, |
| | | initialWidth: 115, |
| | | fieldName: "expiration_Date", |
| | | hideDefaultActions: true, |
| | | hideDefaultActions: true |
| | | }, |
| | | { |
| | | label: "第3分类", |
| | |
| | | wrapText: true, |
| | | initialWidth: 115, |
| | | hideDefaultActions: true, |
| | | sortable: true, |
| | | sortable: true |
| | | }, |
| | | { |
| | | label: "第4分类", |
| | |
| | | wrapText: true, |
| | | initialWidth: 115, |
| | | hideDefaultActions: true, |
| | | sortable: true, |
| | | sortable: true |
| | | }, |
| | | { |
| | | label: "第5分类", |
| | |
| | | wrapText: true, |
| | | initialWidth: 115, |
| | | hideDefaultActions: true, |
| | | sortable: true, |
| | | sortable: true |
| | | }, |
| | | { |
| | | label: "单位", |
| | |
| | | typeAttributes: { |
| | | unitValue: { fieldName: "unitValue" }, |
| | | unitOptions: { fieldName: "unitOptions" }, |
| | | recordId: { fieldName: "Id" }, |
| | | recordId: { fieldName: "Id" } |
| | | } |
| | | }, |
| | | { |
| | |
| | | cellAttributes: { alignment: "right" }, |
| | | typeAttributes: { |
| | | recordId: { fieldName: "Id" }, |
| | | shipmentNumber: { fieldName: "shipmentNumber" }, |
| | | }, |
| | | shipmentNumber: { fieldName: "shipmentNumber" } |
| | | } |
| | | }, |
| | | { |
| | | label: "出货单价(元)", |
| | |
| | | initialWidth: 120, |
| | | typeAttributes: { |
| | | recordId: { fieldName: "Id" }, |
| | | shippingUnitPrice: { fieldName: "shippingUnitPrice" }, |
| | | }, |
| | | shippingUnitPrice: { fieldName: "shippingUnitPrice" } |
| | | } |
| | | }, |
| | | { |
| | | label: "出货金额(元)", |
| | |
| | | cellAttributes: { alignment: "right" }, |
| | | hideDefaultActions: true, |
| | | typeAttributes: { |
| | | shipmentAmount: { fieldName: "shipmentAmount" }, |
| | | }, |
| | | shipmentAmount: { fieldName: "shipmentAmount" } |
| | | } |
| | | }, |
| | | { |
| | | label: "有效期内库存(盒)", |
| | |
| | | cellAttributes: { alignment: "right" }, |
| | | wrapText: true, |
| | | initialWidth: 160, |
| | | hideDefaultActions: true, |
| | | hideDefaultActions: true |
| | | }, |
| | | { |
| | | label: "有效期内库存(个)", |
| | |
| | | cellAttributes: { alignment: "right" }, |
| | | wrapText: true, |
| | | initialWidth: 160, |
| | | hideDefaultActions: true, |
| | | }, |
| | | hideDefaultActions: true |
| | | } |
| | | ]; |
| | | @track editColumns = [ |
| | | { |
| | | label: "消耗品名称", |
| | | fieldName: "Name__c", |
| | | hideDefaultActions: true, |
| | | initialWidth: 320, |
| | | initialWidth: 175, |
| | | wrapText: true, |
| | | sortable: true, |
| | | sortable: true |
| | | }, |
| | | { |
| | | label: "规格", |
| | | fieldName: "packinglist", |
| | | initialWidth: 80, |
| | | initialWidth: 50, |
| | | cellAttributes: { alignment: "right" }, |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: "CFDA状态", |
| | | fieldName: "SFDA_Status__c", |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: "注册证编码号", |
| | | fieldName: "approbation_No", |
| | | hideDefaultActions: true, |
| | | initialWidth: 130, |
| | | wrapText: true, |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: "注册证效期", |
| | | fieldName: "expiration_Date", |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: "第3分类", |
| | | fieldName: "Category3__c", |
| | | initialWidth: 100, |
| | | hideDefaultActions: true, |
| | | sortable: true, |
| | | wrapText: true, |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: "第4分类", |
| | | fieldName: "Category4__c", |
| | | initialWidth: 100, |
| | | hideDefaultActions: true, |
| | | sortable: true, |
| | | wrapText: true, |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: "第5分类", |
| | | fieldName: "Category5__c", |
| | | initialWidth: 100, |
| | | hideDefaultActions: true, |
| | | sortable: true, |
| | | wrapText: true, |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: "单位", |
| | | fieldName: "Box_Piece__c", |
| | | initialWidth: 50, |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: "出货数量", |
| | | fieldName: "Shipment_Count__c", |
| | | cellAttributes: { alignment: "right" }, |
| | | hideDefaultActions: true, |
| | | initialWidth: 100, |
| | | wrapText: true, |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: "出货单价(元)", |
| | | fieldName: "shippingUnitPrice", |
| | | type: "number", |
| | | typeAttributes: { |
| | | minimumFractionDigits: 2, |
| | | minimumFractionDigits: 2 |
| | | }, |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | }, |
| | | wrapText: true |
| | | } |
| | | ]; |
| | | @track editData = []; |
| | | |
| | |
| | | typeAttributes: { |
| | | label: "选择", |
| | | name: "Id2", |
| | | size: 1, |
| | | }, |
| | | size: 1 |
| | | } |
| | | }, |
| | | { |
| | | label: "医院名称", |
| | | fieldName: "Name", |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: "省份", |
| | | fieldName: "stateMasterName", |
| | | hideDefaultActions: true, |
| | | hideDefaultActions: true |
| | | } |
| | | ]; |
| | | |
| | |
| | | @track ConsumableOut_report = ""; |
| | | @track isMutualTransferGoods = false; |
| | | @track Barcode = ""; |
| | | @track summonsForDirction = ''; |
| | | @track accountValue = ''; |
| | | @track summonsForDirction = ""; |
| | | @track accountValue = ""; |
| | | |
| | | @track consumableorderdetails2RecordsColumns = [ |
| | | { |
| | | label: "消耗品名称", |
| | | fieldName: "ProdName", |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: "批次号", |
| | | fieldName: "orderdetails2SerialLotNo__c", |
| | | hideDefaultActions: true, |
| | | hideDefaultActions: true |
| | | }, |
| | | { |
| | | label: "管理编码", |
| | | fieldName: "orderdetails2TracingCode__c", |
| | | hideDefaultActions: true, |
| | | hideDefaultActions: true |
| | | }, |
| | | { |
| | | label: "使用期限", |
| | | fieldName: "orderdetails2Sterilization_limit__c", |
| | | hideDefaultActions: true, |
| | | }, |
| | | hideDefaultActions: true |
| | | } |
| | | ]; |
| | | @track consumableorderdetails2Records = []; |
| | | |
| | |
| | | label: "消耗品订单", |
| | | fieldName: "ConsumableorderminorUrl", |
| | | hideDefaultActions: true, |
| | | initialWidth: 210, |
| | | type: "url", |
| | | typeAttributes: { |
| | | label: { fieldName: "Consumable_order_minor__c" }, |
| | | target: "_blank", |
| | | target: "_blank" |
| | | }, |
| | | wrapText: true, |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: "消耗品明细2名称", |
| | | fieldName: "orderdetails2NameUrl", |
| | | type: "url", |
| | | initialWidth: 150, |
| | | typeAttributes: { |
| | | label: { fieldName: "orderdetails2Name" }, |
| | | target: "_blank", |
| | | target: "_blank" |
| | | }, |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | initialWidth: 240 |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: "单位", |
| | |
| | | { |
| | | label: "消耗品名称", |
| | | fieldName: "ProdName", |
| | | initialWidth: 100, |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: "发货日期", |
| | | fieldName: "Deliver_date__c", |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: "BarCode", |
| | | fieldName: "Bar_Code__c", |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | initialWidth: 400 |
| | | initialWidth: 380 |
| | | }, |
| | | { |
| | | label: "使用期限", |
| | | fieldName: "Sterilization_limit__c", |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | initialWidth: 120 |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: "出货数量", |
| | | fieldName: 'outboundCount', |
| | | fieldName: "outboundCount", |
| | | hideDefaultActions: true, |
| | | cellAttributes: { alignment: "right" }, |
| | | cellAttributes: { alignment: "right" } |
| | | } |
| | | ]; |
| | | @track salesData = []; |
| | |
| | | fieldName: "ConsumableorderminorUrl", |
| | | hideDefaultActions: true, |
| | | type: "url", |
| | | initialWidth: 210, |
| | | typeAttributes: { |
| | | label: { fieldName: "Consumable_order_minor__c" }, |
| | | target: "_blank", |
| | | target: "_blank" |
| | | }, |
| | | wrapText: true, |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: "消耗品明细2名称", |
| | | fieldName: "orderdetails2Name", |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | initialWidth: 240 |
| | | initialWidth: 150, |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: "消耗品名称", |
| | | fieldName: "ProdName", |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: "单位", |
| | |
| | | fieldName: "Bar_Code__c", |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | initialWidth: 400 |
| | | initialWidth: 380 |
| | | }, |
| | | { |
| | | label: "使用期限", |
| | | fieldName: "Sterilization_limit__c", |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | initialWidth: 120 |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: "错误原因", |
| | | fieldName: "ErrorReason", |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | }, |
| | | wrapText: true |
| | | } |
| | | ]; |
| | | @track salesErrorData = []; |
| | | @track salesAccountName = ""; |
| | |
| | | @track Category5 = ""; |
| | | @track category5Options = []; |
| | | //发票id |
| | | @track invoiceId = ''; |
| | | @track invoiceId = ""; |
| | | |
| | | //二级经销商 |
| | | @track secondaryDistributor = ""; |
| | |
| | | fieldName: "url", |
| | | type: "url", |
| | | typeAttributes: { label: { fieldName: "Title" }, target: "_blank" }, |
| | | hideDefaultActions: true, |
| | | hideDefaultActions: true |
| | | }, |
| | | { |
| | | label: "创建人", |
| | | fieldName: "CreatedByName", |
| | | hideDefaultActions: true, |
| | | hideDefaultActions: true |
| | | }, |
| | | { |
| | | label: '', |
| | | type: 'tableCellIcon', |
| | | label: "", |
| | | type: "tableCellIcon", |
| | | typeAttributes: { |
| | | iconName: 'utility:delete', |
| | | iconName: "utility:delete", |
| | | recordId: { |
| | | fieldName: 'Id' |
| | | fieldName: "Id" |
| | | } |
| | | }, |
| | | initialWidth: 50, |
| | | hideDefaultActions: true |
| | | }, |
| | | } |
| | | ]; |
| | | filesUploaded = []; |
| | | fileContents; |
| | |
| | | //分页start |
| | | //@track sortBy = ""; |
| | | //@track sortDirection = "asc"; |
| | | defaultSortDirection = 'asc'; |
| | | sortDirection = 'asc'; |
| | | defaultSortDirection = "asc"; |
| | | sortDirection = "asc"; |
| | | sortedBy; |
| | | @track pageSize = 10; |
| | | error; |
| | |
| | | @track recordStart = 0; |
| | | @track recordEnd = 0; |
| | | //end |
| | | @track SearchDone = ''; |
| | | @track SearchDone = ""; |
| | | @track hideCheckboxColumn = false; |
| | | |
| | | stylesLoaded = false; |
| | |
| | | pageSizeLWC: this.pageSize, |
| | | pageTokenLWC: this.currentPageToken, |
| | | arriveorderLWC: this.arriveorder |
| | | }).then((r) => { |
| | | }) |
| | | .then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | console.log("r = " + JSON.stringify(r)); |
| | | |
| | | if (r.status == "Success") { |
| | | |
| | | //分页 |
| | | console.log('r.entity.paginatedAccounts = ' + JSON.stringify(r.entity.paginatedAccounts)); |
| | | console.log( |
| | | "r.entity.paginatedAccounts = " + |
| | | JSON.stringify(r.entity.paginatedAccounts) |
| | | ); |
| | | this.nextPageToken = r.entity.paginatedAccounts.nextPageToken; |
| | | this.totalRecords = r.entity.paginatedAccounts.totalRecords; |
| | | this.recordStart = r.entity.paginatedAccounts.recordStart; |
| | | this.recordEnd = r.entity.paginatedAccounts.recordEnd; |
| | | this.totalPages = Math.ceil(r.entity.paginatedAccounts.totalRecords / this.pageSize); |
| | | console.log('this.totalPages = ' + this.totalPages); |
| | | this.totalPages = Math.ceil( |
| | | r.entity.paginatedAccounts.totalRecords / this.pageSize |
| | | ); |
| | | console.log("this.totalPages = " + this.totalPages); |
| | | |
| | | |
| | | this.OECId = r.entity.HospitalInfo == null ? '' : r.entity.HospitalInfo; |
| | | this.OECId = |
| | | r.entity.HospitalInfo == null ? "" : r.entity.HospitalInfo; |
| | | console.log("this.OECId = " + this.OECId); |
| | | this.ConsumableOut_report = r.entity.ConsumableOut_report; |
| | | console.log("this.ConsumableOut_report = " + this.ConsumableOut_report); |
| | | console.log( |
| | | "this.ConsumableOut_report = " + this.ConsumableOut_report |
| | | ); |
| | | this.accountid = r.entity.accountid; |
| | | this.consumableproductdetailsRecords = |
| | | r.entity.consumableproductdetailsRecords; |
| | |
| | | this.accountName = r.entity.accountName; |
| | | this.userWorkLocation = r.entity.userWorkLocation; |
| | | this.EditAble = r.entity.EditAble; |
| | | this.consumableorderdetails2Records = r.entity.consumableorderdetails2Records; |
| | | this.consumableorderdetails2Records = |
| | | r.entity.consumableorderdetails2Records; |
| | | for (var i in this.consumableorderdetails2Records) { |
| | | this.consumableorderdetails2Records[i]["ProdName"] = this.consumableorderdetails2Records[i].Prod.Name; |
| | | this.consumableorderdetails2Records[i]["orderdetails2SerialLotNo__c"] = this.consumableorderdetails2Records[i].orderdetails2.SerialLotNo__c; |
| | | this.consumableorderdetails2Records[i]["orderdetails2TracingCode__c"] = this.consumableorderdetails2Records[i].orderdetails2.TracingCode__c; |
| | | this.consumableorderdetails2Records[i]["orderdetails2Sterilization_limit__c"] = this.consumableorderdetails2Records[i].orderdetails2.Sterilization_limit__c; |
| | | this.consumableorderdetails2Records[i]["ProdName"] = |
| | | this.consumableorderdetails2Records[i].Prod.Name; |
| | | this.consumableorderdetails2Records[i][ |
| | | "orderdetails2SerialLotNo__c" |
| | | ] = |
| | | this.consumableorderdetails2Records[ |
| | | i |
| | | ].orderdetails2.SerialLotNo__c; |
| | | this.consumableorderdetails2Records[i][ |
| | | "orderdetails2TracingCode__c" |
| | | ] = |
| | | this.consumableorderdetails2Records[ |
| | | i |
| | | ].orderdetails2.TracingCode__c; |
| | | this.consumableorderdetails2Records[i][ |
| | | "orderdetails2Sterilization_limit__c" |
| | | ] = |
| | | this.consumableorderdetails2Records[ |
| | | i |
| | | ].orderdetails2.Sterilization_limit__c; |
| | | } |
| | | this.isShowOutboundProductDetails = r.entity.consumableorderdetails2Count > 0 ? true : false; |
| | | this.isShowOutboundProductDetails = |
| | | r.entity.consumableorderdetails2Count > 0 ? true : false; |
| | | console.log("this.agencyProType = " + this.agencyProType); |
| | | console.log("this.EditAble = " + this.EditAble); |
| | | //查询附件 |
| | |
| | | object["value"] = key; |
| | | this.category3Options.push(object); |
| | | } |
| | | console.log("this.category3Options = " + JSON.stringify(this.category3Options)); |
| | | console.log( |
| | | "this.category3Options = " + JSON.stringify(this.category3Options) |
| | | ); |
| | | //第4分类 |
| | | for (var key in r.entity.category4OptionMap) { |
| | | let object = {}; |
| | |
| | | unitOptions.push(unitOption); |
| | | } |
| | | this.data[i]["unitOptions"] = unitOptions; |
| | | this.data[i]["unitValue"] = this.data[i]["unitValue"] == null ? unitOptions[0].value : this.data[i]["unitValue"]; |
| | | this.data[i]["unitValue"] = |
| | | this.data[i]["unitValue"] == null |
| | | ? unitOptions[0].value |
| | | : this.data[i]["unitValue"]; |
| | | if (this.EditAble) { |
| | | this.data[i].orderdetails1["Box_Piece__c"] = this.data[i].orderdetails1["Box_Piece__c"] == null ? unitOptions[0].value : this.data[i].orderdetails1["Box_Piece__c"]; |
| | | this.data[i]["unitValue"] = this.data[i].orderdetails1["Box_Piece__c"] == null ? unitOptions[0].value : this.data[i].orderdetails1["Box_Piece__c"]; |
| | | console.log('this.data[i].orderdetails1["Box_Piece__c"] = ' + this.data[i].orderdetails1["Box_Piece__c"]); |
| | | this.data[i].orderdetails1["Shipment_Count__c"] = this.data[i].orderdetails1["Shipment_Count__c"] == null ? 0 : this.data[i].orderdetails1["Shipment_Count__c"]; |
| | | this.data[i].orderdetails1["Delivery_List_RMB__c"] = this.data[i].orderdetails1["Delivery_List_RMB__c"] == null ? 0.0 : this.data[i].orderdetails1["Delivery_List_RMB__c"]; |
| | | this.data[i].orderdetails1["Box_Piece__c"] = |
| | | this.data[i].orderdetails1["Box_Piece__c"] == null |
| | | ? unitOptions[0].value |
| | | : this.data[i].orderdetails1["Box_Piece__c"]; |
| | | this.data[i]["unitValue"] = |
| | | this.data[i].orderdetails1["Box_Piece__c"] == null |
| | | ? unitOptions[0].value |
| | | : this.data[i].orderdetails1["Box_Piece__c"]; |
| | | console.log( |
| | | 'this.data[i].orderdetails1["Box_Piece__c"] = ' + |
| | | this.data[i].orderdetails1["Box_Piece__c"] |
| | | ); |
| | | this.data[i].orderdetails1["Shipment_Count__c"] = |
| | | this.data[i].orderdetails1["Shipment_Count__c"] == null |
| | | ? 0 |
| | | : this.data[i].orderdetails1["Shipment_Count__c"]; |
| | | this.data[i].orderdetails1["Delivery_List_RMB__c"] = |
| | | this.data[i].orderdetails1["Delivery_List_RMB__c"] == null |
| | | ? 0.0 |
| | | : this.data[i].orderdetails1["Delivery_List_RMB__c"]; |
| | | } else { |
| | | this.data[i]["InvoiceProNot_count__c"] = this.data[i].orderdetails1.InvoiceProNot_count__c; |
| | | this.data[i]["RrturnPro_count__c"] = this.data[i].orderdetails1.RrturnPro_count__c; |
| | | this.data[i]["Invoiced_Procount__c"] = this.data[i].orderdetails1.Invoiced_Procount__c; |
| | | this.data[i]["InvoiceProNot_count__c"] = |
| | | this.data[i].orderdetails1.InvoiceProNot_count__c; |
| | | this.data[i]["RrturnPro_count__c"] = |
| | | this.data[i].orderdetails1.RrturnPro_count__c; |
| | | this.data[i]["Invoiced_Procount__c"] = |
| | | this.data[i].orderdetails1.Invoiced_Procount__c; |
| | | } |
| | | // this.data[i]["shipmentNumber"] = 0; |
| | | // this.data[i]["shippingUnitPrice"] = 0.0; |
| | | //this.data[i]["shipmentNumber"] = this.data[i].orderdetails1["Shipment_Count__c"] == 0 ? '' : this.data[i].orderdetails1["Shipment_Count__c"]; |
| | | //this.data[i]["shippingUnitPrice"] = this.data[i].orderdetails1["Delivery_List_RMB__c"] == 0 ? '' : this.data[i].orderdetails1["Delivery_List_RMB__c"]; |
| | | this.data[i]["shipmentNumber"] = this.data[i].orderdetails1["Shipment_Count__c"]; |
| | | this.data[i]["shippingUnitPrice"] = this.data[i].orderdetails1["Delivery_List_RMB__c"]; |
| | | |
| | | |
| | | this.data[i]["shipmentNumber"] = |
| | | this.data[i].orderdetails1["Shipment_Count__c"]; |
| | | this.data[i]["shippingUnitPrice"] = |
| | | this.data[i].orderdetails1["Delivery_List_RMB__c"]; |
| | | |
| | | this.data[i]["Id"] = this.data[i].Prod.Id; |
| | | |
| | | if (this.hasHosPro) { |
| | | if (this.data[i]["hospitalSpecialOffer"]) { |
| | | this.data[i]["Id"] = this.data[i].Prod.Id + 'ishos'; |
| | | this.data[i]["Id"] = this.data[i].Prod.Id + "ishos"; |
| | | } else { |
| | | this.data[i]["Id"] = this.data[i].Prod.Id + 'nothos'; |
| | | this.data[i]["Id"] = this.data[i].Prod.Id + "nothos"; |
| | | } |
| | | } |
| | | this.data[i]["recordId"] = this.data[i].Prod.Id; |
| | |
| | | this.data[i]["Category3__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]["Box_Piece__c"] = this.data[i].orderdetails1.Box_Piece__c; |
| | | this.data[i]["shipmentAmount"] = this.data[i].orderdetails1.Shipment_amount__c; |
| | | this.data[i]["Shipment_amount__c"] = this.data[i].orderdetails1.Shipment_amount__c; |
| | | this.data[i]["Shipment_Count__c"] = this.data[i].orderdetails1.Shipment_Count__c; |
| | | this.data[i]["Box_Piece__c"] = |
| | | this.data[i].orderdetails1.Box_Piece__c; |
| | | this.data[i]["shipmentAmount"] = |
| | | this.data[i].orderdetails1.Shipment_amount__c; |
| | | this.data[i]["Shipment_amount__c"] = |
| | | this.data[i].orderdetails1.Shipment_amount__c; |
| | | this.data[i]["Shipment_Count__c"] = |
| | | this.data[i].orderdetails1.Shipment_Count__c; |
| | | |
| | | if (this.data[i]['check']) { |
| | | if (this.data[i]["check"]) { |
| | | this.selectedRows.push(this.data[i].Id); |
| | | } |
| | | } |
| | | console.log('EditAble this.data = ' + JSON.stringify(this.data)) |
| | | console.log("EditAble this.data = " + JSON.stringify(this.data)); |
| | | } else { |
| | | for (var i in this.editData) { |
| | | this.editData[i]["unitValue"] = this.editData[i]["unitValue"]; |
| | | this.editData[i]["InvoiceProNot_count__c"] = this.editData[i].orderdetails1.InvoiceProNot_count__c; |
| | | this.editData[i]["RrturnPro_count__c"] = this.editData[i].orderdetails1.RrturnPro_count__c; |
| | | this.editData[i]["Invoiced_Procount__c"] = this.editData[i].orderdetails1.Invoiced_Procount__c; |
| | | this.editData[i]["shipmentNumber"] = this.editData[i].orderdetails1["Shipment_Count__c"]; |
| | | this.editData[i]["shippingUnitPrice"] = this.editData[i].orderdetails1["Delivery_List_RMB__c"]; |
| | | this.editData[i]["InvoiceProNot_count__c"] = |
| | | this.editData[i].orderdetails1.InvoiceProNot_count__c; |
| | | this.editData[i]["RrturnPro_count__c"] = |
| | | this.editData[i].orderdetails1.RrturnPro_count__c; |
| | | this.editData[i]["Invoiced_Procount__c"] = |
| | | this.editData[i].orderdetails1.Invoiced_Procount__c; |
| | | this.editData[i]["shipmentNumber"] = |
| | | this.editData[i].orderdetails1["Shipment_Count__c"]; |
| | | this.editData[i]["shippingUnitPrice"] = |
| | | this.editData[i].orderdetails1["Delivery_List_RMB__c"]; |
| | | |
| | | this.editData[i]["recordId"] = this.editData[i].Prod.Id; |
| | | this.editData[i]["Id"] = this.editData[i].Prod.Id; |
| | | this.editData[i]["Name__c"] = this.editData[i].Prod.Name__c; |
| | | this.editData[i]["SFDA_Status__c"] = this.editData[i].Prod.SFDA_Status__c; |
| | | this.editData[i]["Category3__c"] = this.editData[i].Prod.Category3__c; |
| | | this.editData[i]["Category4__c"] = this.editData[i].Prod.Category4__c; |
| | | this.editData[i]["Category5__c"] = this.editData[i].Prod.Category5__c; |
| | | this.editData[i]["Box_Piece__c"] = this.editData[i].orderdetails1.Box_Piece__c; |
| | | this.editData[i]["shipmentAmount"] = this.editData[i].orderdetails1.Shipment_amount__c; |
| | | this.editData[i]["SFDA_Status__c"] = |
| | | this.editData[i].Prod.SFDA_Status__c; |
| | | this.editData[i]["Category3__c"] = |
| | | this.editData[i].Prod.Category3__c; |
| | | this.editData[i]["Category4__c"] = |
| | | this.editData[i].Prod.Category4__c; |
| | | this.editData[i]["Category5__c"] = |
| | | this.editData[i].Prod.Category5__c; |
| | | this.editData[i]["Box_Piece__c"] = |
| | | this.editData[i].orderdetails1.Box_Piece__c; |
| | | this.editData[i]["shipmentAmount"] = |
| | | this.editData[i].orderdetails1.Shipment_amount__c; |
| | | //this.editData[i]["Shipment_amount__c"] = this.editData[i].orderdetails1.Shipment_amount__c; |
| | | this.editData[i]["Delivery_List_RMB__c"] = this.editData[i].orderdetails1.Delivery_List_RMB__c; |
| | | this.editData[i]["Shipment_Count__c"] = this.editData[i].orderdetails1.Shipment_Count__c; |
| | | this.editData[i]["Delivery_List_RMB__c"] = |
| | | this.editData[i].orderdetails1.Delivery_List_RMB__c; |
| | | this.editData[i]["Shipment_Count__c"] = |
| | | this.editData[i].orderdetails1.Shipment_Count__c; |
| | | } |
| | | console.log('end this.editData = ' + JSON.stringify(this.editData)); |
| | | console.log("end this.editData = " + JSON.stringify(this.editData)); |
| | | } |
| | | |
| | | console.log("this.data = " + JSON.stringify(this.data)); |
| | |
| | | |
| | | //disable |
| | | |
| | | debugger; |
| | | if (Object.values(r.entity.coc).length > 0) { |
| | | this.cocLwc = r.entity.coc; |
| | | console.log("this.cocLwc = " + JSON.stringify(this.cocLwc)); |
| | | var coc = r.entity.coc; |
| | | this.accountValue = coc.Order_ForDealerText__c; |
| | | this.ForDealerText = coc.Order_ForDealerText__c; |
| | | console.log('this.accountValue = ' + this.accountValue); |
| | | this.accountValue = |
| | | coc.Order_ForDealerText__c == null |
| | | ? "" |
| | | : coc.Order_ForDealerText__c; |
| | | this.ForDealerText = |
| | | coc.Order_ForDealerText__c == null |
| | | ? "" |
| | | : coc.Order_ForDealerText__c; |
| | | console.log("this.accountValue = " + this.accountValue); |
| | | this.cocId = coc.Id; |
| | | console.log('cocId = ' + this.cocId); |
| | | 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.isPraseToPDFDisabled = false; |
| | | } |
| | | if ((coc.Billed_Status__c != "还没开票" || coc.SummonsStatus_c__c == "已完成")) { |
| | | if ( |
| | | coc.Billed_Status__c != "还没开票" || |
| | | coc.SummonsStatus_c__c == "已完成" |
| | | ) { |
| | | this.isOpenReportDisabled = false; |
| | | } |
| | | if ( |
| | |
| | | label: this.InvoiceProNotLabel, |
| | | fieldName: "InvoiceProNot_count__c", |
| | | type: "number", |
| | | initialWidth: 120, |
| | | typeAttributes: { |
| | | minimumFractionDigits: 2, |
| | | minimumFractionDigits: 2 |
| | | }, |
| | | hideDefaultActions: true, |
| | | hideDefaultActions: true |
| | | }; |
| | | let object2 = { |
| | | label: this.RrturnProLabel, |
| | | fieldName: "RrturnPro_count__c", |
| | | initialWidth: 100, |
| | | cellAttributes: { alignment: "right" }, |
| | | hideDefaultActions: true, |
| | | hideDefaultActions: true |
| | | }; |
| | | let object3 = { |
| | | label: this.InvoicedLabel, |
| | | fieldName: "Invoiced_Procount__c", |
| | | initialWidth: 100, |
| | | type: "number", |
| | | typeAttributes: { |
| | | minimumFractionDigits: 2, |
| | | minimumFractionDigits: 2 |
| | | }, |
| | | hideDefaultActions: true, |
| | | hideDefaultActions: true |
| | | }; |
| | | this.editColumns.push(object1); |
| | | this.editColumns.push(object2); |
| | | this.editColumns.push(object3); |
| | | } else { |
| | | this.ForCustomerText = this.cocLwc.Order_ForCustomerText__c; |
| | | console.log('EditAble = true this.ForCustomerText = ' + this.ForCustomerText); |
| | | console.log( |
| | | "EditAble = true this.ForCustomerText = " + this.ForCustomerText |
| | | ); |
| | | this.summonsForDirction = this.cocLwc.SummonsForDirction__c; |
| | | console.log('EditAble = true this.summonsForDirction = ' + this.summonsForDirction); |
| | | console.log( |
| | | "EditAble = true this.summonsForDirction = " + |
| | | this.summonsForDirction |
| | | ); |
| | | let value = this.summonsForDirction; |
| | | switch (value) { |
| | | case "直接销售给医院": |
| | |
| | | this.secondaryDistributor = ""; |
| | | this.ForDealerText = ""; |
| | | this.accountValue = ""; |
| | | this.cocLwc['Order_ForDealerText__c'] = ''; |
| | | this.cocLwc["Order_ForDealerText__c"] = ""; |
| | | this.isDisabledForDealerText = true; |
| | | this.isDisabledSecondaryDistributor = true; |
| | | break; |
| | |
| | | let object1 = { |
| | | label: "医院特价", |
| | | fieldName: "hospitalSpecialOffer", |
| | | type: 'boolean', |
| | | initialWidth: 100, |
| | | hideDefaultActions: true, |
| | | type: "boolean", |
| | | hideDefaultActions: true |
| | | }; |
| | | this.columns.push(object1); |
| | | this.editColumns.push(object1); |
| | |
| | | ); |
| | | this.HospitalName = r.entity.HospitalName; |
| | | this.sumPrice = r.entity.sumPrice.toFixed(2) + "元"; |
| | | debugger |
| | | console.log('this.Existarrive = ' + this.Existarrive); |
| | | console.log('this.EditAble = ' + this.EditAble); |
| | | console.log('r.entity.coc.SummonsStatus_c__c = ' + r.entity.coc.SummonsStatus_c__c); |
| | | if (!this.Existarrive && this.EditAble && r.entity.coc.SummonsStatus_c__c != '价格未定') { |
| | | debugger; |
| | | console.log("this.Existarrive = " + this.Existarrive); |
| | | console.log("this.EditAble = " + this.EditAble); |
| | | console.log( |
| | | "r.entity.coc.SummonsStatus_c__c = " + |
| | | r.entity.coc.SummonsStatus_c__c |
| | | ); |
| | | if ( |
| | | !this.Existarrive && |
| | | this.EditAble && |
| | | r.entity.coc.SummonsStatus_c__c != "价格未定" |
| | | ) { |
| | | this.hideCheckboxColumn = false; |
| | | } else { |
| | | this.hideCheckboxColumn = true; |
| | | } |
| | | if (!(this.arriveorder == '' && this.Existarrive == false && this.EditAble && this.cocLwc.SummonsStatus_c__c != '价格未定')) { |
| | | if ( |
| | | !( |
| | | this.arriveorder == "" && |
| | | this.Existarrive == false && |
| | | this.EditAble && |
| | | this.cocLwc.SummonsStatus_c__c != "价格未定" |
| | | ) |
| | | ) { |
| | | //让单位,出货数量 变为不可选的text类型 |
| | | for (var i in this.columns) { |
| | | if (this.columns[i].label == '单位') { |
| | | this.columns[i].type = 'text'; |
| | | this.columns[i].fieldName = 'unitValue'; |
| | | if (this.columns[i].label == "单位") { |
| | | this.columns[i].type = "text"; |
| | | this.columns[i].fieldName = "unitValue"; |
| | | } |
| | | if (this.columns[i].label == '出货数量') { |
| | | this.columns[i].type = 'text'; |
| | | this.columns[i].fieldName = 'shipmentNumber'; |
| | | if (this.columns[i].label == "出货数量") { |
| | | this.columns[i].type = "text"; |
| | | this.columns[i].fieldName = "shipmentNumber"; |
| | | } |
| | | } |
| | | } |
| | |
| | | console.log("ESetid = " + this.ESetid); |
| | | } else { |
| | | console.log("r = " + JSON.stringify(r)); |
| | | this.showMyToast('初始化失败', r.msg, 'Error'); |
| | | this.showMyToast("初始化失败", r.msg, "Error"); |
| | | } |
| | | }).catch((error) => { |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error = " + JSON.stringify(error)); |
| | | this.showMyToast('错误', '初始化失败', 'Error'); |
| | | this.showMyToast("错误", "初始化失败", "Error"); |
| | | }); |
| | | } |
| | | |
| | |
| | | this.isDisabledForCustomerText = false; |
| | | this.secondaryDistributor = ""; |
| | | this.ForDealerText = ""; |
| | | this.cocLwc['Order_ForDealerText__c'] = ''; |
| | | this.cocLwc["Order_ForDealerText__c"] = ""; |
| | | this.isDisabledForDealerText = true; |
| | | this.isDisabledSecondaryDistributor = true; |
| | | this.isMutualTransferGoods = false; |
| | |
| | | this.Category3 = value; |
| | | //调用后台显示第四五分类 |
| | | this.showAllCate(); |
| | | if (this.Category3 == '') { |
| | | this.Category4 = ''; |
| | | this.Category5 = ''; |
| | | if (this.Category3 == "") { |
| | | this.Category4 = ""; |
| | | this.Category5 = ""; |
| | | } |
| | | break; |
| | | case "Category4": |
| | | this.Category4 = value; |
| | | //调用后台显示第五分类 |
| | | this.showCate(); |
| | | if (this.Category4 == '') { |
| | | this.Category5 = ''; |
| | | if (this.Category4 == "") { |
| | | this.Category5 = ""; |
| | | } |
| | | break; |
| | | case "Category5": |
| | |
| | | } |
| | | |
| | | showAllCate() { |
| | | console.log('showAllCate') |
| | | console.log("showAllCate"); |
| | | categoryAllload({ |
| | | category3Lwc: this.Category3 |
| | | }).then((r) => { |
| | | }) |
| | | .then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | console.log("r = " + JSON.stringify(r)); |
| | | if (r.status == "Success") { |
| | |
| | | } |
| | | } else { |
| | | console.log("r = " + JSON.stringify(r)); |
| | | this.showMyToast('4/5分类查询失败', r.msg, 'Error'); |
| | | this.showMyToast("4/5分类查询失败", r.msg, "Error"); |
| | | } |
| | | }).catch((error) => { |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error" + JSON.stringify(error)); |
| | | }); |
| | | } |
| | | |
| | | showCate() { |
| | | console.log('showAllCate') |
| | | console.log("showAllCate"); |
| | | categoryload({ |
| | | category3Lwc: this.Category3, |
| | | category4Lwc: this.Category4 |
| | | }).then((r) => { |
| | | }) |
| | | .then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | console.log("r = " + JSON.stringify(r)); |
| | | if (r.status == "Success") { |
| | |
| | | } |
| | | } else { |
| | | console.log("r = " + JSON.stringify(r)); |
| | | this.showMyToast('Error', r.msg, 'Error'); |
| | | this.showMyToast("Error", r.msg, "Error"); |
| | | } |
| | | }).catch((error) => { |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error" + JSON.stringify(error)); |
| | | }); |
| | | } |
| | | |
| | | invoiceChange(event) { |
| | | this.invoiceId = event.target.value; |
| | | console.log('this.invoiceId = ' + this.invoiceId); |
| | | console.log("this.invoiceId = " + this.invoiceId); |
| | | } |
| | | |
| | | showMyToast(title, message, variant) { |
| | | this.isShowSpinner = false; |
| | | this.showLoadingSpinner = false; |
| | | this.isEditShowSpinner = false; |
| | | console.log('show custom message'); |
| | | var iconName = ''; |
| | | var content = ''; |
| | | if (variant.toLowerCase() == 'success') { |
| | | iconName = 'utility:check'; |
| | | console.log("show custom message"); |
| | | var iconName = ""; |
| | | var content = ""; |
| | | if (variant.toLowerCase() == "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); |
| | | } |
| | | |
| | | searchProductJs() { |
| | | this.isEditShowSpinner = true; |
| | | //this.showTable = false; |
| | | //查询有哪些选择了的然后check |
| | | const selectedRows = this.template.querySelector('c-lex-custom-lightning-datatable').getSelectedRows(); |
| | | console.log('selectedRows = ' + selectedRows); |
| | | const selectedRows = this.template |
| | | .querySelector("c-lex-custom-lightning-datatable") |
| | | .getSelectedRows(); |
| | | console.log("selectedRows = " + selectedRows); |
| | | for (var i in this.data) { |
| | | this.data[i]["check"] = false; |
| | | } |
| | |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | console.log("r = " + JSON.stringify(r)); |
| | | if (r.status == "Success") { |
| | | |
| | | //分页 |
| | | console.log('r.entity.paginatedAccounts = ' + JSON.stringify(r.entity.paginatedAccounts)); |
| | | console.log( |
| | | "r.entity.paginatedAccounts = " + |
| | | JSON.stringify(r.entity.paginatedAccounts) |
| | | ); |
| | | this.nextPageToken = r.entity.paginatedAccounts.nextPageToken; |
| | | this.totalRecords = r.entity.paginatedAccounts.totalRecords; |
| | | this.recordStart = r.entity.paginatedAccounts.recordStart; |
| | | this.recordEnd = r.entity.paginatedAccounts.recordEnd; |
| | | this.totalPages = Math.ceil(r.entity.paginatedAccounts.totalRecords / this.pageSize); |
| | | console.log('this.totalPages = ' + this.totalPages); |
| | | this.totalPages = Math.ceil( |
| | | r.entity.paginatedAccounts.totalRecords / this.pageSize |
| | | ); |
| | | console.log("this.totalPages = " + this.totalPages); |
| | | |
| | | this.hasHosPro = r.entity.hasHosPro; |
| | | console.log("this.hasHosPro = " + this.hasHosPro); |
| | |
| | | unitOptions.push(unitOption); |
| | | } |
| | | tempData[i]["unitOptions"] = unitOptions; |
| | | tempData[i]["unitValue"] = tempData[i]["unitValue"] == null ? unitOptions[0].value : tempData[i]["unitValue"]; |
| | | tempData[i]["unitValue"] = |
| | | tempData[i]["unitValue"] == null |
| | | ? unitOptions[0].value |
| | | : tempData[i]["unitValue"]; |
| | | if (this.EditAble) { |
| | | tempData[i].orderdetails1["Box_Piece__c"] = tempData[i].orderdetails1["Box_Piece__c"] == null ? unitOptions[0].value : tempData[i].orderdetails1["Box_Piece__c"]; |
| | | tempData[i]["unitValue"] = tempData[i].orderdetails1["Box_Piece__c"] == null ? unitOptions[0].value : tempData[i].orderdetails1["Box_Piece__c"]; |
| | | tempData[i].orderdetails1["Shipment_Count__c"] = tempData[i].orderdetails1["Shipment_Count__c"] == null ? 0 : tempData[i].orderdetails1["Shipment_Count__c"]; |
| | | tempData[i].orderdetails1["Delivery_List_RMB__c"] = tempData[i].orderdetails1["Delivery_List_RMB__c"] == null ? 0.0 : tempData[i].orderdetails1["Delivery_List_RMB__c"]; |
| | | tempData[i].orderdetails1["Box_Piece__c"] = |
| | | tempData[i].orderdetails1["Box_Piece__c"] == null |
| | | ? unitOptions[0].value |
| | | : tempData[i].orderdetails1["Box_Piece__c"]; |
| | | tempData[i]["unitValue"] = |
| | | tempData[i].orderdetails1["Box_Piece__c"] == null |
| | | ? unitOptions[0].value |
| | | : tempData[i].orderdetails1["Box_Piece__c"]; |
| | | tempData[i].orderdetails1["Shipment_Count__c"] = |
| | | tempData[i].orderdetails1["Shipment_Count__c"] == null |
| | | ? 0 |
| | | : tempData[i].orderdetails1["Shipment_Count__c"]; |
| | | tempData[i].orderdetails1["Delivery_List_RMB__c"] = |
| | | tempData[i].orderdetails1["Delivery_List_RMB__c"] == null |
| | | ? 0.0 |
| | | : tempData[i].orderdetails1["Delivery_List_RMB__c"]; |
| | | } else { |
| | | tempData[i]["InvoiceProNot_count__c"] = |
| | | tempData[i].orderdetails1.InvoiceProNot_count__c; |
| | |
| | | tempData[i]["Invoiced_Procount__c"] = |
| | | tempData[i].orderdetails1.Invoiced_Procount__c; |
| | | } |
| | | tempData[i]["shipmentNumber"] = tempData[i].orderdetails1["Shipment_Count__c"]; |
| | | tempData[i]["shippingUnitPrice"] = tempData[i].orderdetails1["Delivery_List_RMB__c"]; |
| | | tempData[i]["shipmentNumber"] = |
| | | tempData[i].orderdetails1["Shipment_Count__c"]; |
| | | tempData[i]["shippingUnitPrice"] = |
| | | tempData[i].orderdetails1["Delivery_List_RMB__c"]; |
| | | |
| | | tempData[i]["Id"] = tempData[i].Prod.Id; |
| | | |
| | | console.log('tempData[i]["hospitalSpecialOffer"] = ' + tempData[i]["hospitalSpecialOffer"]) |
| | | console.log( |
| | | 'tempData[i]["hospitalSpecialOffer"] = ' + |
| | | tempData[i]["hospitalSpecialOffer"] |
| | | ); |
| | | if (this.hasHosPro) { |
| | | if (tempData[i]["hospitalSpecialOffer"]) { |
| | | tempData[i]["Id"] = tempData[i].Prod.Id + 'ishos'; |
| | | tempData[i]["Id"] = tempData[i].Prod.Id + "ishos"; |
| | | } else { |
| | | tempData[i]["Id"] = tempData[i].Prod.Id + 'nothos'; |
| | | tempData[i]["Id"] = tempData[i].Prod.Id + "nothos"; |
| | | } |
| | | } |
| | | |
| | |
| | | tempData[i]["Category4__c"] = tempData[i].Prod.Category4__c; |
| | | tempData[i]["Category5__c"] = tempData[i].Prod.Category5__c; |
| | | tempData[i]["Box_Piece__c"] = tempData[i].orderdetails1.Box_Piece__c; |
| | | tempData[i]["shipmentAmount"] = tempData[i].orderdetails1.Shipment_amount__c; |
| | | tempData[i]["Shipment_amount__c"] = tempData[i].orderdetails1.Shipment_amount__c; |
| | | tempData[i]["Shipment_Count__c"] = tempData[i].orderdetails1.Shipment_Count__c; |
| | | tempData[i]["shipmentAmount"] = |
| | | tempData[i].orderdetails1.Shipment_amount__c; |
| | | tempData[i]["Shipment_amount__c"] = |
| | | tempData[i].orderdetails1.Shipment_amount__c; |
| | | tempData[i]["Shipment_Count__c"] = |
| | | tempData[i].orderdetails1.Shipment_Count__c; |
| | | |
| | | if (tempData[i]["shippingUnitPrice"] && tempData[i]["shipmentNumber"]) |
| | | tempData[i]["shipmentAmount"] = this.amend( |
| | |
| | | "*" |
| | | ); |
| | | |
| | | if (tempData[i]['check']) { |
| | | if (tempData[i]["check"]) { |
| | | this.selectedRows.push(tempData[i].Id); |
| | | } |
| | | |
| | | } |
| | | this.data = tempData; |
| | | |
| | | //如果hasHosPro = true 医院特价 |
| | | console.log('this.hasHosPro = ' + this.hasHosPro); |
| | | console.log("this.hasHosPro = " + this.hasHosPro); |
| | | if (this.hasHosPro) { |
| | | let object1 = { |
| | | label: "医院特价", |
| | | fieldName: "hospitalSpecialOffer", |
| | | type: 'boolean', |
| | | type: "boolean", |
| | | initialWidth: 100, |
| | | hideDefaultActions: true, |
| | | hideDefaultActions: true |
| | | }; |
| | | this.columns.push(object1); |
| | | this.editColumns.push(object1); |
| | |
| | | this.editColumns = [...this.editColumns]; |
| | | console.log("this.columns = " + JSON.stringify(this.columns)); |
| | | console.log("this.data = " + JSON.stringify(this.data)); |
| | | console.log(" this.selectedRows = " + JSON.stringify(this.selectedRows)); |
| | | console.log( |
| | | " this.selectedRows = " + JSON.stringify(this.selectedRows) |
| | | ); |
| | | //this.showTable = true; |
| | | this.isEditShowSpinner = false; |
| | | } else { |
| | | console.log("r = " + JSON.stringify(r)); |
| | | this.showMyToast('查询失败', r.msg, 'Error'); |
| | | this.showMyToast("查询失败", r.msg, "Error"); |
| | | } |
| | | }); |
| | | } |
| | |
| | | searchHospitalNameModal() { |
| | | console.log("searchHospitalNameModal"); |
| | | hospitalInit({ |
| | | ctype: this.agencyProType, |
| | | ctype: this.agencyProType |
| | | }).then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | if (r.status == "Success") { |
| | |
| | | console.log("this.searchHospitalName = " + this.searchHospitalName); |
| | | serContact({ |
| | | searchName: this.searchHospitalName, |
| | | ctype: this.agencyProType, |
| | | ctype: this.agencyProType |
| | | }).then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | if (r.status == "Success") { |
| | |
| | | if (this.data[i].Id == numberDetail.data.recordId) { |
| | | index = i; |
| | | this.data[i].shipmentNumber = Number(numberDetail.data.shipmentnumber); |
| | | this.data[i].orderdetails1["Shipment_Count__c"] = Number(numberDetail.data.shipmentnumber); |
| | | console.log('this.data[i].orderdetails1["Shipment_Count__c"] = ' + this.data[i].orderdetails1["Shipment_Count__c"]); |
| | | console.log('this.selectedRows.indexOf(this.data[i].Id) = ' + this.selectedRows.indexOf(this.data[i].Id)); |
| | | if (this.data[i].orderdetails1["Shipment_Count__c"] != '') { |
| | | this.data[i].orderdetails1["Shipment_Count__c"] = Number( |
| | | numberDetail.data.shipmentnumber |
| | | ); |
| | | console.log( |
| | | 'this.data[i].orderdetails1["Shipment_Count__c"] = ' + |
| | | this.data[i].orderdetails1["Shipment_Count__c"] |
| | | ); |
| | | console.log( |
| | | "this.selectedRows.indexOf(this.data[i].Id) = " + |
| | | this.selectedRows.indexOf(this.data[i].Id) |
| | | ); |
| | | if (this.data[i].orderdetails1["Shipment_Count__c"] != "") { |
| | | if (this.selectedRows.indexOf(this.data[i].Id) == -1) { |
| | | this.selectedRows.push(this.data[i].Id); |
| | | } |
| | | this.data[i].check = true; |
| | | } else { |
| | | if (this.selectedRows.indexOf(this.data[i].Id) != -1) { |
| | | this.selectedRows.splice(this.selectedRows.indexOf(this.data[i].Id), 1); |
| | | this.selectedRows.splice( |
| | | this.selectedRows.indexOf(this.data[i].Id), |
| | | 1 |
| | | ); |
| | | } |
| | | this.data[i].check = false; |
| | | } |
| | | this.selectedRows = [...this.selectedRows]; |
| | | console.log('this.selectedRows = ' + JSON.stringify(this.selectedRows)); |
| | | console.log("this.selectedRows = " + JSON.stringify(this.selectedRows)); |
| | | } |
| | | } |
| | | this.data = [...this.data]; |
| | |
| | | |
| | | getSelectedRows(event) { |
| | | let selectedRowsEvent = event.detail.selectedRows; |
| | | console.log('selectedRowsEvent = ' + JSON.stringify(selectedRowsEvent)) |
| | | console.log("selectedRowsEvent = " + JSON.stringify(selectedRowsEvent)); |
| | | this.selectedRows = []; |
| | | for (var i in selectedRowsEvent) { |
| | | this.selectedRows.push(selectedRowsEvent[i].Id) |
| | | this.selectedRows.push(selectedRowsEvent[i].Id); |
| | | } |
| | | // for (var i in this.data) { |
| | | // for (var j in selectedRowsEvent) { |
| | |
| | | this.isShowSpinner = true; |
| | | |
| | | //查询有哪些选择了的然后check |
| | | const selectedRows = this.template.querySelector('c-lex-custom-lightning-datatable').getSelectedRows(); |
| | | console.log('selectedRows = ' + selectedRows); |
| | | const selectedRows = this.template |
| | | .querySelector("c-lex-custom-lightning-datatable") |
| | | .getSelectedRows(); |
| | | console.log("selectedRows = " + selectedRows); |
| | | for (var i in this.data) { |
| | | this.data[i]["check"] = false; |
| | | } |
| | |
| | | consumableproductdetailsRecordsLwc: this.consumableproductdetailsRecords, |
| | | agencyProTypeLwc: this.agencyProType, |
| | | userWorkLocationLwc: this.userWorkLocation |
| | | }).then((r) => { |
| | | }) |
| | | .then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | console.log("r = " + JSON.stringify(r)); |
| | | debugger |
| | | debugger; |
| | | if (r.status == "Success") { |
| | | // let url = "/lexsummonscreat?ESetid=" + r.entity.ESetId; |
| | | // this[NavigationMixin.Navigate]({ |
| | |
| | | window.location.href = "/s/lexsummonscreat?ESetid=" + r.entity.ESetId; |
| | | } else { |
| | | console.log("r.msg = " + r.msg); |
| | | this.showMyToast('保存失败', r.msg, 'Error'); |
| | | this.showMyToast("保存失败", r.msg, "Error"); |
| | | } |
| | | }).catch((error) => { |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error = " + JSON.stringify(error)); |
| | | }); |
| | | } |
| | |
| | | console.log("this.ESetId = " + this.ESetid); |
| | | PraseToPDF({ |
| | | cocLwc: this.cocLwc, |
| | | ESetId: this.ESetid, |
| | | ESetId: this.ESetid |
| | | }).then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | console.log("r = " + JSON.stringify(r)); |
| | |
| | | window.open("/customer/summonsPDF?ESetid=" + r.entity.ESetId); |
| | | } else { |
| | | console.log("r.msg = " + r.msg); |
| | | this.showMyToast('打印失败', r.msg, 'Error'); |
| | | this.showMyToast("打印失败", r.msg, "Error"); |
| | | } |
| | | }); |
| | | } |
| | |
| | | var reportId = this.ESetid; |
| | | reportId = reportId.substring(0, 15); |
| | | console.log("reportId = " + reportId); |
| | | let reportFilters = '[{"operator":"equals","value":"' + reportId + '","column":"FK_CUSTENT_ID"}]'; |
| | | let reportFilters = |
| | | '[{"operator":"equals","value":"' + |
| | | reportId + |
| | | '","column":"FK_CUSTENT_ID"}]'; |
| | | let reportUrl = this.label.ConsumableOutboundReportId; |
| | | console.log("reportUrl = " + reportUrl); |
| | | let url = "/s/report/" + reportUrl + "?reportFilters=" + encodeURIComponent(reportFilters); |
| | | let url = |
| | | "/s/report/" + |
| | | reportUrl + |
| | | "?reportFilters=" + |
| | | encodeURIComponent(reportFilters); |
| | | console.log("url = " + url); |
| | | window.open(url); |
| | | // this[NavigationMixin.Navigate]({ |
| | |
| | | const lookupElement = event.target; |
| | | console.log("event.detail = " + JSON.stringify(event.detail)); |
| | | apexSearch({ |
| | | searchTerm: event.detail.searchTerm, |
| | | }).then((results) => { |
| | | searchTerm: event.detail.searchTerm |
| | | }) |
| | | .then((results) => { |
| | | lookupElement.setSearchResults(results); |
| | | }).catch((error) => { |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error" + JSON.stringify(error)); |
| | | }); |
| | | } |
| | |
| | | if (this.filesUploaded.length > 0) { |
| | | this.file = this.filesUploaded[0]; |
| | | if (this.file.size > this.MAX_FILE_SIZE) { |
| | | this.showMyToast('保存失败', '文件过大', 'Error'); |
| | | this.showMyToast("保存失败", "文件过大", "Error"); |
| | | return; |
| | | } |
| | | this.showPopSpinner = true; |
| | |
| | | saveFile({ |
| | | recordId: this.ESetid, |
| | | fileName: this.fileName, |
| | | base64Data: encodeURIComponent(this.fileContents), |
| | | }).then((r) => { |
| | | base64Data: encodeURIComponent(this.fileContents) |
| | | }) |
| | | .then((r) => { |
| | | this.showPopSpinner = false; |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | console.log("r = " + JSON.stringify(r)); |
| | | this.closePop(); |
| | | this.showMyToast('上传成功', '', 'Success'); |
| | | this.showMyToast("上传成功", "", "Success"); |
| | | this.getFiles(); |
| | | }).catch((error) => { |
| | | }) |
| | | .catch((error) => { |
| | | this.showPopSpinner = false; |
| | | console.log("error = " + error.message); |
| | | this.showMyToast('失败', '上传失败', 'Error'); |
| | | this.showMyToast("失败", "上传失败", "Error"); |
| | | }); |
| | | } |
| | | |
| | |
| | | console.log("getFiles"); |
| | | this.showLoadingSpinner = true; |
| | | getFiles({ |
| | | recordId: this.ESetid, |
| | | }).then((r) => { |
| | | recordId: this.ESetid |
| | | }) |
| | | .then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | console.log("r = " + JSON.stringify(r)); |
| | | this.fileData = r.entity.cvList; |
| | |
| | | this.fileData[i]["recordId"] = this.fileData[i].Id; |
| | | this.fileData[i]["url"] = "/" + this.fileData[i].Id; |
| | | this.fileData[i]["Title"] = this.fileData[i].Title; |
| | | this.fileData[i]["attUrl"] = '/' + this.fileData[i].Id; |
| | | this.fileData[i]['downloadUrl'] = '/sfc/servlet.shepherd/document/download/' + this.fileData[i].ContentDocumentId + '?operationContext=S1'; |
| | | this.fileData[i]["attUrl"] = "/" + this.fileData[i].Id; |
| | | this.fileData[i]["downloadUrl"] = |
| | | "/sfc/servlet.shepherd/document/download/" + |
| | | this.fileData[i].ContentDocumentId + |
| | | "?operationContext=S1"; |
| | | } |
| | | console.log("this.fileData = " + this.fileData); |
| | | this.showLoadingSpinner = false; |
| | | }).catch((error) => { |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error = " + error.message); |
| | | this.showMyToast('失败', '获取附件失败', 'Error'); |
| | | this.showMyToast("失败", "获取附件失败", "Error"); |
| | | }); |
| | | } |
| | | |
| | |
| | | this.isShowSpinner = true; |
| | | |
| | | //查询有哪些选择了的然后check |
| | | const selectedRows = this.template.querySelector('c-lex-custom-lightning-datatable').getSelectedRows(); |
| | | console.log('selectedRows = ' + selectedRows); |
| | | const selectedRows = this.template |
| | | .querySelector("c-lex-custom-lightning-datatable") |
| | | .getSelectedRows(); |
| | | console.log("selectedRows = " + selectedRows); |
| | | for (var i in this.data) { |
| | | this.data[i]["check"] = false; |
| | | } |
| | |
| | | GoodsDelivery({ |
| | | cocLwc: this.cocLwc, |
| | | ESetId: this.ESetid, |
| | | pageRecordsLwcLwc: cloneData, |
| | | }).then((r) => { |
| | | pageRecordsLwcLwc: cloneData |
| | | }) |
| | | .then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | console.log("r = " + JSON.stringify(r)); |
| | | if (r.status == "Success") { |
| | | console.log( |
| | | "Summons_Order_type__c = " + this.cocLwc["Summons_Order_type__c"] |
| | | ); |
| | | this.isSales = this.cocLwc["Summons_Order_type__c"] == "销售" ? true : false; |
| | | this.isSales = |
| | | this.cocLwc["Summons_Order_type__c"] == "销售" ? true : false; |
| | | this.GoodsDeliveryInit(); |
| | | } else { |
| | | console.log("r.msg = " + r.msg); |
| | | this.showMyToast('错误', r.msg, 'Error'); |
| | | this.showMyToast("错误", r.msg, "Error"); |
| | | } |
| | | this.isShippingSales = true; |
| | | }).catch((error) => { |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error = " + error.message); |
| | | this.showMyToast('失败', '跳转失败', 'Error'); |
| | | this.showMyToast("失败", "跳转失败", "Error"); |
| | | }); |
| | | } |
| | | |
| | | GoodsDeliveryInit() { |
| | | console.log("GoodsDeliveryInit"); |
| | | GoodsDeliveryInit({ |
| | | ESetId: this.ESetid, |
| | | }).then((r) => { |
| | | ESetId: this.ESetid |
| | | }) |
| | | .then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | console.log("r = " + JSON.stringify(r)); |
| | | if (r.status == "Success") { |
| | |
| | | this.salesUserWorkLocation = r.entity.userWorkLocation; |
| | | this.salesAccountid = r.entity.accountid; |
| | | this.salesOrderdetails = r.entity.orderdetails; |
| | | console.log('this.salesOrderdetails = ' + JSON.stringify(this.salesOrderdetails)) |
| | | 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); |
| | | this.showMyToast('初始化失败', r.msg, 'Error'); |
| | | this.showMyToast("初始化失败", r.msg, "Error"); |
| | | } |
| | | }).catch((error) => { |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error = " + error.message); |
| | | this.showMyToast('错误', '初始化失败', 'Error'); |
| | | this.showMyToast("错误", "初始化失败", "Error"); |
| | | }); |
| | | } |
| | | |
| | |
| | | userWorkLocation: this.salesUserWorkLocation, |
| | | accountid: this.salesAccountid, |
| | | orderdetails: this.salesOrderdetails, |
| | | orderpieceorboxMap: this.salesOrderpieceorboxMap, |
| | | }).then((r) => { |
| | | orderpieceorboxMap: this.salesOrderpieceorboxMap |
| | | }) |
| | | .then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | console.log("r = " + JSON.stringify(r)); |
| | | if (r.status == "Success") { |
| | |
| | | this.salesErrorData = r.entity.consumableorderdetailsRecordserror; |
| | | this.salesData = r.entity.consumableorderdetailsRecords; |
| | | 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.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; |
| | | } |
| | | console.log('this.salesData = ' + JSON.stringify(this.salesData)); |
| | | console.log("this.salesData = " + JSON.stringify(this.salesData)); |
| | | 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]["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; |
| | | 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; |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | |
| | | this.isShowSpinner = false; |
| | | } else { |
| | | console.log("r.msg = " + r.msg); |
| | | this.showMyToast('获取失败', r.msg, 'Error'); |
| | | this.showMyToast("获取失败", r.msg, "Error"); |
| | | } |
| | | }).catch((error) => { |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error = " + JSON.stringify(error.message)); |
| | | }); |
| | | } |
| | |
| | | let outboundDetail = event.detail; |
| | | for (var i in this.salesData) { |
| | | if (this.salesData[i].Id == outboundDetail.data.recordId) { |
| | | this.salesData[i]['outboundCount'] = outboundDetail.data.count |
| | | this.salesData[i]["outboundCount"] = outboundDetail.data.count; |
| | | } |
| | | } |
| | | console.log('this.salesData = ' + JSON.stringify(this.salesData)) |
| | | console.log("this.salesData = " + JSON.stringify(this.salesData)); |
| | | } |
| | | |
| | | SaveP() { |
| | |
| | | consumableorderdetailsRecordsLwc: JSON.stringify(cloneSalesData), |
| | | orderdetailsLwc: this.salesOrderdetails, |
| | | orderpriceMapLwc: this.salesOrderpriceMap, |
| | | orderagencypriceMapLwc: this.salesOrderagencypriceMap, |
| | | }).then((r) => { |
| | | orderagencypriceMapLwc: this.salesOrderagencypriceMap |
| | | }) |
| | | .then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | console.log("r = " + JSON.stringify(r)); |
| | | if (r.status == "Success") { |
| | |
| | | this[NavigationMixin.Navigate]({ |
| | | type: "standard__webPage", |
| | | attributes: { |
| | | url: "/lexsaleanddelivery", |
| | | }, |
| | | url: "/lexsaleanddelivery" |
| | | } |
| | | }); |
| | | } else { |
| | | console.log("r.msg = " + r.msg); |
| | | this.showMyToast('销售失败', r.msg, 'Error'); |
| | | this.showMyToast("销售失败", r.msg, "Error"); |
| | | } |
| | | }).catch((error) => { |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error = " + JSON.stringify(error.message)); |
| | | this.showMyToast('错误', '销售失败', 'Error'); |
| | | this.showMyToast("错误", "销售失败", "Error"); |
| | | }); |
| | | } |
| | | |
| | |
| | | consumableorderdetailsRecordsLwc: JSON.stringify(cloneSalesData), |
| | | orderdetailsLwc: this.salesOrderdetails, |
| | | orderpriceMapLwc: this.salesOrderpriceMap, |
| | | orderagencypriceMapLwc: this.salesOrderagencypriceMap, |
| | | }).then((r) => { |
| | | orderagencypriceMapLwc: this.salesOrderagencypriceMap |
| | | }) |
| | | .then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | console.log("r = " + JSON.stringify(r)); |
| | | if (r.status == "Success") { |
| | |
| | | this[NavigationMixin.Navigate]({ |
| | | type: "standard__webPage", |
| | | attributes: { |
| | | url: "/lexsaleanddelivery", |
| | | }, |
| | | url: "/lexsaleanddelivery" |
| | | } |
| | | }); |
| | | } else { |
| | | console.log("r.msg = " + r.msg); |
| | | this.showMyToast('出货失败', r.msg, 'Error'); |
| | | this.showMyToast("出货失败", r.msg, "Error"); |
| | | } |
| | | }).catch((error) => { |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error = " + JSON.stringify(error.message)); |
| | | this.showMyToast('错误', '出货失败', 'Error'); |
| | | this.showMyToast("错误", "出货失败", "Error"); |
| | | }); |
| | | } |
| | | |
| | | //发票 |
| | | openToInvoiceJs() { |
| | | let url = ''; |
| | | console.log('this.invoiceId = ' + this.invoiceId); |
| | | if (this.invoiceId.length > 0 && this.invoiceId != '000000000000000') { |
| | | url = "/s/lexconinvoiceview?deliveryId=" + this.ESetid + "&invoiceId=" + this.invoiceId + "&KeyWords=Redirect"; |
| | | let url = ""; |
| | | console.log("this.invoiceId = " + this.invoiceId); |
| | | if (this.invoiceId.length > 0 && this.invoiceId != "000000000000000") { |
| | | url = |
| | | "/s/lexconinvoiceview?deliveryId=" + |
| | | this.ESetid + |
| | | "&invoiceId=" + |
| | | this.invoiceId + |
| | | "&KeyWords=Redirect"; |
| | | } else { |
| | | url = "/s/lexconinvoiceview?deliveryId=" + this.ESetid + "&KeyWords=Redirect"; |
| | | url = |
| | | "/s/lexconinvoiceview?deliveryId=" + this.ESetid + "&KeyWords=Redirect"; |
| | | } |
| | | window.open(url); |
| | | // this[NavigationMixin.Navigate]({ |
| | |
| | | DeleteConsumable() { |
| | | this.isShowSpinner = true; |
| | | DelConsumable({ |
| | | ESetId: this.ESetid, |
| | | }).then((r) => { |
| | | ESetId: this.ESetid |
| | | }) |
| | | .then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | console.log("r = " + JSON.stringify(r)); |
| | | if (r.status == "Success") { |
| | |
| | | this[NavigationMixin.Navigate]({ |
| | | type: "standard__webPage", |
| | | attributes: { |
| | | url: url, |
| | | }, |
| | | url: url |
| | | } |
| | | }); |
| | | } else { |
| | | console.log("r.msg = " + r.msg); |
| | | this.showMyToast('删除失败', r.msg, 'Error'); |
| | | this.showMyToast("删除失败", r.msg, "Error"); |
| | | } |
| | | }).catch((error) => { |
| | | }) |
| | | .catch((error) => { |
| | | console.log("error = " + error.message); |
| | | this.showMyToast('错误', '删除失败', 'Error'); |
| | | this.showMyToast("错误", "删除失败", "Error"); |
| | | }); |
| | | } |
| | | |
| | | handleLoad() { |
| | | console.log('handleLoad') |
| | | console.log("handleLoad"); |
| | | try { |
| | | const style = document.createElement('style'); |
| | | style.innerText = '.hehe-layoutItem .slds-button__icon {display: none;}'; |
| | | this.template.querySelector('.hideHelpText').appendChild(style); |
| | | const style = document.createElement("style"); |
| | | style.innerText = ".hehe-layoutItem .slds-button__icon {display: none;}"; |
| | | this.template.querySelector(".hideHelpText").appendChild(style); |
| | | } catch (error) { |
| | | console.log(error); |
| | | } |
| | | } |
| | | |
| | | handleLoad2() { |
| | | console.log('handleLoad2') |
| | | console.log("handleLoad2"); |
| | | try { |
| | | const style = document.createElement('style'); |
| | | style.innerText = '.hehe-layoutItem .slds-button__icon {display: none;}'; |
| | | this.template.querySelector('.hideHelpText').appendChild(style); |
| | | const style = document.createElement("style"); |
| | | style.innerText = ".hehe-layoutItem .slds-button__icon {display: none;}"; |
| | | this.template.querySelector(".hideHelpText").appendChild(style); |
| | | |
| | | const style2 = document.createElement('style'); |
| | | style2.innerText = '.hehe-layoutItem .slds-form-element__label {padding : 0px}'; |
| | | this.template.querySelector('.hideHelpText').appendChild(style2); |
| | | const style2 = document.createElement("style"); |
| | | style2.innerText = |
| | | ".hehe-layoutItem .slds-form-element__label {padding : 0px}"; |
| | | this.template.querySelector(".hideHelpText").appendChild(style2); |
| | | } catch (error) { |
| | | console.log(error); |
| | | } |
| | |
| | | this[NavigationMixin.Navigate]({ |
| | | type: "standard__webPage", |
| | | attributes: { |
| | | url: url, |
| | | }, |
| | | url: url |
| | | } |
| | | }); |
| | | } |
| | | |
| | |
| | | if (event.target.files.length > 0) { |
| | | this.filesUploaded = event.target.files; |
| | | this.fileName = event.target.files[0].name; |
| | | console.log('this.fileName:' + this.fileName); |
| | | console.log("this.fileName:" + this.fileName); |
| | | } |
| | | } |
| | | |
| | | //是否显示附件移除 |
| | | get attDelBtn() { |
| | | if (this.fileName != '' && this.fileName != null && this.fileName != '请选择一个文件上传') { |
| | | if ( |
| | | this.fileName != "" && |
| | | this.fileName != null && |
| | | this.fileName != "请选择一个文件上传" |
| | | ) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | |
| | | //移除附件 |
| | | removeAtt() { |
| | | this.filesUploaded = []; |
| | | this.fileName = ''; |
| | | this.fileName = ""; |
| | | } |
| | | |
| | | ClearJs() { |
| | | this.consumableName = ''; |
| | | this.Category3 = ''; |
| | | this.Category4 = ''; |
| | | this.Category5 = ''; |
| | | this.consumableName = ""; |
| | | this.Category3 = ""; |
| | | this.Category4 = ""; |
| | | this.Category5 = ""; |
| | | this.searchProductJs(); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | onHandleSort(event) { |
| | | |
| | | //将已经选好了的放到前面,不进行排序 |
| | | if (this.EditAble) { |
| | | const { fieldName: sortedBy, sortDirection } = event.detail; |
| | | const cloneData = [...this.data]; |
| | | cloneData.sort(this.sortBy(sortedBy, sortDirection === 'asc' ? 1 : -1)); |
| | | cloneData.sort(this.sortBy(sortedBy, sortDirection === "asc" ? 1 : -1)); |
| | | let index = 0; |
| | | let selectedRows = this.template.querySelector('c-lex-custom-lightning-datatable').getSelectedRows(); |
| | | let selectedRows = this.template |
| | | .querySelector("c-lex-custom-lightning-datatable") |
| | | .getSelectedRows(); |
| | | let selectedRowsIds = []; |
| | | for (var i in selectedRows) { |
| | | selectedRowsIds.push(selectedRows[i].Id); |
| | | } |
| | | console.log('selectedRowsIds = ' + JSON.stringify(selectedRowsIds)); |
| | | console.log("selectedRowsIds = " + JSON.stringify(selectedRowsIds)); |
| | | for (var i = 0; i < cloneData.length; i++) { |
| | | if (selectedRowsIds.indexOf(cloneData[i].Id) != -1) { |
| | | if (i != 0) { |
| | |
| | | } else { |
| | | const { fieldName: sortedBy, sortDirection } = event.detail; |
| | | const cloneData = [...this.editData]; |
| | | cloneData.sort(this.sortBy(sortedBy, sortDirection === 'asc' ? 1 : -1)); |
| | | cloneData.sort(this.sortBy(sortedBy, sortDirection === "asc" ? 1 : -1)); |
| | | this.editData = cloneData; |
| | | this.sortDirection = sortDirection; |
| | | this.sortedBy = sortedBy; |
| | |
| | | } |
| | | |
| | | handlePrevious() { |
| | | this.currentPageToken = Number(this.currentPageToken) - Number(this.pageSize); |
| | | this.currentPageToken = |
| | | Number(this.currentPageToken) - Number(this.pageSize); |
| | | this.searchProductJs(); |
| | | } |
| | | |
| | | handleNext() { |
| | | this.currentPageToken = Number(this.currentPageToken) + Number(this.pageSize); |
| | | this.currentPageToken = |
| | | Number(this.currentPageToken) + Number(this.pageSize); |
| | | this.searchProductJs(); |
| | | } |
| | | handleFirst() { |
| | |
| | | } |
| | | |
| | | handleLast() { |
| | | this.currentPageToken = this.totalPages > 1 ? (this.totalPages - 1) * this.pageSize : 0; |
| | | this.currentPageToken = |
| | | this.totalPages > 1 ? (this.totalPages - 1) * this.pageSize : 0; |
| | | this.searchProductJs(); |
| | | } |
| | | |
| | |
| | | this.searchProductJs(); |
| | | } |
| | | |
| | | |
| | | |
| | | editHandlePrevious() { |
| | | this.currentPageToken = Number(this.currentPageToken) - Number(this.pageSize); |
| | | this.currentPageToken = |
| | | Number(this.currentPageToken) - Number(this.pageSize); |
| | | this.searchEditProductJs(); |
| | | } |
| | | |
| | | editHandleNext() { |
| | | this.currentPageToken = Number(this.currentPageToken) + Number(this.pageSize); |
| | | this.currentPageToken = |
| | | Number(this.currentPageToken) + Number(this.pageSize); |
| | | this.searchEditProductJs(); |
| | | } |
| | | editHandleFirst() { |
| | |
| | | } |
| | | |
| | | editHandleLast() { |
| | | this.currentPageToken = this.totalPages > 1 ? (this.totalPages - 1) * this.pageSize : 0; |
| | | this.currentPageToken = |
| | | this.totalPages > 1 ? (this.totalPages - 1) * this.pageSize : 0; |
| | | this.searchEditProductJs(); |
| | | } |
| | | |
| | |
| | | statusEdit: this.statusEdit, |
| | | pageSizeLWC: this.pageSize, |
| | | pageTokenLWC: this.currentPageToken |
| | | }).then((r) => { |
| | | }) |
| | | .then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | console.log("r = " + JSON.stringify(r)); |
| | | if (r.status == "Success") { |
| | | //分页 |
| | | console.log('r.entity.paginatedAccounts = ' + JSON.stringify(r.entity.paginatedAccounts)); |
| | | console.log( |
| | | "r.entity.paginatedAccounts = " + |
| | | JSON.stringify(r.entity.paginatedAccounts) |
| | | ); |
| | | this.nextPageToken = r.entity.paginatedAccounts.nextPageToken; |
| | | this.totalRecords = r.entity.paginatedAccounts.totalRecords; |
| | | this.recordStart = r.entity.paginatedAccounts.recordStart; |
| | | this.recordEnd = r.entity.paginatedAccounts.recordEnd; |
| | | this.totalPages = Math.ceil(r.entity.paginatedAccounts.totalRecords / this.pageSize); |
| | | console.log('this.totalPages = ' + this.totalPages); |
| | | this.totalPages = Math.ceil( |
| | | r.entity.paginatedAccounts.totalRecords / this.pageSize |
| | | ); |
| | | console.log("this.totalPages = " + this.totalPages); |
| | | |
| | | this.editData = r.entity.pageRecords; |
| | | console.log("this.data start = " + JSON.stringify(this.data)); |
| | | for (var i in this.editData) { |
| | | this.editData[i]["unitValue"] = this.editData[i]["unitValue"]; |
| | | this.editData[i]["InvoiceProNot_count__c"] = this.editData[i].orderdetails1.InvoiceProNot_count__c; |
| | | this.editData[i]["RrturnPro_count__c"] = this.editData[i].orderdetails1.RrturnPro_count__c; |
| | | this.editData[i]["Invoiced_Procount__c"] = this.editData[i].orderdetails1.Invoiced_Procount__c; |
| | | this.editData[i]["shipmentNumber"] = this.editData[i].orderdetails1["Shipment_Count__c"]; |
| | | this.editData[i]["shippingUnitPrice"] = this.editData[i].orderdetails1["Delivery_List_RMB__c"]; |
| | | this.editData[i]["InvoiceProNot_count__c"] = |
| | | this.editData[i].orderdetails1.InvoiceProNot_count__c; |
| | | this.editData[i]["RrturnPro_count__c"] = |
| | | this.editData[i].orderdetails1.RrturnPro_count__c; |
| | | this.editData[i]["Invoiced_Procount__c"] = |
| | | this.editData[i].orderdetails1.Invoiced_Procount__c; |
| | | this.editData[i]["shipmentNumber"] = |
| | | this.editData[i].orderdetails1["Shipment_Count__c"]; |
| | | this.editData[i]["shippingUnitPrice"] = |
| | | this.editData[i].orderdetails1["Delivery_List_RMB__c"]; |
| | | |
| | | this.editData[i]["recordId"] = this.editData[i].Prod.Id; |
| | | this.editData[i]["Id"] = this.editData[i].Prod.Id; |
| | | this.editData[i]["Name__c"] = this.editData[i].Prod.Name__c; |
| | | this.editData[i]["SFDA_Status__c"] = this.editData[i].Prod.SFDA_Status__c; |
| | | this.editData[i]["Category3__c"] = this.editData[i].Prod.Category3__c; |
| | | this.editData[i]["Category4__c"] = this.editData[i].Prod.Category4__c; |
| | | this.editData[i]["Category5__c"] = this.editData[i].Prod.Category5__c; |
| | | this.editData[i]["Box_Piece__c"] = this.editData[i].orderdetails1.Box_Piece__c; |
| | | this.editData[i]["shipmentAmount"] = this.editData[i].orderdetails1.Shipment_amount__c; |
| | | this.editData[i]["SFDA_Status__c"] = |
| | | this.editData[i].Prod.SFDA_Status__c; |
| | | this.editData[i]["Category3__c"] = |
| | | this.editData[i].Prod.Category3__c; |
| | | this.editData[i]["Category4__c"] = |
| | | this.editData[i].Prod.Category4__c; |
| | | this.editData[i]["Category5__c"] = |
| | | this.editData[i].Prod.Category5__c; |
| | | this.editData[i]["Box_Piece__c"] = |
| | | this.editData[i].orderdetails1.Box_Piece__c; |
| | | this.editData[i]["shipmentAmount"] = |
| | | this.editData[i].orderdetails1.Shipment_amount__c; |
| | | //this.editData[i]["Shipment_amount__c"] = this.editData[i].orderdetails1.Shipment_amount__c; |
| | | this.editData[i]["Delivery_List_RMB__c"] = this.editData[i].orderdetails1.Delivery_List_RMB__c; |
| | | this.editData[i]["Shipment_Count__c"] = this.editData[i].orderdetails1.Shipment_Count__c; |
| | | this.editData[i]["Delivery_List_RMB__c"] = |
| | | this.editData[i].orderdetails1.Delivery_List_RMB__c; |
| | | this.editData[i]["Shipment_Count__c"] = |
| | | this.editData[i].orderdetails1.Shipment_Count__c; |
| | | } |
| | | this.showTable = true; |
| | | this.isEditShowSpinner = false; |
| | | } else { |
| | | console.log("r = " + JSON.stringify(r)); |
| | | this.showMyToast('搜索失败', r.msg, 'Error'); |
| | | this.showMyToast("搜索失败", r.msg, "Error"); |
| | | } |
| | | }).catch((error) => { |
| | | this.showMyToast('错误', '搜索失败', 'Error'); |
| | | }) |
| | | .catch((error) => { |
| | | this.showMyToast("错误", "搜索失败", "Error"); |
| | | }); |
| | | } |
| | | |
| | |
| | | this.isShowSpinner = true; |
| | | //var recordId = event.detail.data.recordId; |
| | | var recordId = event.target.getAttribute("data-fileid"); |
| | | console.log('attid:' + recordId); |
| | | console.log("attid:" + recordId); |
| | | deleteAtt({ |
| | | contentVersionId: recordId |
| | | }).then(r => { |
| | | }) |
| | | .then((r) => { |
| | | r = JSON.parse(JSON.stringify(r)); |
| | | if (r.status == "Success") { |
| | | this.showMyToast('删除成功', '', 'Success'); |
| | | this.showMyToast("删除成功", "", "Success"); |
| | | this.getFiles(); |
| | | } else { |
| | | this.showMyToast('删除失败', r.msg, 'Error'); |
| | | this.showMyToast("删除失败", r.msg, "Error"); |
| | | } |
| | | }).catch(error => { |
| | | this.showMyToast('错误', error.message, 'Error'); |
| | | }) |
| | | .catch((error) => { |
| | | this.showMyToast("错误", error.message, "Error"); |
| | | }); |
| | | } |
| | | } |
| | |
| | | <template if:true={showSpinner}> |
| | | <!-- <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"> |
| | | <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 if:true={over_view}> |
| | | <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;"> |
| | | <div style="border-bottom: 1px solid #D4D4D4;padding:3px;"> |
| | | <div |
| | | style=" |
| | | border: 1px solid #d4d4d4; |
| | | border-top: 3px solid #51606e; |
| | | border-radius: 5px; |
| | | margin-bottom: 7px; |
| | | " |
| | | > |
| | | <div style="border-bottom: 1px solid #d4d4d4; padding: 3px"> |
| | | <lightning-layout> |
| | | <lightning-layout-item padding="around-small"> |
| | | <p style="font-size: 18px"> |
| | |
| | | </lightning-layout> |
| | | <!-- <p style="font-size: 16px;"><strong>未全部发货订单明细</strong></p> --> |
| | | </div> |
| | | <div style="padding:10px;"> |
| | | <c-lex-custom-lightning-datatable class="wrapped-header-datatable" hide-checkbox-column key-field="Id" data={raesList} columns={colms} onclicklink={clickLick}></c-lex-custom-lightning-datatable> |
| | | <div style="padding: 10px"> |
| | | <c-lex-custom-lightning-datatable |
| | | class="wrapped-header-datatable" |
| | | hide-checkbox-column |
| | | key-field="Id" |
| | | data={raesList} |
| | | columns={colms} |
| | | onclicklink={clickLick} |
| | | ></c-lex-custom-lightning-datatable> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <!-- 使用期限小于一年的产品 --> |
| | | <template if:true={overlimit}> |
| | | <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;"> |
| | | <div style="border-bottom: 1px solid #D4D4D4;padding:3px;"> |
| | | <div |
| | | style=" |
| | | border: 1px solid #d4d4d4; |
| | | border-top: 3px solid #51606e; |
| | | border-radius: 5px; |
| | | margin-bottom: 7px; |
| | | " |
| | | > |
| | | <div style="border-bottom: 1px solid #d4d4d4; padding: 3px"> |
| | | <lightning-layout> |
| | | <lightning-layout-item padding="around-small"> |
| | | <p style="font-size: 18px"> |
| | |
| | | </lightning-layout> |
| | | <!-- <p style="font-size: 16px;"><strong>使用期限小于一年的产品</strong></p> --> |
| | | </div> |
| | | <div style="padding:10px;"> |
| | | <lightning-datatable class="wrapped-header-datatable" hide-checkbox-column key-field="prodName" data={overlimitdateorderdetails} columns={colm3}></lightning-datatable> |
| | | <div style="padding: 10px"> |
| | | <lightning-datatable |
| | | class="wrapped-header-datatable" |
| | | hide-checkbox-column |
| | | key-field="prodName" |
| | | data={overlimitdateorderdetails} |
| | | columns={colm3} |
| | | ></lightning-datatable> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | </div> |
| | | </div> --> |
| | | <!--经销商库存上下限 --> |
| | | <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;"> |
| | | <div style="border-bottom: 1px solid #D4D4D4;padding:3px;"> |
| | | <div |
| | | style=" |
| | | border: 1px solid #d4d4d4; |
| | | border-top: 3px solid #51606e; |
| | | border-radius: 5px; |
| | | margin-bottom: 7px; |
| | | " |
| | | > |
| | | <div style="border-bottom: 1px solid #d4d4d4; padding: 3px"> |
| | | <lightning-layout> |
| | | <lightning-layout-item padding="around-small"> |
| | | <p style="font-size: 18px"> |
| | |
| | | </lightning-layout> |
| | | <!-- <p style="font-size: 16px;"><strong>经销商库存上下限</strong></p> --> |
| | | </div> |
| | | <div style="padding:10px;"> |
| | | <div style="padding: 10px"> |
| | | <div lwc:dom="manual" id="resultDiv" class="resultDiv"></div> |
| | | <lightning-datatable class="wrapped-header-datatable" hide-checkbox-column key-field="prodName" data={productLimitRecords} columns={colm4}></lightning-datatable> |
| | | <p style="height: 10px;"></p> |
| | | <lightning-datatable |
| | | class="wrapped-header-datatable" |
| | | hide-checkbox-column |
| | | key-field="prodName" |
| | | data={productLimitRecords} |
| | | columns={colm4} |
| | | ></lightning-datatable> |
| | | <p style="height: 10px"></p> |
| | | <div draggable="false" > |
| | | <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" style="width: 220px;" onclick={editProductLimit}>经销商产品上下限编辑</button> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexBorder" |
| | | style="width: 220px" |
| | | onclick={editProductLimit} |
| | | > |
| | | 经销商产品上下限编辑 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> --> |
| | | <!-- 订单各种数量信息弹窗 --> |
| | | <template if:true={showPop}> |
| | | <section role="dialog" tabindex="-1" aria-labelledby="modal-heading-01" aria-modal="true" aria-describedby="modal-content-id-1" class="slds-modal slds-fade-in-open slds-modal_small" style="border: 1px solid #D4D4D4;"> |
| | | <section |
| | | role="dialog" |
| | | tabindex="-1" |
| | | aria-labelledby="modal-heading-01" |
| | | aria-modal="true" |
| | | aria-describedby="modal-content-id-1" |
| | | class="slds-modal slds-fade-in-open slds-modal_small" |
| | | style="border: 1px solid #d4d4d4" |
| | | > |
| | | <div class="slds-modal__container"> |
| | | <header class="slds-modal__header" style="background-color: #F3F3F3;"> |
| | | <button style="" class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" title="Close" onclick={closePop}> |
| | | <lightning-icon icon-name="utility:close" |
| | | <header class="slds-modal__header" style="background-color: #f3f3f3"> |
| | | <button |
| | | style="" |
| | | class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" |
| | | title="Close" |
| | | onclick={closePop} |
| | | > |
| | | <lightning-icon |
| | | icon-name="utility:close" |
| | | alternative-text="close" |
| | | variant="inverse" |
| | | size="small" ></lightning-icon> |
| | | size="small" |
| | | ></lightning-icon> |
| | | <span class="slds-assistive-text">Close</span> |
| | | </button> |
| | | <h2 id="modal-heading-01" class="slds-text-heading_medium slds-hyphenate">{popTitle}</h2> |
| | | <h2 |
| | | id="modal-heading-01" |
| | | class="slds-text-heading_medium slds-hyphenate" |
| | | > |
| | | {popTitle} |
| | | </h2> |
| | | </header> |
| | | <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-1" style="border: 1px solid #F3F3F3;"> |
| | | <lightning-datatable class="wrapped-header-datatable" hide-checkbox-column key-field="prodModel" columns={colms2} data={recordList}></lightning-datatable> |
| | | <div |
| | | class="slds-modal__content slds-p-around_medium" |
| | | id="modal-content-id-1" |
| | | style="border: 1px solid #f3f3f3" |
| | | > |
| | | <lightning-datatable |
| | | class="wrapped-header-datatable" |
| | | hide-checkbox-column |
| | | key-field="prodModel" |
| | | columns={colms2} |
| | | data={recordList} |
| | | ></lightning-datatable> |
| | | </div> |
| | | <footer class="slds-modal__footer"> |
| | | <!-- <lightning-button style="margin-left: 10px;" variant="neutral" label="关闭" onclick={closePop}></lightning-button> --> |
| | | <button class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" style="margin-left: 10px;" variant="neutral" label="关闭" onclick={closePop}>关闭</button> |
| | | <button |
| | | class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" |
| | | style="margin-left: 10px" |
| | | variant="neutral" |
| | | label="关闭" |
| | | onclick={closePop} |
| | | > |
| | | 关闭 |
| | | </button> |
| | | </footer> |
| | | </div> |
| | | </section> |
| | |
| | | import { LightningElement, wire, api, track } from 'lwc'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import { NavigationMixin } from 'lightning/navigation'; |
| | | import initPage from '@salesforce/apex/LexTopPageController.initPage'; |
| | | import initTotalNum from '@salesforce/apex/LexConsumableGoodsInfo.initTotalNum'; |
| | | import initArrDet from '@salesforce/apex/LexConsumableGoodsInfo.initArrDet'; |
| | | import initArrDetAll from '@salesforce/apex/LexConsumableGoodsInfo.initArrDetAll'; |
| | | import initDeliveryDet from '@salesforce/apex/LexConsumableGoodsInfo.initDeliveryDet'; |
| | | import initDeliveryDetAll from '@salesforce/apex/LexConsumableGoodsInfo.initDeliveryDetAll'; |
| | | import initNotArrDet from '@salesforce/apex/LexConsumableGoodsInfo.initNotArrDet'; |
| | | import initNotArrDetAll from '@salesforce/apex/LexConsumableGoodsInfo.initNotArrDetAll'; |
| | | import initMoreThan7 from '@salesforce/apex/LexConsumableGoodsInfo.initMoreThan7'; |
| | | import initMoreThan7All from '@salesforce/apex/LexConsumableGoodsInfo.initMoreThan7All'; |
| | | import { LightningElement, wire, api, track } from "lwc"; |
| | | import { ShowToastEvent } from "lightning/platformShowToastEvent"; |
| | | import { NavigationMixin } from "lightning/navigation"; |
| | | import initPage from "@salesforce/apex/LexTopPageController.initPage"; |
| | | import initTotalNum from "@salesforce/apex/LexConsumableGoodsInfo.initTotalNum"; |
| | | import initArrDet from "@salesforce/apex/LexConsumableGoodsInfo.initArrDet"; |
| | | import initArrDetAll from "@salesforce/apex/LexConsumableGoodsInfo.initArrDetAll"; |
| | | import initDeliveryDet from "@salesforce/apex/LexConsumableGoodsInfo.initDeliveryDet"; |
| | | import initDeliveryDetAll from "@salesforce/apex/LexConsumableGoodsInfo.initDeliveryDetAll"; |
| | | import initNotArrDet from "@salesforce/apex/LexConsumableGoodsInfo.initNotArrDet"; |
| | | 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"; |
| | |
| | | @track over_view = false; |
| | | @track overlimit = false; |
| | | @track hasHos = false; |
| | | @track activeSections = ['A', 'B', 'C']; |
| | | @track activeSections = ["A", "B", "C"]; |
| | | @track isRender = false; |
| | | @track consumableorderdetailsRecordsview; |
| | | @track showSpinner = true; |
| | |
| | | //未全部发货订单明细col |
| | | @track colms = [ |
| | | { |
| | | label: '消耗品订单名称', |
| | | label: "消耗品订单名称", |
| | | type: "customOutputGood", |
| | | typeAttributes: { |
| | | outputValue: { fieldName: "Name" }, |
| | | type: 'Title', |
| | | type: "Title", |
| | | recordId: { fieldName: "Id" } |
| | | }, |
| | | hideDefaultActions: true,initialWidth: 200 |
| | | hideDefaultActions: true, |
| | | // initialWidth: 200, |
| | | wrapText: true |
| | | }, |
| | | { label: 'SAP合同号', fieldName: 'ContractNo__c', hideDefaultActions: true,initialWidth:180}, |
| | | { |
| | | label: '订单总数', |
| | | label: "SAP合同号", |
| | | fieldName: "ContractNo__c", |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | initialWidth: 180 |
| | | }, |
| | | { |
| | | label: "订单总数", |
| | | type: "customOutputGood", |
| | | typeAttributes: { |
| | | outputValue: { fieldName: "Total_num__c" }, |
| | | type: 'TotalNum', |
| | | type: "TotalNum", |
| | | recordId: { fieldName: "Id" } |
| | | }, |
| | | hideDefaultActions: true, initialWidth: 100 |
| | | hideDefaultActions: true, |
| | | initialWidth: 100 |
| | | }, |
| | | { |
| | | label: '已到货数量', |
| | | label: "已到货数量", |
| | | type: "customOutputGood", |
| | | typeAttributes: { |
| | | outputValue: { fieldName: "OrderNumber_arrived__c" }, |
| | | type: 'ArrDet', |
| | | type: "ArrDet", |
| | | recordId: { fieldName: "Id" } |
| | | }, |
| | | hideDefaultActions: true, initialWidth: 110 |
| | | hideDefaultActions: true, |
| | | initialWidth: 100 |
| | | }, |
| | | { |
| | | label: '待系统操作入库数量', |
| | | label: "待系统操作入库数量", |
| | | type: "customOutputGood", |
| | | typeAttributes: { |
| | | outputValue: { fieldName: "Delivery_detail_count__c" }, |
| | | type: 'DeliveryDet', |
| | | type: "DeliveryDet", |
| | | recordId: { fieldName: "Id" } |
| | | }, |
| | | hideDefaultActions: true, initialWidth: 180 |
| | | hideDefaultActions: true, |
| | | initialWidth: 150 |
| | | }, |
| | | { |
| | | label: '还没发货数量', |
| | | label: "还没发货数量", |
| | | type: "customOutputGood", |
| | | typeAttributes: { |
| | | outputValue: { fieldName: "OrderNumber_notarrive__c" }, |
| | | type: 'NotArrDet', |
| | | type: "NotArrDet", |
| | | recordId: { fieldName: "Id" } |
| | | }, |
| | | hideDefaultActions: true, initialWidth: 120 |
| | | hideDefaultActions: true, |
| | | initialWidth: 120 |
| | | }, |
| | | { |
| | | label: '发货七天还未到货数', |
| | | label: "发货七天还未到货数", |
| | | type: "customOutputGood", |
| | | typeAttributes: { |
| | | outputValue: { fieldName: "More_than_seven_days__c" }, |
| | | type: 'MoreThan7', |
| | | type: "MoreThan7", |
| | | recordId: { fieldName: "Id" } |
| | | }, |
| | | hideDefaultActions: true, initialWidth: 180 |
| | | hideDefaultActions: true, |
| | | initialWidth: 150 |
| | | }, |
| | | { label: '最新发货日期', fieldName: 'Shipment_date__c', hideDefaultActions: true , initialWidth: 140}, |
| | | { label: '首次发货日期', fieldName: 'First_Delivery__c', hideDefaultActions: true , initialWidth: 140} |
| | | { |
| | | label: "最新发货日期", |
| | | fieldName: "Shipment_date__c", |
| | | hideDefaultActions: true, |
| | | initialWidth: 105 |
| | | }, |
| | | { |
| | | label: "首次发货日期", |
| | | fieldName: "First_Delivery__c", |
| | | hideDefaultActions: true, |
| | | initialWidth: 105 |
| | | } |
| | | ]; |
| | | |
| | | @track colms2 = [ |
| | | { label: '产品型号', fieldName: 'prodModel', hideDefaultActions: true }, |
| | | { label: '数量', fieldName: 'recordCount', hideDefaultActions: true ,initialWidth: 60,cellAttributes: { alignment: "center" }} |
| | | { label: "产品型号", fieldName: "prodModel", hideDefaultActions: true }, |
| | | { |
| | | label: "数量", |
| | | fieldName: "recordCount", |
| | | hideDefaultActions: true, |
| | | initialWidth: 60, |
| | | cellAttributes: { alignment: "center" } |
| | | } |
| | | ]; |
| | | |
| | | //使用期限小于一年的产品col |
| | | @track colm3 = [ |
| | | { label: '产品型号', fieldName: 'prodName', hideDefaultActions: true }, |
| | | { label: '数量', fieldName: 'countid', hideDefaultActions: true ,cellAttributes: { alignment: "left" }}, |
| | | { label: '单位', fieldName: 'BoxPiece', hideDefaultActions: true ,cellAttributes: { alignment: "left" }} |
| | | { label: "产品型号", fieldName: "prodName", hideDefaultActions: true }, |
| | | { |
| | | label: "数量", |
| | | fieldName: "countid", |
| | | hideDefaultActions: true, |
| | | cellAttributes: { alignment: "left" } |
| | | }, |
| | | { |
| | | label: "单位", |
| | | fieldName: "BoxPiece", |
| | | hideDefaultActions: true, |
| | | cellAttributes: { alignment: "left" } |
| | | } |
| | | ]; |
| | | |
| | | //经销商库存上下限col |
| | | @track colm4 = [ |
| | | { label: '产品型号', fieldName: 'prodName', hideDefaultActions: true }, |
| | | { label: '库存下限', fieldName: 'limitLow', hideDefaultActions: true ,cellAttributes: { alignment: "left" }}, |
| | | { label: '库存上限', fieldName: 'limitUp', hideDefaultActions: true ,cellAttributes: { alignment: "left" }} |
| | | { label: "产品型号", fieldName: "prodName", hideDefaultActions: true }, |
| | | { |
| | | label: "库存下限", |
| | | fieldName: "limitLow", |
| | | hideDefaultActions: true, |
| | | cellAttributes: { alignment: "left" } |
| | | }, |
| | | { |
| | | label: "库存上限", |
| | | fieldName: "limitUp", |
| | | hideDefaultActions: true, |
| | | cellAttributes: { alignment: "left" } |
| | | } |
| | | ]; |
| | | @track columns = [ |
| | | { |
| | |
| | | cellAttributes: { alignment: "right" }, |
| | | initialWidth: 50, |
| | | wrapText: true, |
| | | hideDefaultActions: true, |
| | | hideDefaultActions: true |
| | | }, |
| | | { |
| | | label: "第三分类", |
| | |
| | | initialWidth: 85, |
| | | cellAttributes: { alignment: "left" }, |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: "第四分类", |
| | |
| | | cellAttributes: { alignment: "left" }, |
| | | initialWidth: 85, |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | |
| | | wrapText: true |
| | | }, |
| | | { |
| | | label: "第五分类", |
| | |
| | | initialWidth: 85, |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | sortable: true, |
| | | |
| | | sortable: true |
| | | }, |
| | | { |
| | | label: "CFDA状态", |
| | | fieldName: "SFDA_Status__c", |
| | | cellAttributes: { alignment: "left" }, |
| | | initialWidth: 80, |
| | | hideDefaultActions: true, |
| | | hideDefaultActions: true |
| | | }, |
| | | { |
| | | label: "注册证编码号", |
| | |
| | | cellAttributes: { alignment: "left" }, |
| | | wrapText: true, |
| | | initialWidth: 155, |
| | | hideDefaultActions: true, |
| | | hideDefaultActions: true |
| | | }, |
| | | { |
| | | label: "注册证效期", |
| | |
| | | }, |
| | | |
| | | { |
| | | label: '有效期内库存', |
| | | label: "有效期内库存", |
| | | type: "customInventoryColor", |
| | | cellAttributes: { alignment: "right" }, |
| | | typeAttributes: { |
| | | value: { fieldName: "limitCount" }, |
| | | upperlimit: { fieldName: "upperlimit" }, |
| | | lowerlimit: { fieldName: "lowerlimit" }, |
| | | boxPrice: { fieldName: "BoxPiece" }, |
| | | boxPrice: { fieldName: "BoxPiece" } |
| | | }, |
| | | hideDefaultActions: true, |
| | | |
| | |
| | | cellAttributes: { alignment: "left" }, |
| | | initialWidth: 50, |
| | | wrapText: true, |
| | | hideDefaultActions: true, |
| | | }, |
| | | |
| | | hideDefaultActions: true |
| | | } |
| | | ]; |
| | | |
| | | renderedCallback() { |
| | |
| | | this.showSpinner = true; |
| | | initPage({ |
| | | pageSizeLWC: this.pageSize, |
| | | pageTokenLWC: this.currentPageToken, |
| | | pageTokenLWC: this.currentPageToken |
| | | }) |
| | | .then(result => { |
| | | .then((result) => { |
| | | this.isNoteStay = result.isNoteStay; |
| | | console.log('isNoteStay:'+result.isNoteStay); |
| | | if (result.result == 'Success') { |
| | | console.log("isNoteStay:" + result.isNoteStay); |
| | | if (result.result == "Success") { |
| | | //分页start |
| | | this.nextPageToken = result.paginatedAccounts.nextPageToken; |
| | | this.totalRecords = result.paginatedAccounts.totalRecords; |
| | | this.recordStart = result.paginatedAccounts.recordStart; |
| | | this.recordEnd = result.paginatedAccounts.recordEnd; |
| | | this.totalPages = Math.ceil(result.paginatedAccounts.totalRecords / this.pageSize); |
| | | console.log('this.totalPages = ' + this.totalPages); |
| | | this.totalPages = Math.ceil( |
| | | result.paginatedAccounts.totalRecords / this.pageSize |
| | | ); |
| | | console.log("this.totalPages = " + this.totalPages); |
| | | this.paginationVisibility = this.totalPages > 1 ? true : false; |
| | | console.log('this.sortDirection = ' + this.sortDirection); |
| | | console.log("this.sortDirection = " + this.sortDirection); |
| | | this.loader = false; |
| | | //分页end |
| | | this.title = result.title; |
| | |
| | | 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.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.column = result.column; |
| | | this.accountInfo = result.accountInfo; |
| | | this.accountId = result.accountInfo.Id; |
| | |
| | | this.overlimit = result.overlimit; |
| | | this.hasHos = result.hasHos; |
| | | this.product_Limit = result.product_Limit; |
| | | console.log('result==>' + JSON.stringify(result)); |
| | | 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; |
| | | this.pageRecords[i]["Category4__c"] = this.pageRecords[i].Prod.Category3__c; |
| | | this.pageRecords[i]["Category5__c"] = this.pageRecords[i].Prod.Category3__c; |
| | | this.pageRecords[i]["SFDA_Status__c"] = this.pageRecords[i].Prod.SFDA_Status__c; |
| | | this.pageRecords[i]["Category3__c"] = |
| | | this.pageRecords[i].Prod.Category3__c; |
| | | this.pageRecords[i]["Category4__c"] = |
| | | this.pageRecords[i].Prod.Category3__c; |
| | | this.pageRecords[i]["Category5__c"] = |
| | | this.pageRecords[i].Prod.Category3__c; |
| | | this.pageRecords[i]["SFDA_Status__c"] = |
| | | this.pageRecords[i].Prod.SFDA_Status__c; |
| | | } |
| | | //hasHos = true 医院特价 |
| | | if (this.hasHos) { |
| | |
| | | label: "医院特价", |
| | | fieldName: "hospitalSpecialOffer", |
| | | hideDefaultActions: true, |
| | | type: 'boolean', |
| | | type: "boolean", |
| | | cellAttributes: { alignment: "left" }, |
| | | initialWidth: 75 |
| | | |
| | | }; |
| | | this.columns.push(object1); |
| | | console.log(' this.columns' + this.columns); |
| | | console.log(" this.columns" + this.columns); |
| | | for (var j in this.pageRecords) { |
| | | this.pageRecords[j]["Name__c"] = this.pageRecords[j].Prod.Name__c; |
| | | this.pageRecords[j]["Category3__c"] = this.pageRecords[j].Prod.Category3__c; |
| | | this.pageRecords[j]["Category4__c"] = this.pageRecords[j].Prod.Category3__c; |
| | | this.pageRecords[j]["Category5__c"] = this.pageRecords[j].Prod.Category3__c; |
| | | this.pageRecords[j]["SFDA_Status__c"] = this.pageRecords[j].Prod.SFDA_Status__c; |
| | | this.pageRecords[j]["hospitalSpecialOffer__c"] = this.pageRecords[j].hospitalSpecialOffer; |
| | | this.pageRecords[j]["Category3__c"] = |
| | | this.pageRecords[j].Prod.Category3__c; |
| | | this.pageRecords[j]["Category4__c"] = |
| | | this.pageRecords[j].Prod.Category3__c; |
| | | this.pageRecords[j]["Category5__c"] = |
| | | this.pageRecords[j].Prod.Category3__c; |
| | | this.pageRecords[j]["SFDA_Status__c"] = |
| | | this.pageRecords[j].Prod.SFDA_Status__c; |
| | | this.pageRecords[j]["hospitalSpecialOffer__c"] = |
| | | this.pageRecords[j].hospitalSpecialOffer; |
| | | } |
| | | } |
| | | this.showTable = true; |
| | | if (this.product_Limit != null && this.product_Limit != '') { |
| | | if (this.product_Limit != null && this.product_Limit != "") { |
| | | var records = this.product_Limit.split(","); |
| | | for (var i in records) { |
| | | var parms = records[i].split("|"); |
| | |
| | | } |
| | | } |
| | | // this.productLimitRecords = records; |
| | | console.log("productLimitRecords:" + JSON.stringify(this.productLimitRecords)); |
| | | console.log( |
| | | "productLimitRecords:" + JSON.stringify(this.productLimitRecords) |
| | | ); |
| | | console.log("product_Limit:" + this.product_Limit); |
| | | this.consumableorderdetailsRecordsview = result.consumableorderdetailsRecordsview; |
| | | this.consumableorderdetailsRecordsview = |
| | | result.consumableorderdetailsRecordsview; |
| | | //add by WangXueqin 2023/05/05 |
| | | this.userPro_Type = result.userPro_Type; |
| | | console.log('this.accountId:' + this.accountId); |
| | | console.log('this.accountInfo:' + JSON.stringify(this.accountInfo)); |
| | | console.log("this.accountId:" + this.accountId); |
| | | console.log("this.accountInfo:" + JSON.stringify(this.accountInfo)); |
| | | this.showSpinner = false; |
| | | this.showPage = true; |
| | | // this.showMyToast('初始化页面成功', '', 'success'); |
| | |
| | | this.showPage = true; |
| | | this.showSpinner = false; |
| | | console.log("Error:" + result.errorMsg); |
| | | this.showMyToast('初始化页面失败', result.errorMsg, 'error'); |
| | | this.showMyToast("初始化页面失败", result.errorMsg, "error"); |
| | | } |
| | | }) |
| | | .catch(error => { |
| | | .catch((error) => { |
| | | this.showSpinner = false; |
| | | console.log("Error:" + error); |
| | | this.showMyToast('初始化页面失败', JSON.stringify(error), 'error'); |
| | | }) |
| | | this.showMyToast("初始化页面失败", JSON.stringify(error), "error"); |
| | | }); |
| | | } |
| | | |
| | | //点击链接 |
| | |
| | | var outputType = event.detail.data.type; |
| | | var recordId = event.detail.data.recordId; |
| | | console.log("click:" + outputValue + "---" + outputType + "---" + recordId); |
| | | if (outputType == 'Title') { |
| | | if (outputType == "Title") { |
| | | const config = { |
| | | type: 'standard__webPage', |
| | | type: "standard__webPage", |
| | | attributes: { |
| | | url: '/lexarrivegoods?ESetId=' + recordId |
| | | url: "/lexarrivegoods?ESetId=" + recordId |
| | | } |
| | | }; |
| | | this[NavigationMixin.Navigate](config); |
| | | } else if (outputType == 'TotalNum') { |
| | | this.popTitle = '所有产品一览'; |
| | | initTotalNum({ ordId: recordId, type: '' }) |
| | | .then(result => { |
| | | if (result.result == 'Success') { |
| | | } else if (outputType == "TotalNum") { |
| | | this.popTitle = "所有产品一览"; |
| | | initTotalNum({ ordId: recordId, type: "" }).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'); |
| | | this.showMyToast( |
| | | "加载所有产品一览页面失败", |
| | | result.errorMsg, |
| | | "error" |
| | | ); |
| | | } |
| | | }) |
| | | } else if (outputType == 'ArrDet') { |
| | | if (recordId == '1') { |
| | | this.popTitle = '所有已到货产品一览'; |
| | | initArrDetAll({ type: '' }) |
| | | .then(result => { |
| | | if (result.result == 'Success') { |
| | | }); |
| | | } else if (outputType == "ArrDet") { |
| | | if (recordId == "1") { |
| | | this.popTitle = "所有已到货产品一览"; |
| | | initArrDetAll({ type: "" }).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'); |
| | | this.showMyToast( |
| | | "加载所有已到货产品一览页面失败", |
| | | result.errorMsg, |
| | | "error" |
| | | ); |
| | | } |
| | | }) |
| | | }); |
| | | } else { |
| | | this.popTitle = '已到货产品一览'; |
| | | initArrDet({ orderId: recordId }) |
| | | .then(result => { |
| | | if (result.result == 'Success') { |
| | | this.popTitle = "已到货产品一览"; |
| | | 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'); |
| | | this.showMyToast( |
| | | "加载已到货产品一览页面失败", |
| | | result.errorMsg, |
| | | "error" |
| | | ); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | } else if (outputType == 'DeliveryDet') { |
| | | if (recordId == '1') { |
| | | this.popTitle = '所有已发货还没到货产品一览'; |
| | | initDeliveryDetAll({ type: '' }) |
| | | .then(result => { |
| | | if (result.result == 'Success') { |
| | | } else if (outputType == "DeliveryDet") { |
| | | if (recordId == "1") { |
| | | this.popTitle = "所有已发货还没到货产品一览"; |
| | | initDeliveryDetAll({ type: "" }).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'); |
| | | this.showMyToast( |
| | | "加载所有已发货还没到货产品一览页面失败", |
| | | result.errorMsg, |
| | | "error" |
| | | ); |
| | | } |
| | | }) |
| | | }); |
| | | } else { |
| | | this.popTitle = '未到货产品一览'; |
| | | initDeliveryDet({ orderId: recordId }) |
| | | .then(result => { |
| | | if (result.result == 'Success') { |
| | | this.popTitle = "未到货产品一览"; |
| | | 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'); |
| | | this.showMyToast( |
| | | "加载未到货产品一览页面失败", |
| | | result.errorMsg, |
| | | "error" |
| | | ); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | } else if (outputType == 'NotArrDet') { |
| | | if (recordId == '1') { |
| | | this.popTitle = '所有还没发货产品一览'; |
| | | initNotArrDetAll({ type: '' }) |
| | | .then(result => { |
| | | if (result.result == 'Success') { |
| | | } else if (outputType == "NotArrDet") { |
| | | if (recordId == "1") { |
| | | this.popTitle = "所有还没发货产品一览"; |
| | | initNotArrDetAll({ type: "" }).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'); |
| | | this.showMyToast( |
| | | "加载所有还没发货产品一览页面失败", |
| | | result.errorMsg, |
| | | "error" |
| | | ); |
| | | } |
| | | }) |
| | | }); |
| | | } else { |
| | | this.popTitle = '还没发货数量'; |
| | | initNotArrDet({ orderId: recordId }) |
| | | .then(result => { |
| | | if (result.result == 'Success') { |
| | | this.popTitle = "还没发货数量"; |
| | | 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'); |
| | | this.showMyToast( |
| | | "加载还没发货数量页面失败", |
| | | result.errorMsg, |
| | | "error" |
| | | ); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | } else if (outputType == 'MoreThan7') { |
| | | if (recordId == '1') { |
| | | this.popTitle = '所有发货七天还未到货数'; |
| | | initMoreThan7All({ type: '' }) |
| | | .then(result => { |
| | | if (result.result == 'Success') { |
| | | } else if (outputType == "MoreThan7") { |
| | | if (recordId == "1") { |
| | | this.popTitle = "所有发货七天还未到货数"; |
| | | initMoreThan7All({ type: "" }).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'); |
| | | this.showMyToast( |
| | | "加载所有发货七天还未到货数页面失败", |
| | | result.errorMsg, |
| | | "error" |
| | | ); |
| | | } |
| | | }) |
| | | }); |
| | | } else { |
| | | this.popTitle = '发货七天还未到货数'; |
| | | initMoreThan7({ orderId: recordId }) |
| | | .then(result => { |
| | | if (result.result == 'Success') { |
| | | this.popTitle = "发货七天还未到货数"; |
| | | 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'); |
| | | this.showMyToast( |
| | | "加载发货七天还未到货数页面失败", |
| | | result.errorMsg, |
| | | "error" |
| | | ); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | editProductLimit(event) { |
| | | //add by Wang Xueqin 2023/05/05 |
| | | let url = "/lexproductlimitedit?accountid=" + this.accountId + "&userPro_Type=" + this.userPro_Type; |
| | | let url = |
| | | "/LexProductLimitEdit?accountid=" + |
| | | this.accountId + |
| | | "&userPro_Type=" + |
| | | this.userPro_Type; |
| | | const config = { |
| | | type: 'standard__webPage', |
| | | type: "standard__webPage", |
| | | attributes: { |
| | | url: url |
| | | } |
| | |
| | | //新建消耗品订单 |
| | | newOrder() { |
| | | this[NavigationMixin.Navigate]({ |
| | | type: 'standard__objectPage', |
| | | type: "standard__objectPage", |
| | | attributes: { |
| | | objectApiName: 'Consumable_order__c', |
| | | actionName: 'new' |
| | | objectApiName: "Consumable_order__c", |
| | | actionName: "new" |
| | | }, |
| | | state: { |
| | | useRecordTypeCheck: 1 |
| | |
| | | } |
| | | |
| | | 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); |
| | | // var mode; |
| | | // if(this.isNoteStay){ |
| | | // mode ='sticky'; |
| | |
| | | this.sortBy = event.detail.fieldName; |
| | | this.sortDirection = event.detail.sortDirection; |
| | | this.currentPageToken = 0; |
| | | console.log('this.sortBy = ' + this.sortBy) |
| | | console.log('this.sortDirection = ' + this.sortDirection) |
| | | console.log("this.sortBy = " + this.sortBy); |
| | | console.log("this.sortDirection = " + this.sortDirection); |
| | | const { fieldName: sortedBy, sortDirection } = event.detail; |
| | | const cloneData = [...this.pageRecords]; |
| | | cloneData.sort(this.sortByMethod(sortedBy, sortDirection === 'asc' ? 1 : -1)); |
| | | cloneData.sort( |
| | | this.sortByMethod(sortedBy, sortDirection === "asc" ? 1 : -1) |
| | | ); |
| | | this.pageRecords = cloneData; |
| | | this.sortDirection = sortDirection; |
| | | this.sortedBy = sortedBy; |
| | |
| | | } |
| | | } |
| | | handlePrevious() { |
| | | this.currentPageToken = Number(this.currentPageToken) - Number(this.pageSize); |
| | | this.currentPageToken = |
| | | Number(this.currentPageToken) - Number(this.pageSize); |
| | | this.init(); |
| | | } |
| | | |
| | | handleNext() { |
| | | this.currentPageToken = Number(this.currentPageToken) + Number(this.pageSize); |
| | | this.currentPageToken = |
| | | Number(this.currentPageToken) + Number(this.pageSize); |
| | | this.init(); |
| | | } |
| | | handleFirst() { |
| | |
| | | } |
| | | |
| | | handleLast() { |
| | | this.currentPageToken = this.totalPages > 1 ? (this.totalPages - 1) * this.pageSize : 0; |
| | | this.currentPageToken = |
| | | this.totalPages > 1 ? (this.totalPages - 1) * this.pageSize : 0; |
| | | this.init(); |
| | | } |
| | | |
| | |
| | | type: "Name", |
| | | sortable: true, |
| | | hideDefaultActions: true, |
| | | initialWidth: 300, |
| | | // initialWidth: 200, |
| | | wrapText: true, |
| | | cellAttributes: { alignment: "left" } |
| | | }, |
| | | { |
| | | label: "第三分类", |
| | | fieldName: "Category3__c", |
| | | initialWidth: 120, |
| | | initialWidth: 84, |
| | | cellAttributes: { alignment: "left" }, |
| | | hideDefaultActions: true, |
| | | sortable: true, |
| | |
| | | label: "第四分类", |
| | | fieldName: "Category4__c", |
| | | cellAttributes: { alignment: "left" }, |
| | | initialWidth: 120, |
| | | initialWidth: 84, |
| | | hideDefaultActions: true, |
| | | wrapText: true, |
| | | sortable: true |
| | |
| | | label: "第五分类", |
| | | fieldName: "Category5__c", |
| | | cellAttributes: { alignment: "left" }, |
| | | initialWidth: 120, |
| | | initialWidth: 84, |
| | | 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: 200, |
| | | initialWidth: 104, |
| | | hideDefaultActions: true |
| | | }, |
| | | { |
| | |
| | | cellAttributes: { alignment: "left" }, |
| | | wrapText: true, |
| | | hideDefaultActions: true, |
| | | initialWidth: 110 |
| | | initialWidth: 95 |
| | | }, |
| | | { |
| | | label: "CFDA状态", |
| | | fieldName: "SFDA_Status__c", |
| | | cellAttributes: { alignment: "left" }, |
| | | initialWidth: 95, |
| | | initialWidth: 84, |
| | | wrapText: true, |
| | | hideDefaultActions: true |
| | | }, |
| | |
| | | boxPrice: { fieldName: "BoxPiece" } |
| | | }, |
| | | hideDefaultActions: true, |
| | | initialWidth: 150 |
| | | initialWidth: 120 |
| | | }, |
| | | |
| | | { |
| | |
| | | <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> |
| | | <Package xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <types> |
| | | <members>lexConsumable</members> |
| | | <members>lexSaleAndDelivery</members> |
| | | <name>LightningComponentBundle</name> |
| | | </types> |
| | | <types> |
| | | <members>lexdatatable</members> |
| | | <name>StaticResource</name> |
| | | </types> |
| | | <version>52.0</version> |
| | | </Package> |