buli
2023-07-14 5b5c1e16deaa3a9d6d0ed1ffca390655ed103df7
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<template>
  <!-- <lightning-card  variant="Narrow"> -->
      <div class="exampleHolder" if:true={isLoading}>
        <lightning-spinner alternative-text="Loading" size="small"></lightning-spinner>
    </div>
    <!-- slds-modal__container -->
    <div class="">
        <!-- <header class="slds-modal__header">
            <button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse"
            title="Close" onclick={closeNewObjectModal}>
                <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">
            {modalHeader} : {selectedRecordType}
            </h2>
        </header> -->
        <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-2">
            <!-- Repair__c   onsubmit={handleSubmit}-->
            <lightning-record-edit-form onload={handleRecordEditFormLoad}  onsuccess={successNewRecordInsert} object-api-name='{objectName}'
            record-type-id={recordId}>
                <lightning-messages></lightning-messages>
                <template if:true={uiPageLayoutView}>
                    <lightning-layout multiple-rows="true">
                        <lightning-layout-item size="12">
                            <lightning-accordion allow-multiple-sections-open
                                                     onsectiontoggle={handleSectionToggle}
                                                     active-section-name={activeSections}>
                            <template for:each={uiPageLayoutView.sections} for:item="section">
                                <!-- slds-grid -->
                                <div key={section.id} class="slds-wrap">
                                    <lightning-accordion-section name={section.id} label={section.heading}>
                                    <!-- <div class="row slds-gutters row-width">
                                    <h3 class="slds-p-vertical_xx-small slds-p-left_medium" style="font-size: 16px;width: 100%;border: 3px outset #d0d9e1;">{section.heading}</h3>
                                    </div> -->
                                        <lightning-layout multiple-rows="true">
                                            <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>
                                </div>
                                
                            </template>
                            </lightning-accordion>
                        </lightning-layout-item>
                    </lightning-layout>
                </template>
                <lightning-messages></lightning-messages>
                <!-- slds-m-top_medium  slds-m-top_small-->
                <div class="" style="text-align: center;">
                    <lightning-button
                        class=""
                        label="取消"
                        onclick={handleReset}
                    ></lightning-button>
                    <lightning-button
                        class=""
                        type="submit"
                        name="save"
                        label="保存"
                        style="margin-left: 10px;"
                    ></lightning-button>
                    <!-- <lightning-button
                        class="slds-m-top_small"
                        type="submit"
                        name="saveAndNew"
                        label="保存新建"
                    ></lightning-button> -->
                </div>
            </lightning-record-edit-form>
        </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>
 
  <!-- <lightning-record-edit-form record-id={recordId} 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>