/var/www/hkosl.com/innoutstorage/webadmin/bk20220830/customer_addform.php


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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<?php
    
require_once('check_login.php');

    
$customer_type_info get_master_type_code("CUSTOMER_TYPE");
?>
<!DOCTYPE html>
<html>
<head>
    <?php require_once('html_head.php'); ?>
    <script type="text/javascript">
        function _customer_type(customer_type) {
            if (customer_type == "PERSONAL") {
                $("#companyname").hide();
            } else {
                $("#companyname").show();
            }
        }

        $(function () {
            if($("select[name='customer_type']").val() == "BUSINESS"){
                _customer_type('BUSINESS');
            }
        });
    </script>

    <style>
        table input[type='text'], table textarea {
            width: 95%;
        }

        .need_delivery_service {
            display: none;
        }
    </style>

</head>
<body>

<form action="customer_add.php" method="post" name="customer_add" enctype="multipart/form-data">
    <table width="900" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td height="70" align="right" valign="middle" class="icontxt">
                <table border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="50" align="center" style="font-size: 12px;">
                            <input type="image" alt="submit" src="images/iconSave.png" width="32" height="32" border="0"><br>
                            &nbsp;儲存&nbsp;&nbsp;</td>
                        <td width="50" align="center">
                            <a href="customer_index.php"><img src="images/iconCancel.png" alt="Cancel" width="32" height="32" border="0"><br>
                                &nbsp;返回&nbsp;&nbsp;</a></td>
                        <td>&nbsp;</td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <span style="float:left;" class="pagetitletxt">
                    &nbsp;&nbsp;<b><img src="images/iconList.jpg" width="48" height="48" align="absmiddle"/> 新增 客戶 </b></span>
            </td>
        </tr>
        <tr>
            <td align="left" valign="middle"><!-- Content -->
                <table style="width: 100%; margin-left: 10px;">

                    <tr>
                        <td style="width: 150px;">
                            <p class="required">客戶類型: </p>
                        </td>

                        <td style="min-width: 400px;">
                            <select name="customer_type" onchange="_customer_type($(this).val());">
                                <?php
                                    
foreach ($customer_type_info as $customer_type) {

                                        echo 
"<option value='" $customer_type["code"] . "'>" $customer_type["name_tc"] . "</option>";
                                    }
                                
?>
                            </select> <br> <span class="msg">個人: 以身分證作認證 &nbsp;&nbsp;&nbsp; 商業: 以商業登記證作認證 </span>

                        </td>
                    </tr>

                    <tr>
                        <td>
                            <p class="required">證明文件號碼: </p>
                        </td>

                        <td>
                            <input type="text" name="identity_id" style="width: 150px;"/>

                        </td>
                    </tr>

                    <tr>
                        <td>
                            <p class="required">頭銜: </p>
                        </td>

                        <td>
                            <select name="title">
                                <option value="Mr">先生</option>
                                <option value="Mrs">女士</option>
                                <option value="Ms">>小姐</option>
                            </select>
                        </td>
                    </tr>

                    <tr>
                        <td>
                            <p class="required">姓氏: </p>
                        </td>

                        <td>
                            <input type="text" name="lastname" style="width: 300px;"/>
                        </td>
                    </tr>

                    <tr>
                        <td>
                            <p class="required">名字: </p>
                        </td>

                        <td>
                            <input type="text" name="firstname" style="width: 300px;"/>
                        </td>
                    </tr>

                    <tr id="companyname" style="display: none;">
                        <td>
                            <p class="required">公司名稱: </p>
                        </td>

                        <td>
                            <input type="text" name="companyname" style="width: 600px;"/>
                        </td>
                    </tr>

                    <tr>
                        <td>
                            <p class="">聯絡電郵: </p>
                        </td>

                        <td>
                            <input type="text" name="email" style="width: 300px;"/>
                        </td>
                    </tr>

                    <tr>
                        <td>
                            <p class="required">聯絡電話: </p>
                        </td>

                        <td>
                            <input type="text" name="tel" style="width: 300px;"/>
                        </td>
                    </tr>

                    <tr>
                        <td>
                            <p class="required">聯絡地址: </p>
                        </td>

                        <td>
                            <input type="text" name="address" style="width: 600px;"/>
                        </td>
                    </tr>

                    <tr>
                        <td></td>
                        <td>
                            <p class="red">* 必須填寫</p>
                        </td>

                    </tr>

                </table>

                <br><br>
            </td>
        </tr>
    </table>
</form>
</body>
</html>