Browse Source

新增核销接口;

订单列表核销显示更改;
wr_2023_business
wurong 1 year ago
parent
commit
0d98c93d00
  1. 1
      lib/business_system/home/select_shop.dart
  2. 3
      lib/business_system/mine/merchant_info.dart
  3. 12
      lib/business_system/order/order_write_off.dart
  4. 10
      lib/retrofit/business_api.dart
  5. 44
      lib/retrofit/business_api.g.dart

1
lib/business_system/home/select_shop.dart

@ -3,7 +3,6 @@ import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:shimmer/shimmer.dart';
import '../../generated/l10n.dart';
import '../../retrofit/data/business_login_info.dart';

3
lib/business_system/mine/merchant_info.dart

@ -1,12 +1,9 @@
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/retrofit/data/business_store_list.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:shimmer/shimmer.dart';
import '../../generated/l10n.dart';
import '../../retrofit/business_api.dart';
import '../../retrofit/data/base_data.dart';

12
lib/business_system/order/order_write_off.dart

@ -24,6 +24,7 @@ class _OrderWriteOff extends State<OrderWriteOff> {
var writeOffCheck = false;
List<Tickets> tickets;
String productName;
int nameIndex = 0;
@override
void initState() {
@ -132,9 +133,9 @@ class _OrderWriteOff extends State<OrderWriteOff> {
SizedBox(
height: 12.h,
),
basicInfoItem("票券名称:",productName ?? ""),
basicInfoItem("票券名称:",tickets[nameIndex].name ?? ""),
basicInfoItem("用户名称::",widget?.arguments["userName"] ?? ""),
basicInfoItem("票券编号::","177777622222223"),
basicInfoItem("票券编号::",tickets[nameIndex].code ?? ""),
basicInfoItem("订单编号::",widget?.arguments["orderCode"] ?? ""),
],
),
@ -219,7 +220,11 @@ class _OrderWriteOff extends State<OrderWriteOff> {
physics: BouncingScrollPhysics(),
itemBuilder: (context, position) {
return GestureDetector(
onTap: () {},
onTap: () {
setState((){
nameIndex = position;
});
},
child: writeOffInfoItem(tickets[position]),
);
},
@ -277,6 +282,7 @@ class _OrderWriteOff extends State<OrderWriteOff> {
))
],
),
if(tickets.state != 1)
Align(
alignment: Alignment.centerRight,
child:Container(

10
lib/retrofit/business_api.dart

@ -247,4 +247,14 @@ abstract class BusinessApiService {
Future<BaseData<UploadResult>> upload(@Part(name: "file") File data,
@Part(name: "folderId") int folderId);
///
@POST("ticket/wiped")
Future<BaseData> wiped(
@Body() Map<String, dynamic> param);
///
@POST("ticket/wipedBatch")
Future<BaseData> wipedBatch(
@Body() Map<String, dynamic> param);
}

44
lib/retrofit/business_api.g.dart

@ -552,4 +552,48 @@ class _BusinessApiService implements BusinessApiService {
);
return value;
}
@override
Future<BaseData> wiped(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>('ticket/wiped',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(
_result.data,
(json) => json == null ? null : json,
);
return value;
}
@override
Future<BaseData> wipedBatch(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>('ticket/wipedBatch',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(
_result.data,
(json) => json == null ? null : json,
);
return value;
}
}

Loading…
Cancel
Save