buli
2023-07-11 0c4796706fc9473d069b620321a54b20a119906c
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<template>
    <template if:true={showSpinner}>
        <lightning-spinner size="medium" variant="brand"></lightning-spinner>
    </template>
    <c-common-toast></c-common-toast>
    <div
        style="
            border: 1px solid #d4d4d4;
            border-radius: 5px;
            margin-bottom: 7px;
        "
    >
        <div
            style="
                border-top: 3px solid #51606e;
                border-bottom: 1px solid #d4d4d4;
                padding: 3px;
            "
        >
            <!-- <p style="font-size: 18px;"><strong>经销商库存上下限编辑</strong></p> -->
            <lightning-layout>
                <lightning-layout-item padding="around-small">
                    <p style="font-size: 18px">
                        <strong>经销商库存上下限编辑</strong>
                    </p>
                </lightning-layout-item>
            </lightning-layout>
 
            <table
                class="slds-table slds-table_cell-buffer slds-table_bordered"
            >
                <thead>
                    <tr class="">
                        <!-- <th class="slds-size_3-of-10" scope="col">
                            <div class="slds-truncate" title="Name">S.No</div>
                        </th> -->
                        <th scope="col" align="center">
                            <div
                                class="slds-truncate"
                                style="font-size: 16px"
                                title="Name"
                            >
                                产品型号
                            </div>
                        </th>
                        <th scope="col">
                            <div
                                class="slds-truncate"
                                style="font-size: 16px"
                                title="First Name"
                            >
                                库存下限
                            </div>
                        </th>
                        <th scope="col">
                            <div
                                class="slds-truncate"
                                style="font-size: 16px"
                                title="Last Name"
                            >
                                库存上限
                            </div>
                        </th>
                        <th scope="col">
                            <div
                                class="slds-truncate"
                                style="font-size: 16px"
                                title="Last Name"
                            >
                                操作
                            </div>
                        </th>
                    </tr>
                </thead>
                <tbody>
                    <template
                        for:each={invRecords}
                        for:item="inv"
                        for:index="indexVar"
                    >
                        <tr key={inv.key} class="slds-hint-parent">
                            <td>
                                <div>
                                    <lightning-input
                                        key={inv.key}
                                        data-id={inv.key}
                                        data-index={indexVar}
                                        name="productNumber"
                                        label="productNumber"
                                        value={inv.productNumber}
                                        variant="label-hidden"
                                        onchange={handleProductChange}
                                    ></lightning-input>
                                </div>
                            </td>
                            <td>
                                <div>
                                    <lightning-input
                                        key={inv.key}
                                        data-id={inv.key}
                                        data-index={indexVar}
                                        name="inventory1"
                                        label="inventory1"
                                        value={inv.inventory1}
                                        variant="label-hidden"
                                        onchange={handleProductChange}
                                    ></lightning-input>
                                </div>
                            </td>
                            <td>
                                <div>
                                    <lightning-input
                                        key={inv.key}
                                        data-id={inv.key}
                                        data-index={indexVar}
                                        name="inventory2"
                                        label="inventory2"
                                        value={inv.inventory2}
                                        variant="label-hidden"
                                        onchange={handleProductChange}
                                    ></lightning-input>
                                </div>
                            </td>
                            <td>
                                <a
                                    name={indexVar}
                                    data-id={inv.key}
                                    onclick={removeRow}
                                >
                                    <lightning-icon
                                        icon-name="utility:delete"
                                        alternative-text="delete"
                                        size="small"
                                    ></lightning-icon>
                                </a>
                            </td>
                        </tr>
                    </template>
                    <tr>
                        <td></td>
                        <td>
                            <!-- <lightning-button label="行增加"  onclick={addRow} class="slds-m-left_x-small lexBorder"></lightning-button>             -->
                            <button
                                class="slds-m-left_x-small slds-button slds-button_neutral slds-button_stretch lexBorder"
                                label="行增加"
                                onclick={addRow}
                            >
                                行增加
                            </button>
                        </td>
                        <td>
                            <!-- <lightning-button label="保存"  onclick={handleClick} class="slds-m-left_x-small lexBorder"></lightning-button>        -->
                            <button
                                class="slds-m-left_x-small slds-button slds-button_neutral slds-button_stretch lexBorder"
                                label="保存"
                                onclick={handleClick}
                            >
                                保存
                            </button>
                        </td>
                        <td></td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</template>