tplus-components-touch 3.39.4 → 3.39.7
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"]}
|
|
@@ -522,6 +522,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
522
522
|
|
|
523
523
|
_this2.settleZero = function () {
|
|
524
524
|
var that = _this2;
|
|
525
|
+
//预售取货无需支付时省略弹框确认这一步
|
|
526
|
+
var IdbusiType = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && _this2.context.viewModel.data.IdbusiType;
|
|
527
|
+
if (IdbusiType == 39) {
|
|
528
|
+
that.handleSettle("zero");
|
|
529
|
+
return;
|
|
530
|
+
}
|
|
525
531
|
_modalWraper2.default.confirm({
|
|
526
532
|
className: 'tplus-confirm-modal',
|
|
527
533
|
title: '结算',
|
|
@@ -1716,6 +1722,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1716
1722
|
|
|
1717
1723
|
_modalWraper2.default.confirm({
|
|
1718
1724
|
className: 'tplus-confirm-modal',
|
|
1725
|
+
zIndex: 1007,
|
|
1719
1726
|
content: _react2.default.createElement(
|
|
1720
1727
|
'div',
|
|
1721
1728
|
{ className: 'unReturn' },
|
|
@@ -1910,6 +1917,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1910
1917
|
message = "退货成功";
|
|
1911
1918
|
} else if (MemberPoints && Number(amount) == Number(0)) {
|
|
1912
1919
|
message = "兑换成功";
|
|
1920
|
+
} else if (IdbusiType == 39 && received == 0) {
|
|
1921
|
+
message = "取货成功";
|
|
1913
1922
|
}
|
|
1914
1923
|
window.__successModal = (0, _utils.showSuccessModal)(amount, received, charge, _this.props.onModalClose, isXianjin, message, resp1 && resp1.data, _mutantsMicrofx.stores, IdbusiType, isFull, function () {
|
|
1915
1924
|
_this.handleGuestShow(5);
|
|
@@ -2640,7 +2649,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2640
2649
|
|
|
2641
2650
|
_this2.btnDebounced = function () {
|
|
2642
2651
|
var _ref27 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee16(type, bquick) {
|
|
2643
|
-
var IdbusiType, CustomerPhone, DistributionMode, Address, title, _enumController$getEn23, PayStyle, _this2$store8, paymode, brefund, boriginReturn, newStyle, status;
|
|
2652
|
+
var IdbusiType, CustomerPhone, DistributionMode, Address, isEnableSerialNumber, resultObj, title, _enumController$getEn23, PayStyle, _this2$store8, paymode, brefund, boriginReturn, newStyle, status;
|
|
2644
2653
|
|
|
2645
2654
|
return _regenerator2.default.wrap(function _callee16$(_context16) {
|
|
2646
2655
|
while (1) {
|
|
@@ -2653,24 +2662,39 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2653
2662
|
//预订时,若没录入买家手机号,或配送方式为快递时,弹框买家信息确认框
|
|
2654
2663
|
|
|
2655
2664
|
if (!(IdbusiType == 38)) {
|
|
2656
|
-
_context16.next =
|
|
2665
|
+
_context16.next = 14;
|
|
2657
2666
|
break;
|
|
2658
2667
|
}
|
|
2659
2668
|
|
|
2669
|
+
//预售下单时,启用了序列号管理和批号/有效期管理的商品,不支持快递和同城配送
|
|
2670
|
+
isEnableSerialNumber = (0, _tplusPoslogin.PosInitData)("IsEnableSerialNumber");
|
|
2671
|
+
resultObj = _this2.context.viewModel.data.RetailDetails.find(function (o) {
|
|
2672
|
+
return o.Inventory.IsSerialNumber && (o.Inventory.IsBatch || o.Inventory.IsQualityPeriod);
|
|
2673
|
+
});
|
|
2674
|
+
|
|
2675
|
+
if (!(isEnableSerialNumber && resultObj && (DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE'))) {
|
|
2676
|
+
_context16.next = 9;
|
|
2677
|
+
break;
|
|
2678
|
+
}
|
|
2679
|
+
|
|
2680
|
+
return _context16.abrupt('return', _message2.default.error('启用了序列号管理和批号/有效期管理的商品,不支持快递和同城配送'));
|
|
2681
|
+
|
|
2682
|
+
case 9:
|
|
2683
|
+
|
|
2660
2684
|
if (DistributionMode.Id == 'ON_SITE_PICKUP' && !CustomerPhone && _this2.context.viewModel.data.Member.Mobilephone) {
|
|
2661
2685
|
_this2.props.syncMemberInfoProcessor();
|
|
2662
2686
|
}
|
|
2663
2687
|
|
|
2664
2688
|
if (!(!CustomerPhone && !_this2.context.viewModel.data.Member.Mobilephone || DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE')) {
|
|
2665
|
-
_context16.next =
|
|
2689
|
+
_context16.next = 14;
|
|
2666
2690
|
break;
|
|
2667
2691
|
}
|
|
2668
2692
|
|
|
2669
2693
|
title = (DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE') && Address ? '收货地址确认' : '收货人';
|
|
2670
|
-
_context16.next =
|
|
2694
|
+
_context16.next = 14;
|
|
2671
2695
|
return _this2.props.openBuyerModal(title);
|
|
2672
2696
|
|
|
2673
|
-
case
|
|
2697
|
+
case 14:
|
|
2674
2698
|
|
|
2675
2699
|
_this2.setState({
|
|
2676
2700
|
bquick: bquick,
|
|
@@ -2680,13 +2704,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2680
2704
|
_this2$store8 = _this2.store, paymode = _this2$store8.paymode, brefund = _this2$store8.brefund, boriginReturn = _this2$store8.boriginReturn, newStyle = _this2$store8.newStyle;
|
|
2681
2705
|
|
|
2682
2706
|
if (!(bquick && !_mutantsMicrofx.stores.offlineSys.shouldSettlement(type))) {
|
|
2683
|
-
_context16.next =
|
|
2707
|
+
_context16.next = 19;
|
|
2684
2708
|
break;
|
|
2685
2709
|
}
|
|
2686
2710
|
|
|
2687
2711
|
return _context16.abrupt('return', false);
|
|
2688
2712
|
|
|
2689
|
-
case
|
|
2713
|
+
case 19:
|
|
2690
2714
|
status = false;
|
|
2691
2715
|
|
|
2692
2716
|
paymode.thePaymodes.forEach(function (v) {
|
|
@@ -2699,13 +2723,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2699
2723
|
});
|
|
2700
2724
|
|
|
2701
2725
|
if (!_this2.btndebounced) {
|
|
2702
|
-
_context16.next =
|
|
2726
|
+
_context16.next = 24;
|
|
2703
2727
|
break;
|
|
2704
2728
|
}
|
|
2705
2729
|
|
|
2706
2730
|
return _context16.abrupt('return');
|
|
2707
2731
|
|
|
2708
|
-
case
|
|
2732
|
+
case 24:
|
|
2709
2733
|
_this2.btndebounced = (0, _debounce3.default)(function () {
|
|
2710
2734
|
if (bquick) {
|
|
2711
2735
|
_this2.quickSettle(type);
|
|
@@ -2722,7 +2746,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2722
2746
|
_this2.btndebounced = null;
|
|
2723
2747
|
}, 2000);
|
|
2724
2748
|
|
|
2725
|
-
case
|
|
2749
|
+
case 27:
|
|
2726
2750
|
case 'end':
|
|
2727
2751
|
return _context16.stop();
|
|
2728
2752
|
}
|
|
@@ -3953,7 +3977,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3953
3977
|
{ key: 'settle', className: (0, _classnames4.default)({ "settle": true, "settle2": type == 1, "settleStorage": true, 'primary-btn': true }), onClick: function onClick() {
|
|
3954
3978
|
_this8.btnDebounced();
|
|
3955
3979
|
}, disabled: productsIsEmpty },
|
|
3956
|
-
this.props.isMemberPoints ? '立即兑换' : this.props.isMemberPointsReturn ? '退货' : settle.name
|
|
3980
|
+
this.props.isMemberPoints ? '立即兑换' : this.props.isMemberPointsReturn ? '退货' : IdbusiType == 39 && _mutantsMicrofx.stores.drawerStore.thisWaitPaidAmount == 0 ? '取货' : settle.name
|
|
3957
3981
|
)
|
|
3958
3982
|
),
|
|
3959
3983
|
!newStyle && _react2.default.createElement(
|