<template> 
 | 
    <div style="width: 100%"> 
 | 
        <template if:true={showSpinner}> 
 | 
            <div class="overlay"> 
 | 
                <lightning-spinner alternative-text="Loading" size="large"></lightning-spinner> 
 | 
            </div> 
 | 
        </template> 
 | 
        <div style="width: 99%;"> 
 | 
            <table class="title" width="100%" border="0"> 
 | 
                <thead> 
 | 
                    <tr style="margin-top: 2px;margin-bottom: 2px;"> 
 | 
                        <th width="80%" style="text-align: left;"><sapn style="font-size: 1.3em;">编辑日报</sapn></th> 
 | 
                        <th width="20%" style='height: 36px;'><lightning-button id="cancleBtn" label="不保存(首页)" onclick={notSave}></lightning-button></th> 
 | 
                    </tr> 
 | 
                </thead> 
 | 
            </table> 
 | 
        </div> 
 | 
        <div style="background-color: #8dae84;"> 
 | 
            <span style="font-weight: bold;text-align: left;">  基本信息</span> 
 | 
            <span style="float: right"> 
 | 
                <span class="required-symbol">*</span> 
 | 
                 = 必需信息     
 | 
            </span> 
 | 
            <!-- <span style="border-left: 2px solid red;float: right"> = 必需信息    </span> --> 
 | 
        </div> 
 | 
        <div style="width: 99%;padding-top: 5px;"> 
 | 
            <lightning-layout> 
 | 
                <lightning-layout-item size="12" padding="around-small" > 
 | 
                    <div style="background-color: red;color:white"> 
 | 
                        {timeValid} 
 | 
                    </div> 
 | 
                </lightning-layout-item> 
 | 
            </lightning-layout> 
 | 
            <lightning-record-edit-form object-api-name="Daily_Report__c"> 
 | 
                <table class="basicInfo" width="99%" border="0"> 
 | 
                    <thead> 
 | 
                        <tr style="margin-top: 2px;margin-bottom: 2px;"> 
 | 
                            <th width="10%"></th> 
 | 
                            <th width="13%"></th> 
 | 
                            <th width="9%"></th> 
 | 
                            <th width="6%"></th> 
 | 
                            <th width="23%"></th> 
 | 
                            <th width="6%"></th> 
 | 
                            <th width="16%"></th> 
 | 
                            <th width="5%"></th> 
 | 
                            <th width="12%"></th> 
 | 
                        </tr> 
 | 
                    </thead> 
 | 
                    <tbody> 
 | 
                        <tr> 
 | 
                            <th>员工编码   </th> 
 | 
                            <td>{reportOwner.Employee_No__c}</td> 
 | 
                            <td> </td> 
 | 
                            <th>报告人   </th> 
 | 
                            <td> 
 | 
                                <span style="padding:1px">{reportOwner.Name}</span> 
 | 
                            </td> 
 | 
                            <th>部门   </th> 
 | 
                            <td>{reportOwner.Category6__c}</td> 
 | 
                            <th>职种   </th> 
 | 
                            <!-- <td>{reportOwner.Job_Category__c}</td> --> 
 | 
                            <td>{Job_Category}</td> 
 | 
                        </tr> 
 | 
                        <tr> 
 | 
                            <th>日期<div class="required-symbol">*</div> </th> 
 | 
                            <td> 
 | 
                                <lightning-input-field id="reportDateId" required="true" field-name="Reported_Date__c" value={report.Reported_Date__c} onchange={fieldChange}  variant="label-hidden"></lightning-input-field> 
 | 
                                <!-- <lightning-input-field id="reportDateId" required="true" field-name="Reported_Date__c" value={reportedDate} onchange={fieldChange}  variant="label-hidden"></lightning-input-field> --> 
 | 
                            </td> 
 | 
                            <td><lightning-button id="readDailyReportId" label="读取日报" onclick={readDailyReport}></lightning-button></td> 
 | 
                            <th style='white-space: nowrap;'>工作时间<div class="required-symbol">*</div> </th> 
 | 
                            <td> 
 | 
                                <lightning-layout> 
 | 
                                    <lightning-layout-item size="2"> 
 | 
                                        <lightning-input  class='input-padding-right'  type="number" maxlength="2" variant="label-hidden" value={beforeHour} onchange={beforeHourChange}></lightning-input> 
 | 
                                    </lightning-layout-item> 
 | 
                                    <lightning-layout-item size="1" class="centered-text"><b>:</b></lightning-layout-item> 
 | 
                                    <lightning-layout-item size="2"><lightning-input  class='input-padding-right'  type="number"  maxlength="2" variant="label-hidden" value={beforeMinute} onchange={beforeMinuteChange}></lightning-input></lightning-layout-item> 
 | 
                                    <lightning-layout-item size="1" class="centered-text"><b>~</b></lightning-layout-item> 
 | 
                                    <lightning-layout-item size="2"><lightning-input  class='input-padding-right' type="number" maxlength="2"  variant="label-hidden" value={afterHour} onchange={afterHourChange}></lightning-input></lightning-layout-item> 
 | 
                                    <lightning-layout-item size="1" class="centered-text"><b>:</b></lightning-layout-item> 
 | 
                                    <lightning-layout-item size="2"><lightning-input  class='input-padding-right' type="number" maxlength="2" variant="label-hidden" value={afterMinute} onchange={afterMinuteChange}></lightning-input></lightning-layout-item> 
 | 
                                    <lightning-layout-item size="1"></lightning-layout-item> 
 | 
                                </lightning-layout> 
 | 
                            </td> 
 | 
                            <th style='white-space: nowrap;'>日报类型<div class="required-symbol">*</div></th> 
 | 
                            <td> 
 | 
                                <lightning-input-field id="DailyReportDataType" required="true" field-name="Daily_Report_Data_Type__c" value={report.Daily_Report_Data_Type__c} onchange={fieldChange}  variant="label-hidden"></lightning-input-field> 
 | 
                            </td> 
 | 
                            <th>出差   </th> 
 | 
                            <td> 
 | 
                                <!-- <lightning-radio-group options={businessTripOptions} value={report.Business_Trip__c} type="radio" class="slds-inline-radio"  variant="label-hidden"></lightning-radio-group> --> 
 | 
                                <lightning-input-field field-name="Business_Trip__c" value={report.Business_Trip__c} onchange={fieldChange}  variant="label-hidden"></lightning-input-field> 
 | 
                            </td> 
 | 
                        </tr> 
 | 
                        <tr> 
 | 
                            <th style=' white-space: nowrap;'>日报状态(含代理)  </th> 
 | 
                            <td>{report.Status_With_Check__c}</td> 
 | 
                            <td></td> 
 | 
                            <th>提交日   </th> 
 | 
                            <td>{Submit_DateTime_New}</td> 
 | 
                            <th>批准日   </th> 
 | 
                            <td>{Approved_DateTime}</td> 
 | 
                            <th>新建人   </th> 
 | 
                            <td> 
 | 
                                <a href={reportOwnerUrl} id="createdUser" >{reportOwner.Name}</a> 
 | 
                            </td> 
 | 
                        </tr> 
 | 
                    </tbody> 
 | 
                </table> 
 | 
            </lightning-record-edit-form> 
 | 
        </div> 
 | 
        <div style="background-color: #8dae84;"> 
 | 
            <span style="font-weight: bold;text-align: left;">  活动内容</span> 
 | 
            <span style="float: right"> 
 | 
                <span class="required-symbol">*</span> 
 | 
                 = 必需信息     
 | 
            </span> 
 | 
        </div> 
 | 
        <!-- <div class="scrollable-container"> --> 
 | 
        <div class="container"> 
 | 
            <template for:each={ativities} for:item="act" for:index="index"> 
 | 
                <div key={act.Id} style="border: 1px solid black;"> 
 | 
                    <div style="width: 99%;padding-top: 5px;"> 
 | 
                        <!-- report={report}指的是日报一览 
 | 
                        report-owner={reportOwner} 指的是日报的报告者的User信息 
 | 
                        the-index={index} 暂时不用 
 | 
                        is-not-sales-service={isNotSalesService} 判断当前日报的报告者的职种是不是销售服务 
 | 
                        report-status-flg={reportStatusFlg} 判断日报状态相关的东西   用于控制页面元素的disable 
 | 
                        report-report-flg={reportReportFlg} 判断日报状态相关的东西 
 | 
                        conid={conId} 暂时不用 
 | 
                        event={act} 当前循环的某一条报告一览 
 | 
                        onopenpage={handleOpenPage}  暂时不用 
 | 
                        onvalidreport={validFromEvnent} 子组件触发父组件方法 
 | 
                        reported-date={reportedDate} 日报的日期 
 | 
                        reported-id={report.Id} 日报的ID 
 | 
                        current-user-id={currentUserId} 当前用户id 
 | 
                        shour={beforeHour} sminute={beforeMinute} ehour={afterHour} eminute={afterMinute} 指的就是日报一览的工作时间 
 | 
                        cancel-request-flg={cancelRequestFlg} 判断日报状态相关的东西 
 | 
                        all-disable-flg={allDisableFlg} 判断日报状态相关的东西 --> 
 | 
                        <c-active-content report={report} report-owner={reportOwner} the-index={index}  
 | 
                        is-not-sales-service={isNotSalesService} report-status-flg={reportStatusFlg} read-report-flag={readReportFlag} new-lead-record-type={newLeadRecordType}  
 | 
                        report-report-flg={reportReportFlg} conid={conId} event={act} onopenpage={handleOpenPage} onvalidreport={validFromEvnent}  
 | 
                        reported-date={reportedDate} reported-id={report.Id} current-user-id={currentUserId} 
 | 
                        shour={beforeHour} sminute={beforeMinute} ehour={afterHour} eminute={afterMinute} profile-name={profileName} batch-user={batchUser} 
 | 
                        cancel-request-flg={cancelRequestFlg} all-disable-flg={allDisableFlg}></c-active-content> 
 | 
                    </div> 
 | 
                </div> 
 | 
            </template> 
 | 
        </div> 
 | 
        <lightning-layout> 
 | 
            <lightning-layout-item size="12" padding="around-small" > 
 | 
                <lightning-button label="行追加" onclick={addEvent}></lightning-button> 
 | 
            </lightning-layout-item> 
 | 
        </lightning-layout> 
 | 
        <div style="background-color: #8dae84;"> 
 | 
            <span style="font-weight: bold;text-align: left;">  追加信息</span> 
 | 
            <span style="float: right"> 
 | 
                <span class="required-symbol">*</span> 
 | 
                 = 必需信息     
 | 
            </span> 
 | 
        </div> 
 | 
        <div style="width: 99%;padding-top: 5px;"> 
 | 
            <lightning-record-edit-form object-api-name="Daily_Report__c"> 
 | 
                <table class="basicInfo" width="100%" border="0"> 
 | 
                    <thead> 
 | 
                        <tr style="margin-top: 2px;margin-bottom: 2px;background-color: rgb(200, 200, 200);"> 
 | 
                            <th width="10%"></th> 
 | 
                            <th width="10%"></th> 
 | 
                            <th width="13%"></th> 
 | 
                            <th width="5%"></th> 
 | 
                            <th width="10%"></th> 
 | 
                            <th width="15%"></th> 
 | 
                            <th width="10%"></th> 
 | 
                            <th width="10%"></th> 
 | 
                            <th width="10%"></th> 
 | 
                            <th width="7%"></th> 
 | 
                        </tr> 
 | 
                    </thead> 
 | 
                    <tbody> 
 | 
                        <tr> 
 | 
                            <th style='white-space: nowrap;'>管理人员来的反馈  </th> 
 | 
                            <td colspan="7"> 
 | 
                                <lightning-input-field field-name="Feed_Back_From_Manager__c"  value={report.Feed_Back_From_Manager__c} onchange={fieldChange}  variant="label-hidden"></lightning-input-field> 
 | 
                            </td> 
 | 
                        </tr> 
 | 
                        <tr> 
 | 
                            <th style='white-space: nowrap;'>反馈过的管理人员  </th> 
 | 
                            <td> 
 | 
                                 <template lwc:if={report.FeedbackManager__c}>{report.FeedbackManager__r.Name} 
 | 
                                </template> 
 | 
                            </td> 
 | 
                           <!--  <th>新建NOTES邮件提醒   </th> 
 | 
                            <td> 
 | 
                                <lightning-input-field field-name="Mail_Send_Check__c" value={report.Mail_Send_Check__c} onchange={fieldChange}  variant="label-hidden"></lightning-input-field> 
 | 
                            </td> --> 
 | 
                            <th>状态<div class="required-symbol">*</div> </th> 
 | 
                            <td> 
 | 
                                <lightning-input-field required="true" field-name="Status__c" value={report.Status__c} onchange={fieldChange}  variant="label-hidden"></lightning-input-field> 
 | 
                                <p style="color: rgb(255, 0, 0);">{statusMes}</p> 
 | 
  
 | 
                                 <!-- <lightning-input-field required="true" field-name="Status__c" value={report.Status__c}   variant="label-hidden"></lightning-input-field> 
 | 
                                <p style="color: rgb(255, 0, 0);">{statusMes}</p> --> 
 | 
                            </td> 
 | 
                            <td><lightning-button disabled={cancleApplyDis} style="padding-left: 15px;" label="取消申请" onclick={cancleApplyJs} id='cancleApply'></lightning-button></td> 
 | 
                            <td><lightning-button name="cancle" style="padding-left: 15px;" label="保存并关闭" onclick={saveAll}></lightning-button></td> 
 | 
                            <td><lightning-button name="notCancle"  style="padding-left: 15px;" label="保存" onclick={saveAll}></lightning-button></td> 
 | 
                            <td> </td> 
 | 
                        </tr> 
 | 
                    </tbody> 
 | 
                </table> 
 | 
            </lightning-record-edit-form> 
 | 
        </div> 
 | 
        <!-- <template if:true={showModal}> 
 | 
            <c-new-record-lwc onclosemodal={handleCloseModal} onhandleid={handleReturnId}></c-new-record-lwc> 
 | 
        </template> --> 
 | 
    </div> 
 | 
</template> 
 |