|
|
@@ -144,6 +144,8 @@ class _ItemInfoWidgetState extends State < ItemInfoWidget > {
|
|
|
String showTextPaymentMehod = '现付';
|
|
|
int goodsPaymentMethod = 1;
|
|
|
BluetoothUtils bluetooth = BluetoothUtils();
|
|
|
+ bool checkedLine = false;
|
|
|
+ String stationId;
|
|
|
@override
|
|
|
void initState() {
|
|
|
super.initState();
|
|
|
@@ -153,6 +155,14 @@ class _ItemInfoWidgetState extends State < ItemInfoWidget > {
|
|
|
afterCollectingFee = widget.obj.goodsAgencyFund / 100;
|
|
|
lineId = widget.obj.lineId.toString();
|
|
|
});
|
|
|
+ if(afterTransportFee<=0){
|
|
|
+ getKey('defaultFreightPrice').then((resp){
|
|
|
+ afterTransportFee = int.parse(resp)/100;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ getKey('stationId').then((resp){
|
|
|
+ stationId = resp;
|
|
|
+ });
|
|
|
if (widget.obj.receiptCompanyId != null) {
|
|
|
getLineOfCompanyId(widget.obj.receiptCompanyId.toString()).then((resp) {
|
|
|
if (isNotError(context, resp) && this.mounted) {
|
|
|
@@ -179,7 +189,7 @@ class _ItemInfoWidgetState extends State < ItemInfoWidget > {
|
|
|
underLine(),
|
|
|
contentWiget("货物名称", widget.obj.goods),
|
|
|
_inputWidget("数量", widget.obj.goodsQuantity),
|
|
|
- _inputWidget("运费", widget.obj.goodsFreight / 100),
|
|
|
+ _inputWidget("运费", afterTransportFee),
|
|
|
_inputWidget("代收", widget.obj.goodsAgencyFund / 100),
|
|
|
_packageType('付款方式'),
|
|
|
contentWiget(
|
|
|
@@ -333,7 +343,7 @@ class _ItemInfoWidgetState extends State < ItemInfoWidget > {
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
- if (lineList.length > 1 && widget.status == '寄件') {
|
|
|
+ if (lineList.length > 1 && widget.status == '寄件' && !checkedLine) {
|
|
|
showLineModal(lineList, orderNo);
|
|
|
return;
|
|
|
}
|
|
|
@@ -433,7 +443,17 @@ class _ItemInfoWidgetState extends State < ItemInfoWidget > {
|
|
|
lineList: list,
|
|
|
childCallback: (val) {
|
|
|
lineId = val;
|
|
|
- submitOrder(orderNo);
|
|
|
+ goodsNameAccurate(stationId,afterTransportFee.toString(),lineId).then((resp){
|
|
|
+ if(isNotError(context, resp) && this.mounted){
|
|
|
+ if(resp.data['data']['goods']!=null){
|
|
|
+ GoodsPriceList tempObj = GoodsPriceObjAccurate.fromJson(resp.data).data;
|
|
|
+ setState(() {
|
|
|
+ afterTransportFee=tempObj.price/100;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ checkedLine = true;
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
);
|
|
|
});
|