123
chenjingwu
2024-04-12 b72e78329b825f8a22230cbaf0c8a7e2a57ca5d1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<template>
      <div class="exampleHolder" if:true={isLoading}>
        <lightning-spinner alternative-text="Loading" size="small"></lightning-spinner>
    </div>
    <div class="newRepair">
        <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-2">
            <!-- onsectiontoggle={handleSectionToggle} -->
            <lightning-accordion allow-multiple-sections-open="true"
                                                 active-section-name={activeSections}>
            <!-- Repair__c -->
            <lightning-record-edit-form onload={handleRecordEditFormLoad} onsubmit={handleSubmit} onsuccess={handleSucess} onerror={handleError} object-api-name='{objectName}' record-type-id={recordTypeId} record-id={recordIdStr}>
                <lightning-messages></lightning-messages>
                <template if:true={uiPageLayoutView}>
                    <lightning-layout multiple-rows="true">
                        <lightning-layout-item size="12">
                            <!-- active-section-name={activeSections} -->
                            
                            <template for:each={uiPageLayoutView.sections} for:item="section">
                                    <lightning-accordion-section name={section.id} key={section.id} label={section.heading} class="repairTitle">
                                        <lightning-layout multiple-rows="true" style="margin-top: 10px;">
                                            <template for:each={section.layoutRows} for:item="layoutRow">
                                                <template for:each={layoutRow.layoutItems} for:item="layoutItem">
                                                    <template for:each={layoutItem.layoutComponents} for:item="layoutComponent">
                                                        <lightning-layout-item key={layoutComponent.apiName} size="6" padding="horizontal-small">
                                                            <template if:true={layoutItem.editableForNew}>
                                                            <lightning-input-field data-fieldname={layoutComponent.apiName}
                                                            field-name={layoutComponent.apiName} name={layoutComponent.apiName} required={layoutItem.required}>
                                                            </lightning-input-field>
                                                            </template>
                                                            <!-- <template if:false={layoutItem.editableForNew}> -->
                                                                <!-- 修理受付番号 -->
                                                                <!-- <template if:true={layoutComponent.apiName}>
                                                                <lightning-output-field field-name={layoutComponent.apiName}>
                                                                </lightning-output-field>
                                                                </template> -->
                                                            <!-- </template> -->
                                                        </lightning-layout-item>
                                                    </template>
                                                </template>
                                            </template>
                                        </lightning-layout>
                                    </lightning-accordion-section>
                            </template>
                        </lightning-layout-item>
                    </lightning-layout>
                </template>
                <lightning-messages></lightning-messages>
                <div class="" style="text-align: center;">
                    <lightning-button
                        label="取消"
                        onclick={handleCancel}
                    ></lightning-button>
                    <lightning-button
                        type="submit"
                        name="save"
                        label="保存"
                        style="margin-left: 10px;"
                    ></lightning-button>
                    <lightning-button if:true={hasRecordId}
                        name="saveAndNew"
                        type="submit"
                        label="保存并新建"
                        onclick={handleSubmitAndNew}
                        style="margin-left: 10px;"
                    ></lightning-button>
                </div>
            </lightning-record-edit-form>
            </lightning-accordion>
        </div>
        <!-- <div class="footer-background-class">
            <div class="slds-align_absolute-center slds-p-around_xx-small">
                <lightning-button class="slds-m-around_xx-small"
                title="Cancel" label="Cancel"
                onclick={closeNewObjectModal}>
                </lightning-button>
                <lightning-button variant="brand" title="Save"
                onclick={submitRecordForm} name="Save" label="Save">
                </lightning-button>
            </div>
        </div> -->
    </div>
<!-- a0J0l00000Ep9XHEAZ -->
<!--   <lightning-record-edit-form record-id="" object-api-name='{objectName}'>
    <lightning-input-field field-name="Delivered_Product__c"> </lightning-input-field>
    <lightning-button
        class="slds-m-top_small"
        variant="brand"
        type="submit"
        label="Update"
    >
    </lightning-button>
</lightning-record-edit-form> -->
</template>