Commit 19c6b071abbc14cd7fa3fd01b7239407ae8da36f
1 parent
7780aaa4
feat: update
Showing
3 changed files
with
73 additions
and
35 deletions
src/app.ts
src/pages/Order/constant.ts
... | ... | @@ -94,6 +94,8 @@ export const SALES_CODE_OPTIONS = [ |
94 | 94 | { label: 'W-8_Andy', value: 'W-8_Andy' }, |
95 | 95 | { label: 'CQ_Peter', value: 'CQ_Peter' }, |
96 | 96 | { label: 'MA_A_Mao', value: 'MA_A_Mao' }, |
97 | + { label: 'CQ-2', value: 'CQ-2' }, | |
98 | + { label: 'JJ', value: 'JJ' }, | |
97 | 99 | ]; |
98 | 100 | |
99 | 101 | export const MAIN_ORDER_COLUMNS = [ | ... | ... |
src/pages/Order/index.tsx
... | ... | @@ -51,6 +51,7 @@ import { |
51 | 51 | PAYMENT_CHANNEL_OPTIONS, |
52 | 52 | PAYMENT_METHOD_OPTIONS, |
53 | 53 | PRODUCT_BELONG_DEPARTMENT_OPTIONS, |
54 | + TAGS_COLOR, | |
54 | 55 | } from './constant'; |
55 | 56 | import './index.less'; |
56 | 57 | import { OrderListItemType, OrderType } from './type.d'; |
... | ... | @@ -165,12 +166,24 @@ const OrderPage = () => { |
165 | 166 | const OrderTableHeader = () => { |
166 | 167 | return ( |
167 | 168 | <Flex className="w-full"> |
168 | - <Flex className="w-[24%] ml-[5%]">商品信息</Flex> | |
169 | - <Flex className="w-[15%]">交易金额</Flex> | |
170 | - <Flex className="w-[10%]">支付</Flex> | |
171 | - <Flex className="w-[13%]">其他</Flex> | |
172 | - <Flex className="w-[10%]">交易状态</Flex> | |
173 | - <Flex className="w-[23%]">操作</Flex> | |
169 | + <Flex className="w-[29%] ml-[4%]"> | |
170 | + <span className="font-medium">商品信息</span> | |
171 | + </Flex> | |
172 | + <Flex className="w-[16%]"> | |
173 | + <span className="font-medium">交易金额</span> | |
174 | + </Flex> | |
175 | + <Flex className="w-[10%]"> | |
176 | + <span className="font-medium">支付</span> | |
177 | + </Flex> | |
178 | + <Flex className="w-[14%]"> | |
179 | + <span className="font-medium">其他</span> | |
180 | + </Flex> | |
181 | + <Flex className="w-[10%]"> | |
182 | + <span className="font-medium">交易状态</span> | |
183 | + </Flex> | |
184 | + <Flex className="w-[17%]"> | |
185 | + <span className="font-medium">操作</span> | |
186 | + </Flex> | |
174 | 187 | </Flex> |
175 | 188 | ); |
176 | 189 | }; |
... | ... | @@ -178,9 +191,11 @@ const OrderPage = () => { |
178 | 191 | const SubOderRander = ({ record, optRecord }) => { |
179 | 192 | return ( |
180 | 193 | <Flex className="w-full border-b-indigo-500"> |
181 | - <Flex vertical className="w-[26%]" gap="small"> | |
194 | + <Flex vertical className="w-[31%]" gap="small"> | |
182 | 195 | <div className="whitespace-no-wrap overflow-hidden overflow-ellipsis"> |
183 | - {optRecord.productName} | |
196 | + <span className="text-black font-medium "> | |
197 | + {optRecord.productName} | |
198 | + </span> | |
184 | 199 | </div> |
185 | 200 | <div className="whitespace-no-wrap overflow-hidden overflow-ellipsis"> |
186 | 201 | <span className="text-gray-500">参数:{optRecord.parameters}</span> |
... | ... | @@ -200,48 +215,64 @@ const OrderPage = () => { |
200 | 215 | </Flex> |
201 | 216 | <Flex className="w-[16%]" vertical gap="small"> |
202 | 217 | <div className="whitespace-no-wrap overflow-hidden overflow-ellipsis"> |
203 | - <span className="text-gray-500">单价:</span>¥ | |
204 | - {optRecord.productPrice} | |
218 | + <span className="text-gray-500">单价:</span> | |
219 | + <span className="text-slate-700">¥{optRecord.productPrice}</span> | |
205 | 220 | </div> |
206 | 221 | <div className="whitespace-no-wrap overflow-hidden overflow-ellipsis"> |
207 | - <span className="text-gray-500">数量:</span>x{optRecord.quantity} | |
222 | + <span className="text-gray-500">数量:</span> | |
223 | + <span className="text-slate-700">x{optRecord.quantity}</span> | |
208 | 224 | </div> |
209 | 225 | <div className="whitespace-no-wrap overflow-hidden overflow-ellipsis"> |
210 | - <span className="text-gray-500">合计:</span>¥ | |
211 | - {optRecord.subOrderPayment} | |
226 | + <span className="text-gray-500">合计:</span> | |
227 | + <span className="text-slate-700"> | |
228 | + ¥{optRecord.subOrderPayment} | |
229 | + </span> | |
212 | 230 | </div> |
213 | 231 | </Flex> |
214 | 232 | <Flex className="w-[10%]" vertical gap="small"> |
215 | 233 | <div className="whitespace-no-wrap overflow-hidden overflow-ellipsis"> |
216 | - {enumValueToLabel(optRecord.paymentMethod, PAYMENT_METHOD_OPTIONS)} | |
234 | + <span className="text-slate-700"> | |
235 | + {enumValueToLabel( | |
236 | + optRecord.paymentMethod, | |
237 | + PAYMENT_METHOD_OPTIONS, | |
238 | + )} | |
239 | + </span> | |
217 | 240 | </div> |
218 | 241 | <div className="whitespace-no-wrap overflow-hidden overflow-ellipsis"> |
219 | - {enumValueToLabel( | |
220 | - optRecord.paymentChannel, | |
221 | - PAYMENT_CHANNEL_OPTIONS, | |
222 | - )} | |
242 | + <span className="text-slate-700"> | |
243 | + {enumValueToLabel( | |
244 | + optRecord.paymentChannel, | |
245 | + PAYMENT_CHANNEL_OPTIONS, | |
246 | + )} | |
247 | + </span> | |
223 | 248 | </div> |
224 | 249 | </Flex> |
225 | 250 | <Flex className="w-[15%]" vertical gap="small"> |
226 | 251 | <div className="whitespace-no-wrap overflow-hidden overflow-ellipsis"> |
227 | - {enumValueToLabel( | |
228 | - optRecord.productBelongBusiness, | |
229 | - PRODUCT_BELONG_DEPARTMENT_OPTIONS, | |
230 | - )} | |
252 | + <span className="text-slate-700"> | |
253 | + {enumValueToLabel( | |
254 | + optRecord.productBelongBusiness, | |
255 | + PRODUCT_BELONG_DEPARTMENT_OPTIONS, | |
256 | + )} | |
257 | + </span> | |
231 | 258 | </div> |
232 | 259 | </Flex> |
233 | 260 | <Flex className="w-[10%]" vertical gap="small"> |
234 | 261 | <div className="whitespace-no-wrap overflow-hidden overflow-ellipsis"> |
235 | - {enumValueToLabel( | |
236 | - optRecord.invoicingStatus, | |
237 | - INVOCING_STATUS_OPTIONS, | |
238 | - )} | |
262 | + <Tag color={TAGS_COLOR.get(optRecord.invoicingStatus)}> | |
263 | + {enumValueToLabel( | |
264 | + optRecord.invoicingStatus, | |
265 | + INVOCING_STATUS_OPTIONS, | |
266 | + )} | |
267 | + </Tag> | |
239 | 268 | </div> |
240 | 269 | <div className="whitespace-no-wrap overflow-hidden overflow-ellipsis"> |
241 | - {enumValueToLabel(optRecord.orderStatus, ORDER_STATUS_OPTIONS)} | |
270 | + <Tag color={TAGS_COLOR.get(optRecord.orderStatus)}> | |
271 | + {enumValueToLabel(optRecord.orderStatus, ORDER_STATUS_OPTIONS)} | |
272 | + </Tag> | |
242 | 273 | </div> |
243 | 274 | </Flex> |
244 | - <Flex className="w-[23%]" wrap="wrap" gap="small"> | |
275 | + <Flex className="w-[18%]" wrap="wrap" gap="small"> | |
245 | 276 | {optRecord.subPath.includes('sendProduct') ? ( |
246 | 277 | <Button |
247 | 278 | className="p-0" |
... | ... | @@ -444,6 +475,7 @@ const OrderPage = () => { |
444 | 475 | options={false} |
445 | 476 | dataSource={subOrders} |
446 | 477 | pagination={false} |
478 | + tableAlertRender={false} | |
447 | 479 | /> |
448 | 480 | ); |
449 | 481 | }; |
... | ... | @@ -467,7 +499,7 @@ const OrderPage = () => { |
467 | 499 | <Space split={<Divider type="vertical" />}> |
468 | 500 | <div> |
469 | 501 | <span className="text-gray-500">订单号:</span> |
470 | - <span>{record.id}</span> | |
502 | + <span className="text-slate-700">{record.id}</span> | |
471 | 503 | </div> |
472 | 504 | <span>{formatDateTime(record.createTime)}</span> |
473 | 505 | </Space> |
... | ... | @@ -475,15 +507,17 @@ const OrderPage = () => { |
475 | 507 | <Space split={<Divider type="vertical" />}> |
476 | 508 | <div> |
477 | 509 | <span className="text-gray-500">代表:</span> |
478 | - {record.salesCode} | |
510 | + <span className="text-slate-700">{record.salesCode}</span> | |
479 | 511 | </div> |
480 | 512 | <span> |
481 | 513 | <span className="text-gray-500">单位:</span> |
482 | - {record.institution} | |
514 | + <span className="text-slate-700">{record.institution}</span> | |
483 | 515 | </span> |
484 | 516 | <span> |
485 | 517 | <span className="text-gray-500">联系人:</span> |
486 | - {record.institutionContactName} | |
518 | + <span className="text-slate-700"> | |
519 | + {record.institutionContactName} | |
520 | + </span> | |
487 | 521 | </span> |
488 | 522 | </Space> |
489 | 523 | </Flex> |
... | ... | @@ -509,8 +543,10 @@ const OrderPage = () => { |
509 | 543 | <Flex justify="flex-end"> |
510 | 544 | <Flex wrap="wrap" gap="middle" align="center"> |
511 | 545 | <div> |
512 | - <span>总金额:</span> | |
513 | - <span className="text-lg">{record.totalPayment}¥</span> | |
546 | + <span className="text-gray-500">总金额:¥</span> | |
547 | + <span className="text-lg font-medium"> | |
548 | + {record.totalPayment} | |
549 | + </span> | |
514 | 550 | </div> |
515 | 551 | {rolePath?.includes('addOrder') ? ( |
516 | 552 | <CopyTwoTone | ... | ... |