-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbackstage_order.html
219 lines (186 loc) · 8.08 KB
/
backstage_order.html
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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
<!DOCTYPE html>
<html lang="zh-hant">
<head>
<meta charset="UTF-8">
<link rel="shortcut icon" href="./favicon.ico"/>
<link rel="bookmark" href="./favicon.ico"/>
<!-- icon -->
<link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.10.0/css/all.css"
integrity="sha384-AYmEC3Yw5cVb3ZcuHtOA93w35dYTsvhLPVnYs9eStHfGJvOvKxVfELGroGkvsg+p" crossorigin="anonymous" />
<!-- bootstrap css -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<!-- css -->
<link rel="stylesheet" href="./css/style.css">
<!-- jq -->
<script src="./js/jquery/dist/jquery.min.js"></script>
<!-- popper js -->
<script src="./js/@popperjs/core/dist/umd/popper.min.js"></script>
<!-- vue -->
<script src="./js/vue.min.js"></script>
<!-- axios js -->
<script src="./js/axios/dist/axios.min.js"></script>
<!-- 只要有套用backstage.js 會自動在當aside頁籤上fontWeight:bold -->
<title>訂單管理</title>
</head>
<body class="backStageBody">
<!------------------------------header---------------------------------->
<header class="header">
<nav class="nav navback" id="nav">
<div class="title">
<h1>月老商城 |</h1>
<h2 class="smallTitle" v-if="title === 'menu'"> 訂單管理</h2>
<h2 class="smallTitle" v-else="title === 'modify'"> 訂單修改</h2>
</div>
<div class="logout" @click="logout">
<h3>
登出
</h3>
</div>
</nav>
</header>
<!-- wrapper請取自己的名稱,套用範例的格式 -->
<div id="backend" class="backstage-order-wrapper">
<!------------------------------內容---------------------------------->
<!------------------------------側邊選單---------------------------------->
<aside>
<div class="Logo"><a href="./index.html"><img src="./images/logo.png"></a></div>
<div class="username">
<h2 class="text">登入者 : <br> {{username}}</h2>
</div>
<ul class="option">
<li class="list" v-for="(list,key) in lists" :key="key">
<a :href="list.href">
<h3 class="listName">
{{list.list}}
</h3>
</a>
</li>
</ul>
</aside>
<!------------------------------主要內容---------------------------------->
<main>
<div class="Bcontainer">
<!-- <div class="editbar" v-if="menu">
<div class="bkbtn_Blue" @click="add('n')">
<h3>新增商品</h3>
</div>
</div> -->
<table v-if="menu">
<!-- 標題在thead class要按照下面方式寫才能吃到顏色-->
<thead>
<tr>
<!-- td_***是設定寬度 -->
<td class="thtd td_55">
<h3>訂單編號</h3>
</td>
<td class="thtd td_80">
<h3>購買會員</h3>
</td>
<td class="thtd td_75">
<h3>訂單金額</h3>
</td>
<td class="thtd td_75">
<h3>訂單日期</h3>
</td>
<td class="thtd td_75">
<h3>編輯</h3>
</td>
</tr>
</thead>
<!-- 內容在tbody,如果要新增行數就加一組tr -->
<tbody>
<tr is="row" v-for="(data,index) in pagedListdata" :id="data.ID" :realid="data[0]" :index="index" :name="data.USERNAME" :price="data.PRICE" :date="data.ORDER_TIME"></tr>
</tbody>
</table>
<table v-else="menu">
<tr>
<td class="td_25">
<h4>訂單編號</h4>
</td>
<td class="td_md">
<h4>{{modify_data.ID}}</h4>
</td>
</tr>
<tr>
<!-- td_***是設定寬度 -->
<td class="td_25">
<h4>購買會員</h4>
</td>
<td class="td_md">
<h4>{{modify_data.USERNAME}}</h4>
</td>
</tr>
<tr>
<td class="td_25">
<h4>訂單金額</h4>
</td>
<td class="td_md">
<h4>{{modify_data.PRICE}}</h4>
</td>
</tr>
<tr>
<td class="td_25">
<h4>訂單日期</h4>
</td>
<td class="td_md">
<h4>{{modify_data.ORDER_TIME}}</h4>
</td>
</tr>
<tr is="products" v-for="product in products" :name="product.NAME" :num="product.ORDER_QUANTITY" :price="product.PRICE">
<tr>
<td class="td_25">
<h4>訂單狀態</h4>
</td>
<td class="td_md imgbox">
<select class="input_status" v-model="modify_data.ORDER_STATUS">
<option value="0" :selected="0 == modify_data.ORDER_STATUS">出貨中</option>
<option value="1" :selected="1 == modify_data.ORDER_STATUS">已出貨</option>
<option value="2" :selected="2 == modify_data.ORDER_STATUS">取消</option>
</select>
</td>
</tr>
<tr>
<td class="td_25">
<h4>取消日期</h4>
</td>
<td class="td_md imgbox">
<h4>{{modify_data.CANCEL_DATE}}</h4>
</td>
</tr>
<tr>
<td class="td_100">
<div class="btn">
<div class="bkbtn_Blue" @click="cancel">
<h3>取消</h3>
</div>
<div class="bkbtn_Red" @click="change(modify_data)">
<h3>完成</h3>
</div>
</div>
</td>
</tr>
</table>
<paginate
for="sql"
:page-count="pageCount"
:margin-pages = "pageCount"
:prev-text="'«'"
:next-text="'»'"
:click-handler="pageCallback"
prev-class ="page-item"
prev-link-class ="page-link"
next-class ="page-item"
next-link-class ="page-link"
page-class ="page-item"
page-link-class ="page-link"
container-class="pagination" v-show="menu">
</paginate>
</div>
</main>
</div>
<!-- vue paginate -->
<script src="https://unpkg.com/[email protected]"></script>
<!-- 後台js -->
<script src="./js/backstage-order.js"></script>
</body>
</html>