|
|
@@ -60,6 +60,14 @@ class _SendExpressPageState extends State < SendExpressPage > with AutomaticKeep
|
|
|
TextEditingController openBankNameController = TextEditingController();
|
|
|
TextEditingController openBankPhoneController = TextEditingController();
|
|
|
|
|
|
+ TextEditingController goodsController = TextEditingController();
|
|
|
+ TextEditingController goodsQuantityController = TextEditingController();
|
|
|
+ TextEditingController goodsFreightController = TextEditingController();
|
|
|
+ TextEditingController goodsAgencyFundController = TextEditingController();
|
|
|
+ TextEditingController goodsPriceProtectionController = TextEditingController();
|
|
|
+ TextEditingController goodsWeightController = TextEditingController();
|
|
|
+ TextEditingController memoController = TextEditingController();
|
|
|
+
|
|
|
FocusNode bankCardFocusNode = FocusNode();
|
|
|
|
|
|
|
|
|
@@ -367,12 +375,12 @@ class _SendExpressPageState extends State < SendExpressPage > with AutomaticKeep
|
|
|
children: < Widget > [
|
|
|
_titleWidget('lib/images/icon_huowu.png', "货物信息"),
|
|
|
_underLine(),
|
|
|
- _contentWiget("货物名称", 'goods', true),
|
|
|
- _contentWiget("数量", 'goods'),
|
|
|
- _contentWiget("运费", 'goods'),
|
|
|
- _contentWiget("代收", 'goods'),
|
|
|
- _contentWiget("保价", 'goods'),
|
|
|
- _contentWiget("重量", 'goods'),
|
|
|
+ _itemContentWiget("货物名称", goodsController, true),
|
|
|
+ _itemContentWiget("数量", goodsQuantityController),
|
|
|
+ _itemContentWiget("运费", goodsFreightController),
|
|
|
+ _itemContentWiget("代收", goodsAgencyFundController),
|
|
|
+ _itemContentWiget("保价", goodsPriceProtectionController),
|
|
|
+ _itemContentWiget("重量", goodsWeightController),
|
|
|
_packageType('包装类型'),
|
|
|
_packageType('货物类型'),
|
|
|
_packageType('付款方式'),
|
|
|
@@ -492,7 +500,7 @@ class _SendExpressPageState extends State < SendExpressPage > with AutomaticKeep
|
|
|
}else if(tab=='getPhone'){
|
|
|
receiptCompanyName = '';
|
|
|
receiptCompanyNameController.text = '';
|
|
|
- receiptCompanyId = null;
|
|
|
+ receiptCompanyId = '0';
|
|
|
|
|
|
getPCA = '';
|
|
|
receiptCompanyProvinceName = '';
|
|
|
@@ -596,16 +604,6 @@ class _SendExpressPageState extends State < SendExpressPage > with AutomaticKeep
|
|
|
String temp = goodsWeight.toStringAsFixed(1);
|
|
|
goodsWeight = double.parse(temp);
|
|
|
}
|
|
|
- }else if(type=='bank'){
|
|
|
- if(key == '银行卡号'){
|
|
|
- bankCard = value;
|
|
|
- }else if(key=='银行名称'){
|
|
|
- bankName = value;
|
|
|
- }else if(key == '开户人'){
|
|
|
- openBankName = value;
|
|
|
- }else if(key == '开户电话'){
|
|
|
- openBankPhone = value;
|
|
|
- }
|
|
|
}
|
|
|
},
|
|
|
),
|
|
|
@@ -628,7 +626,79 @@ class _SendExpressPageState extends State < SendExpressPage > with AutomaticKeep
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- Widget _contentBankWiget(String key, String type, [bool keyboardType = false]) { //false是数字键盘
|
|
|
+ Widget _itemContentWiget(String key,TextEditingController controller, [bool keyboardType = false]) { //false是数字键盘
|
|
|
+ return Padding(
|
|
|
+ padding: EdgeInsets.only(left: ScreenUtil.getInstance().setWidth(30)),
|
|
|
+ child: Column(
|
|
|
+ children: < Widget > [
|
|
|
+ SizedBox(
|
|
|
+ height: ScreenUtil.getInstance().setHeight(89),
|
|
|
+ child: Center(
|
|
|
+ child: Row(
|
|
|
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
+ children: < Widget > [
|
|
|
+ Expanded(
|
|
|
+ flex: 0,
|
|
|
+ child: Text(key, style: TextStyle(fontSize: ScreenUtil.getInstance().setSp(30), color: Color.fromRGBO(74, 74, 74, 1)), ),
|
|
|
+ ),
|
|
|
+ Expanded(
|
|
|
+ child: Row(
|
|
|
+ mainAxisAlignment: MainAxisAlignment.end,
|
|
|
+ children: < Widget > [
|
|
|
+ SizedBox(
|
|
|
+ width: ScreenUtil.getInstance().setWidth(500),
|
|
|
+ child: TextField(
|
|
|
+ controller: controller,
|
|
|
+ keyboardType: keyboardType ? TextInputType.text : TextInputType.number,
|
|
|
+ textAlign: TextAlign.end,
|
|
|
+ decoration: InputDecoration(
|
|
|
+ border: InputBorder.none
|
|
|
+ ),
|
|
|
+ onChanged: (value) {
|
|
|
+ if (key == '货物名称') {
|
|
|
+ goods = value;
|
|
|
+ } else if (key == '数量') {
|
|
|
+ goodsQuantity = int.parse(value);
|
|
|
+ } else if (key == '运费') {
|
|
|
+ goodsFreight = double.parse(value);
|
|
|
+ String temp = goodsFreight.toStringAsFixed(1);
|
|
|
+ goodsFreight = double.parse(temp);
|
|
|
+ } else if (key == '代收') {
|
|
|
+ goodsAgencyFund = double.parse(value);
|
|
|
+ String temp = goodsAgencyFund.toStringAsFixed(1);
|
|
|
+ goodsAgencyFund = double.parse(temp);
|
|
|
+ } else if (key == '保价') {
|
|
|
+ goodsPriceProtection = double.parse(value);
|
|
|
+ String temp = goodsPriceProtection.toStringAsFixed(1);
|
|
|
+ goodsPriceProtection = double.parse(temp);
|
|
|
+ } else if (key == '重量') {
|
|
|
+ goodsWeight = double.parse(value);
|
|
|
+ String temp = goodsWeight.toStringAsFixed(1);
|
|
|
+ goodsWeight = double.parse(temp);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+
|
|
|
+ Icon(Icons.keyboard_arrow_right, color: Color.fromRGBO(199, 199, 204, 1), )
|
|
|
+ ],
|
|
|
+ )
|
|
|
+ )
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ )
|
|
|
+ ),
|
|
|
+ Expanded(
|
|
|
+ flex: 0,
|
|
|
+ child: _underLine()
|
|
|
+ )
|
|
|
+ ],
|
|
|
+ )
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ Widget _contentBankWiget(String key, String type, [bool keyboardType = false]) { //false是数字键盘
|
|
|
return Padding(
|
|
|
padding: EdgeInsets.only(left: ScreenUtil.getInstance().setWidth(30)),
|
|
|
child: Column(
|
|
|
@@ -836,6 +906,7 @@ class _SendExpressPageState extends State < SendExpressPage > with AutomaticKeep
|
|
|
//child: Text(str, maxLines: 100, style: TextStyle(fontSize: ScreenUtil.getInstance().setSp(30), color: Color.fromRGBO(74, 74, 74, 1)), ),
|
|
|
child: TextField(
|
|
|
maxLines: 3,
|
|
|
+ controller: memoController,
|
|
|
decoration: InputDecoration(
|
|
|
border: InputBorder.none,
|
|
|
hintText: "请输入备注内容"
|
|
|
@@ -1076,7 +1147,7 @@ class _SendExpressPageState extends State < SendExpressPage > with AutomaticKeep
|
|
|
}
|
|
|
);
|
|
|
}
|
|
|
- });
|
|
|
+ });
|
|
|
});
|
|
|
});
|
|
|
});
|
|
|
@@ -1091,6 +1162,67 @@ class _SendExpressPageState extends State < SendExpressPage > with AutomaticKeep
|
|
|
Navigator.push(context, MaterialPageRoute(builder: (context) {
|
|
|
return OrderDetail(orderNo: data.orderNo, );
|
|
|
}));
|
|
|
+ }else{
|
|
|
+ setState(() {
|
|
|
+ //----------------清除信息--------------------
|
|
|
+ lineId = '-1';
|
|
|
+ sendCompanyCode = '';
|
|
|
+ sendCompanyName = '';
|
|
|
+ sendCompanyId ='0';
|
|
|
+
|
|
|
+ sendCompanyPhoneController.text= '';
|
|
|
+ sendCompanyCodeController.text = '';
|
|
|
+ sendCompanyNameController.text = '';
|
|
|
+
|
|
|
+ sendPCA = '';
|
|
|
+ sendCompanyProvinceName = '';
|
|
|
+ sendCompanyProvinceCode = '';
|
|
|
+ sendCompanyCityName = '';
|
|
|
+ sendCompanyCityCode = '';
|
|
|
+ sendCompanyAreaName = '';
|
|
|
+ sendCompanyAreaCode = '';
|
|
|
+
|
|
|
+ bankCardController.text = '';
|
|
|
+ bankNameController.text = '';
|
|
|
+ openBankNameController.text = '';
|
|
|
+ openBankPhoneController.text = '';
|
|
|
+
|
|
|
+ sendCompanyAddressController.text = '';
|
|
|
+
|
|
|
+ receiptCompanyName = '';
|
|
|
+ receiptCompanyPhoneController.text= '';
|
|
|
+ receiptCompanyNameController.text = '';
|
|
|
+ receiptCompanyId = '0';
|
|
|
+
|
|
|
+ getPCA = '';
|
|
|
+ receiptCompanyProvinceName = '';
|
|
|
+ receiptCompanyProvinceCode = '';
|
|
|
+ receiptCompanyCityName = '';
|
|
|
+ receiptCompanyCityCode = '';
|
|
|
+ receiptCompanyAreaName = '';
|
|
|
+ receiptCompanyAreaCode = '';
|
|
|
+
|
|
|
+ receiptCompanyAddressController.text = '';
|
|
|
+
|
|
|
+ goods = ''; //商品名称 不能为空
|
|
|
+ goodsQuantity = 1; //商品数量 不能为空
|
|
|
+ goodsPaymentMethod = 2; //付款方式 1,现付 2 到付
|
|
|
+ goodsWeight = 0.0; //商品重量
|
|
|
+ goodsPriceProtection = 0.0; //商品保价
|
|
|
+ goodsAgencyFund = 0.0; //商品代收款
|
|
|
+ goodsFreight = 0.0; //商品运费 不能为空
|
|
|
+ memo = ''; //备注
|
|
|
+
|
|
|
+ goodsController.text = '';
|
|
|
+ goodsQuantityController.text = '';
|
|
|
+ goodsFreightController.text = '';
|
|
|
+ goodsAgencyFundController.text = '';
|
|
|
+ goodsPriceProtectionController.text = '';
|
|
|
+ goodsWeightController.text = '';
|
|
|
+ memoController.text = '';
|
|
|
+ //---------------------------------------------
|
|
|
+ });
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
);
|