tplus-components-touch 3.39.5 → 3.39.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -96,7 +96,7 @@ var _default = (0, _mobxReact.observer)(_class = function (_React$Component) {
|
|
|
96
96
|
|
|
97
97
|
var viewInfo = this.props.viewInfo;
|
|
98
98
|
// const { getFieldProps, getFieldError,setFieldsValue } = this.props.form;
|
|
99
|
-
var isShouldUseAndroidKeyBoard = viewInfo.Title == '会员姓名';
|
|
99
|
+
var isShouldUseAndroidKeyBoard = viewInfo.Title == '会员姓名' || viewInfo.Title == '收货人' || viewInfo.Title == '详细地址';
|
|
100
100
|
|
|
101
101
|
var _this = this;
|
|
102
102
|
return _react2.default.createElement(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["tplus-components-touch/components/commonForm/formControl/index.js"],"names":["FormItem","Item","observer","props","context","useKb","setFieldsValue","form","current","viewInfo","_this","Keyboard","close","changeVal","open","v","value","getNewValue","input","changed","state","isShouldUseAndroidKeyBoard","Title","required","AllowNone","message","Format","ReadOnly","el","MaxLength","React","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;AAGA;;;;AACA;;;;AAEA;;;;AAJA,IAAMA,WAAW,eAAKC,IAAtB;AAGA;;mBAECC,mB;;;AAGG,sBAAYC,KAAZ,EAAkBC,OAAlB,EAA0B;AAAA;;AAAA,+IAChBD,KADgB;;AAAA,eAO1BE,KAP0B,GAOpB,YAAI;AAAA,gBACEC,cADF,GACqB,OAAKH,KAAL,CAAWI,IAAX,CAAgBC,OADrC,CACEF,cADF;;AAEN,gBAAIG,WAAU,OAAKN,KAAL,CAAWM,QAAzB;AACA,gBAAMC,cAAN;AACAC,+BAASC,KAAT;AAJM,gBAKEC,SALF,GAKgB,OAAKV,KALrB,CAKEU,SALF;;AAMNF,+BAASG,IAAT,CAAc,UAACC,CAAD,EAAK;AACf,oBAAIC,QAAML,mBAASM,WAAT,CAAqBP,MAAMQ,KAAN,CAAYA,KAAjC,EAAuCR,MAAMQ,KAAN,CAAYA,KAAZ,CAAkBF,KAAzD,EAA+DD,CAA/D,CAAV;AACA,oBAAMI,UAAU,EAAhB;AACAA,wBAAQV,SAAS,WAAT,CAAR,IAA+BO,KAA/B;AACAV,+BAAea,OAAf;AACAN,6BAAaA,UAAUM,OAAV,CAAb;AACH,aAND;AAOH,SApByB;;AAEtB,eAAKC,KAAL,GAAW;AACPJ,mBAAM;AADC,SAAX;AAFsB;AAKzB;;;;iCAiBO;AAAA;;AACJ,gBAAIP,WAAU,KAAKN,KAAL,CAAWM,QAAzB;AACA;AACA,gBAAMY,6BAA8BZ,SAASa,KAAT,IAAkB,
|
|
1
|
+
{"version":3,"sources":["tplus-components-touch/components/commonForm/formControl/index.js"],"names":["FormItem","Item","observer","props","context","useKb","setFieldsValue","form","current","viewInfo","_this","Keyboard","close","changeVal","open","v","value","getNewValue","input","changed","state","isShouldUseAndroidKeyBoard","Title","required","AllowNone","message","Format","ReadOnly","el","MaxLength","React","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;AAGA;;;;AACA;;;;AAEA;;;;AAJA,IAAMA,WAAW,eAAKC,IAAtB;AAGA;;mBAECC,mB;;;AAGG,sBAAYC,KAAZ,EAAkBC,OAAlB,EAA0B;AAAA;;AAAA,+IAChBD,KADgB;;AAAA,eAO1BE,KAP0B,GAOpB,YAAI;AAAA,gBACEC,cADF,GACqB,OAAKH,KAAL,CAAWI,IAAX,CAAgBC,OADrC,CACEF,cADF;;AAEN,gBAAIG,WAAU,OAAKN,KAAL,CAAWM,QAAzB;AACA,gBAAMC,cAAN;AACAC,+BAASC,KAAT;AAJM,gBAKEC,SALF,GAKgB,OAAKV,KALrB,CAKEU,SALF;;AAMNF,+BAASG,IAAT,CAAc,UAACC,CAAD,EAAK;AACf,oBAAIC,QAAML,mBAASM,WAAT,CAA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kBAAI;AAAElB,2CAASC,KAAT;AAAkB;AAlBpC;AADJ,aADJ;AAwBH;;;EAtDwBkB,gBAAMC,S","file":"index.js","sourcesContent":["import React from 'react';\nimport { Input, Form } from 'antd';\nconst FormItem = Form.Item;\nimport Ticon from '../../ticon';\nimport Keyboard from '../../keyboard';\n// import './style.less';\nimport {observer} from 'mobx-react';\n@observer\nexport default class extends React.Component{\n\n constructor(props,context){\n super(props)\n this.state={\n value:11\n }\n }\n\n useKb=()=>{\n const { setFieldsValue } = this.props.form.current;\n let viewInfo= this.props.viewInfo;\n const _this=this;\n Keyboard.close();\n const { changeVal } = this.props;\n Keyboard.open((v)=>{\n let value=Keyboard.getNewValue(_this.input.input,_this.input.input.value,v);\n const changed = {}\n changed[viewInfo['FieldName']]=value;\n setFieldsValue(changed);\n changeVal && changeVal(changed)\n })()\n }\n\n render(){\n let viewInfo= this.props.viewInfo;\n // const { getFieldProps, getFieldError,setFieldsValue } = this.props.form;\n const isShouldUseAndroidKeyBoard = viewInfo.Title == '会员姓名' || viewInfo.Title == '收货人' || viewInfo.Title == '详细地址';\n\n const _this=this;\n return (\n <FormItem label={viewInfo.Title} name={viewInfo['FieldName']} rules={[{required: !viewInfo.AllowNone, message: <span><Ticon type=\"tanhao\"/><span>请输入{viewInfo.Title}</span></span>}]} >\n <Input\n placeholder=\"\"\n type={viewInfo.Format==='PassWord'?'password':'text'}\n disabled={viewInfo.ReadOnly}\n ref={(el)=>{\n _this.input = el;\n }}\n className = {`${isShouldUseAndroidKeyBoard?'android_focus_keyboard':''}`}\n onFocus={()=>{\n this.useKb()\n }}\n maxLength={viewInfo.MaxLength || '-'}\n // suffix={\n // <Ticon type='jianpan2' onClick={()=>{\n // _this.input.input.focus();\n // }}\n // ></Ticon>\n // }\n onBlur={()=>{ Keyboard.close();}}\n />\n </FormItem>\n )\n }\n}\n"]}
|
|
@@ -463,17 +463,18 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
463
463
|
} else {
|
|
464
464
|
item.badge = { text: '', position: '', className: '' };
|
|
465
465
|
}
|
|
466
|
-
if (!item.IsPresent) {
|
|
467
|
-
discountRetailTotalAount += item.RetailPrice * item.Quantity;
|
|
468
|
-
}
|
|
469
466
|
if (item.PromotionDetails && item.PromotionDetails.length > 0) {
|
|
470
467
|
count++;
|
|
471
468
|
}
|
|
472
469
|
item.InventoryName = item.Inventory.Name;
|
|
473
470
|
item.Discount = (0, _utils.getRoundValue)(item.RetailPrice - item.TaxPrice, pricePrecision);
|
|
474
|
-
|
|
471
|
+
if (!item.IsPresent) {
|
|
472
|
+
discountPrototypeTotalAmount += item.DetailDiscountAmount;
|
|
473
|
+
item.TotalDiscount = item.DetailDiscountAmount;
|
|
474
|
+
} else {
|
|
475
|
+
item.TotalDiscount = 0;
|
|
476
|
+
}
|
|
475
477
|
//item.TotalDiscount = getFixedNumber(item.Discount * item.Quantity);
|
|
476
|
-
item.TotalDiscount = item.DetailDiscountAmount;
|
|
477
478
|
item.nAmount = (0, _utils.getFixedNumber)(item.TaxAmount);
|
|
478
479
|
item.UnitName = item.Unit.Name;
|
|
479
480
|
item.nQuantity = (0, _utils.getRoundValue)(item.Quantity, quantityPrecision);
|
|
@@ -484,7 +485,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
484
485
|
dataSource: dataSource,
|
|
485
486
|
discountTotalAmount: (0, _utils.getFixedNumber)(_this2.props.amount),
|
|
486
487
|
discountPrototypeTotalAmount: (0, _utils.getFixedNumber)(discountPrototypeTotalAmount),
|
|
487
|
-
discountRetailTotalAount: (0, _utils.getFixedNumber)(_this2.props.amount + discountPrototypeTotalAmount)
|
|
488
|
+
discountRetailTotalAount: (0, _utils.getFixedNumber)(_this2.props.amount + parseFloat(discountPrototypeTotalAmount))
|
|
488
489
|
});
|
|
489
490
|
return count;
|
|
490
491
|
};
|
|
@@ -1722,6 +1723,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1722
1723
|
|
|
1723
1724
|
_modalWraper2.default.confirm({
|
|
1724
1725
|
className: 'tplus-confirm-modal',
|
|
1726
|
+
zIndex: 1007,
|
|
1725
1727
|
content: _react2.default.createElement(
|
|
1726
1728
|
'div',
|
|
1727
1729
|
{ className: 'unReturn' },
|
|
@@ -2648,7 +2650,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2648
2650
|
|
|
2649
2651
|
_this2.btnDebounced = function () {
|
|
2650
2652
|
var _ref27 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee16(type, bquick) {
|
|
2651
|
-
var IdbusiType, CustomerPhone, DistributionMode, Address, title, _enumController$getEn23, PayStyle, _this2$store8, paymode, brefund, boriginReturn, newStyle, status;
|
|
2653
|
+
var IdbusiType, CustomerPhone, DistributionMode, Address, isEnableSerialNumber, resultObj, title, _enumController$getEn23, PayStyle, _this2$store8, paymode, brefund, boriginReturn, newStyle, status;
|
|
2652
2654
|
|
|
2653
2655
|
return _regenerator2.default.wrap(function _callee16$(_context16) {
|
|
2654
2656
|
while (1) {
|
|
@@ -2661,24 +2663,39 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2661
2663
|
//预订时,若没录入买家手机号,或配送方式为快递时,弹框买家信息确认框
|
|
2662
2664
|
|
|
2663
2665
|
if (!(IdbusiType == 38)) {
|
|
2664
|
-
_context16.next =
|
|
2666
|
+
_context16.next = 14;
|
|
2665
2667
|
break;
|
|
2666
2668
|
}
|
|
2667
2669
|
|
|
2670
|
+
//预售下单时,启用了序列号管理和批号/有效期管理的商品,不支持快递和同城配送
|
|
2671
|
+
isEnableSerialNumber = (0, _tplusPoslogin.PosInitData)("IsEnableSerialNumber");
|
|
2672
|
+
resultObj = _this2.context.viewModel.data.RetailDetails.find(function (o) {
|
|
2673
|
+
return o.Inventory.IsSerialNumber && (o.Inventory.IsBatch || o.Inventory.IsQualityPeriod);
|
|
2674
|
+
});
|
|
2675
|
+
|
|
2676
|
+
if (!(isEnableSerialNumber && resultObj && (DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE'))) {
|
|
2677
|
+
_context16.next = 9;
|
|
2678
|
+
break;
|
|
2679
|
+
}
|
|
2680
|
+
|
|
2681
|
+
return _context16.abrupt('return', _message2.default.error('启用了序列号管理和批号/有效期管理的商品,不支持快递和同城配送'));
|
|
2682
|
+
|
|
2683
|
+
case 9:
|
|
2684
|
+
|
|
2668
2685
|
if (DistributionMode.Id == 'ON_SITE_PICKUP' && !CustomerPhone && _this2.context.viewModel.data.Member.Mobilephone) {
|
|
2669
2686
|
_this2.props.syncMemberInfoProcessor();
|
|
2670
2687
|
}
|
|
2671
2688
|
|
|
2672
2689
|
if (!(!CustomerPhone && !_this2.context.viewModel.data.Member.Mobilephone || DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE')) {
|
|
2673
|
-
_context16.next =
|
|
2690
|
+
_context16.next = 14;
|
|
2674
2691
|
break;
|
|
2675
2692
|
}
|
|
2676
2693
|
|
|
2677
2694
|
title = (DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE') && Address ? '收货地址确认' : '收货人';
|
|
2678
|
-
_context16.next =
|
|
2695
|
+
_context16.next = 14;
|
|
2679
2696
|
return _this2.props.openBuyerModal(title);
|
|
2680
2697
|
|
|
2681
|
-
case
|
|
2698
|
+
case 14:
|
|
2682
2699
|
|
|
2683
2700
|
_this2.setState({
|
|
2684
2701
|
bquick: bquick,
|
|
@@ -2688,13 +2705,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2688
2705
|
_this2$store8 = _this2.store, paymode = _this2$store8.paymode, brefund = _this2$store8.brefund, boriginReturn = _this2$store8.boriginReturn, newStyle = _this2$store8.newStyle;
|
|
2689
2706
|
|
|
2690
2707
|
if (!(bquick && !_mutantsMicrofx.stores.offlineSys.shouldSettlement(type))) {
|
|
2691
|
-
_context16.next =
|
|
2708
|
+
_context16.next = 19;
|
|
2692
2709
|
break;
|
|
2693
2710
|
}
|
|
2694
2711
|
|
|
2695
2712
|
return _context16.abrupt('return', false);
|
|
2696
2713
|
|
|
2697
|
-
case
|
|
2714
|
+
case 19:
|
|
2698
2715
|
status = false;
|
|
2699
2716
|
|
|
2700
2717
|
paymode.thePaymodes.forEach(function (v) {
|
|
@@ -2707,13 +2724,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2707
2724
|
});
|
|
2708
2725
|
|
|
2709
2726
|
if (!_this2.btndebounced) {
|
|
2710
|
-
_context16.next =
|
|
2727
|
+
_context16.next = 24;
|
|
2711
2728
|
break;
|
|
2712
2729
|
}
|
|
2713
2730
|
|
|
2714
2731
|
return _context16.abrupt('return');
|
|
2715
2732
|
|
|
2716
|
-
case
|
|
2733
|
+
case 24:
|
|
2717
2734
|
_this2.btndebounced = (0, _debounce3.default)(function () {
|
|
2718
2735
|
if (bquick) {
|
|
2719
2736
|
_this2.quickSettle(type);
|
|
@@ -2730,7 +2747,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2730
2747
|
_this2.btndebounced = null;
|
|
2731
2748
|
}, 2000);
|
|
2732
2749
|
|
|
2733
|
-
case
|
|
2750
|
+
case 27:
|
|
2734
2751
|
case 'end':
|
|
2735
2752
|
return _context16.stop();
|
|
2736
2753
|
}
|