kts-component-invoice-operate 3.2.28 → 3.2.30
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.
- package/dist/Invoice/InvoiceController/InvoiceControllerState/AutoComplete/index.d.ts +1 -1
- package/dist/Invoice/ui/default/GoodsList/hook/useColumns/ui/ItemCodeInput/index.d.ts +1 -1
- package/dist/index.esm.js +236 -143
- package/dist/index.js +236 -143
- package/package.json +1 -1
- package/src/Invoice/InvoiceController/InvoiceControllerState/AutoComplete/index.ts +1 -1
- package/src/Invoice/ui/default/GoodsList/hook/useColumns/index.tsx +5 -4
- package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/ItemCodeInput/index.tsx +16 -5
- package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/ItemNameInput/index.tsx +6 -3
package/dist/index.js
CHANGED
|
@@ -10509,57 +10509,89 @@ function ItemNameInput(props) {
|
|
|
10509
10509
|
return _ref.apply(this, arguments);
|
|
10510
10510
|
};
|
|
10511
10511
|
}(), [autoComplete.onItemNameSearch]);
|
|
10512
|
-
var onChangeAutoComplete = React__default['default'].useCallback(function (
|
|
10513
|
-
|
|
10514
|
-
|
|
10515
|
-
|
|
10516
|
-
|
|
10517
|
-
|
|
10518
|
-
|
|
10519
|
-
|
|
10520
|
-
|
|
10521
|
-
|
|
10522
|
-
|
|
10523
|
-
|
|
10524
|
-
|
|
10525
|
-
|
|
10526
|
-
|
|
10527
|
-
|
|
10528
|
-
|
|
10529
|
-
|
|
10530
|
-
|
|
10531
|
-
|
|
10532
|
-
|
|
10533
|
-
|
|
10534
|
-
|
|
10535
|
-
|
|
10536
|
-
|
|
10537
|
-
|
|
10538
|
-
|
|
10539
|
-
|
|
10540
|
-
|
|
10541
|
-
|
|
10542
|
-
|
|
10543
|
-
|
|
10544
|
-
|
|
10545
|
-
|
|
10546
|
-
|
|
10547
|
-
|
|
10548
|
-
|
|
10549
|
-
|
|
10550
|
-
|
|
10551
|
-
|
|
10552
|
-
|
|
10553
|
-
|
|
10554
|
-
|
|
10555
|
-
|
|
10556
|
-
|
|
10557
|
-
|
|
10558
|
-
|
|
10559
|
-
|
|
10560
|
-
|
|
10561
|
-
|
|
10562
|
-
|
|
10512
|
+
var onChangeAutoComplete = React__default['default'].useCallback( /*#__PURE__*/function () {
|
|
10513
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(itemName) {
|
|
10514
|
+
var record;
|
|
10515
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
10516
|
+
while (1) {
|
|
10517
|
+
switch (_context2.prev = _context2.next) {
|
|
10518
|
+
case 0:
|
|
10519
|
+
// const good = options.filter(e=>e.itemName === itemName)[0];
|
|
10520
|
+
// good && controller.state.goodsListState.form?.setFieldsValue(removeNullUndefined(good));
|
|
10521
|
+
record = options.filter(function (e) {
|
|
10522
|
+
return e.itemName === itemName;
|
|
10523
|
+
})[0];
|
|
10524
|
+
|
|
10525
|
+
if (record) {
|
|
10526
|
+
_context2.next = 3;
|
|
10527
|
+
break;
|
|
10528
|
+
}
|
|
10529
|
+
|
|
10530
|
+
return _context2.abrupt("return");
|
|
10531
|
+
|
|
10532
|
+
case 3:
|
|
10533
|
+
_context2.next = 5;
|
|
10534
|
+
return controller.setEditGood({
|
|
10535
|
+
itemName: record.itemName
|
|
10536
|
+
});
|
|
10537
|
+
|
|
10538
|
+
case 5:
|
|
10539
|
+
controller.importGoodsDrawer(record); // controller.run(async s => {
|
|
10540
|
+
// Object.keys(record).filter(e => !record[e] && record[e] !== 0).forEach(e => { delete record[e] });
|
|
10541
|
+
// // 没用 被编辑的货物 和 form 就退出
|
|
10542
|
+
// if (!s.goodsListState.editGood || !s.goodsListState.form) return;
|
|
10543
|
+
// // 导入时清空之前输入的值,使用导入的单价和税率(参考税局系统)
|
|
10544
|
+
// record.quantity = undefined;
|
|
10545
|
+
// record.lineAmountExcludeTax = undefined;
|
|
10546
|
+
// record.lineAmountIncludeTax = undefined;
|
|
10547
|
+
// // 中间数据
|
|
10548
|
+
// const between = { ...record };
|
|
10549
|
+
// between.itemName = record.itemName;
|
|
10550
|
+
// between.itemNameOther = record.itemName;
|
|
10551
|
+
// // 设置编辑货物
|
|
10552
|
+
// const editGood: IGood = s.goodsListState.editGood = { ...s.goodsListState.editGood, ...between };
|
|
10553
|
+
// if (editGood.taxRate) {
|
|
10554
|
+
// editGood.taxRate = dutyFree(controller, editGood.taxRate, s.goodsListState.form, editGood)
|
|
10555
|
+
// }
|
|
10556
|
+
// if (`${editGood.priceIncludeTax}` === '0') {
|
|
10557
|
+
// editGood.priceIncludeTax = undefined;
|
|
10558
|
+
// editGood.priceExcludeTax = undefined;
|
|
10559
|
+
// } else {
|
|
10560
|
+
// editGood.priceExcludeTax = getPriceExcludeTax(editGood, record, s.calculatingDigits) as number;
|
|
10561
|
+
// }
|
|
10562
|
+
// if (editGood.quantity && editGood.priceIncludeTax) {
|
|
10563
|
+
// editGood.lineAmountIncludeTax = countAmountIncludeTax(editGood.quantity, editGood.priceIncludeTax, s.calculatingDigits);
|
|
10564
|
+
// }
|
|
10565
|
+
// // 导入FORM里
|
|
10566
|
+
// if (s.goodsListState.isMyShow) {
|
|
10567
|
+
// s.goodsListState.form.setFieldsValue({
|
|
10568
|
+
// ...editGood,
|
|
10569
|
+
// itemName: editGood.itemNameSelf,
|
|
10570
|
+
// itemModelName: editGood.itemModelNameSelf,
|
|
10571
|
+
// });
|
|
10572
|
+
// } else {
|
|
10573
|
+
// s.goodsListState.form.setFieldsValue({
|
|
10574
|
+
// ...editGood,
|
|
10575
|
+
// });
|
|
10576
|
+
// }
|
|
10577
|
+
// s.goodsListState.importGoods.isVisibleDrawer = false;
|
|
10578
|
+
// s.goodsListState.isTaxIncluded
|
|
10579
|
+
// ? await updateUnitPriceExcludingTax(controller, s.goodsListState.form, record)
|
|
10580
|
+
// : await updateUnitPriceTax(controller, s.goodsListState.form, record)
|
|
10581
|
+
// })
|
|
10582
|
+
|
|
10583
|
+
case 6:
|
|
10584
|
+
case "end":
|
|
10585
|
+
return _context2.stop();
|
|
10586
|
+
}
|
|
10587
|
+
}
|
|
10588
|
+
}, _callee2);
|
|
10589
|
+
}));
|
|
10590
|
+
|
|
10591
|
+
return function (_x2) {
|
|
10592
|
+
return _ref2.apply(this, arguments);
|
|
10593
|
+
};
|
|
10594
|
+
}(), [options, controller]);
|
|
10563
10595
|
return React__default['default'].createElement("div", {
|
|
10564
10596
|
className: 'kts-invoice-operate-goods-list-itemName-input'
|
|
10565
10597
|
}, props.shorthand && React__default['default'].createElement("span", {
|
|
@@ -10569,6 +10601,7 @@ function ItemNameInput(props) {
|
|
|
10569
10601
|
}
|
|
10570
10602
|
}, "*", props.shorthand, "*"), React__default['default'].createElement(ktsXui.AutoComplete, {
|
|
10571
10603
|
onSearch: onSearch,
|
|
10604
|
+
defaultValue: props.value,
|
|
10572
10605
|
options: options.map(function (e) {
|
|
10573
10606
|
return {
|
|
10574
10607
|
value: e.itemName
|
|
@@ -10621,6 +10654,8 @@ function ItemCodeInput(props) {
|
|
|
10621
10654
|
}, []);
|
|
10622
10655
|
var onSearch = React__default['default'].useCallback( /*#__PURE__*/function () {
|
|
10623
10656
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(searchText) {
|
|
10657
|
+
var _props$record;
|
|
10658
|
+
|
|
10624
10659
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10625
10660
|
while (1) {
|
|
10626
10661
|
switch (_context.prev = _context.next) {
|
|
@@ -10634,7 +10669,7 @@ function ItemCodeInput(props) {
|
|
|
10634
10669
|
|
|
10635
10670
|
_context.t0 = setOptions;
|
|
10636
10671
|
_context.next = 5;
|
|
10637
|
-
return autoComplete.onItemCodeSearch(searchText);
|
|
10672
|
+
return autoComplete.onItemCodeSearch(searchText, (_props$record = props.record) === null || _props$record === void 0 ? void 0 : _props$record.itemName);
|
|
10638
10673
|
|
|
10639
10674
|
case 5:
|
|
10640
10675
|
_context.t1 = _context.sent;
|
|
@@ -10662,21 +10697,55 @@ function ItemCodeInput(props) {
|
|
|
10662
10697
|
return _ref.apply(this, arguments);
|
|
10663
10698
|
};
|
|
10664
10699
|
}(), [autoComplete.onItemCodeSearch]);
|
|
10665
|
-
var onChangeAutoComplete = React__default['default'].useCallback(function (
|
|
10666
|
-
var
|
|
10667
|
-
|
|
10668
|
-
|
|
10669
|
-
|
|
10670
|
-
|
|
10700
|
+
var onChangeAutoComplete = React__default['default'].useCallback( /*#__PURE__*/function () {
|
|
10701
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(itemName) {
|
|
10702
|
+
var record, option;
|
|
10703
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
10704
|
+
while (1) {
|
|
10705
|
+
switch (_context2.prev = _context2.next) {
|
|
10706
|
+
case 0:
|
|
10707
|
+
record = options.filter(function (e) {
|
|
10708
|
+
return e.itemCode === itemName;
|
|
10709
|
+
})[0];
|
|
10710
|
+
|
|
10711
|
+
if (record) {
|
|
10712
|
+
_context2.next = 3;
|
|
10713
|
+
break;
|
|
10714
|
+
}
|
|
10715
|
+
|
|
10716
|
+
return _context2.abrupt("return");
|
|
10717
|
+
|
|
10718
|
+
case 3:
|
|
10719
|
+
option = {
|
|
10720
|
+
itemCode: record.itemCode,
|
|
10721
|
+
itemName: record.itemName,
|
|
10722
|
+
taxCategoryCode: record.taxCategoryCode,
|
|
10723
|
+
shorthand: record.shorthand,
|
|
10724
|
+
specification: record.specification,
|
|
10725
|
+
unit: record.unit,
|
|
10726
|
+
lineAmountIncludeTax: record.lineAmountIncludeTax,
|
|
10727
|
+
taxRate: record.taxRate
|
|
10728
|
+
};
|
|
10729
|
+
_context2.next = 6;
|
|
10730
|
+
return controller.setEditGood(option);
|
|
10731
|
+
|
|
10732
|
+
case 6:
|
|
10733
|
+
case "end":
|
|
10734
|
+
return _context2.stop();
|
|
10735
|
+
}
|
|
10736
|
+
}
|
|
10737
|
+
}, _callee2);
|
|
10738
|
+
}));
|
|
10739
|
+
|
|
10740
|
+
return function (_x2) {
|
|
10741
|
+
return _ref2.apply(this, arguments);
|
|
10742
|
+
};
|
|
10743
|
+
}(), [options, controller]);
|
|
10671
10744
|
return React__default['default'].createElement("div", {
|
|
10672
10745
|
className: 'kts-invoice-operate-goods-list-itemCode-input'
|
|
10673
|
-
},
|
|
10674
|
-
style: {
|
|
10675
|
-
alignSelf: 'center',
|
|
10676
|
-
fontSize: 12
|
|
10677
|
-
}
|
|
10678
|
-
}, "*", props.shorthand, "*"), React__default['default'].createElement(ktsXui.AutoComplete, {
|
|
10746
|
+
}, React__default['default'].createElement(ktsXui.AutoComplete, {
|
|
10679
10747
|
onSearch: onSearch,
|
|
10748
|
+
defaultValue: props.value,
|
|
10680
10749
|
options: options.map(function (e) {
|
|
10681
10750
|
return {
|
|
10682
10751
|
value: e.itemCode
|
|
@@ -10855,10 +10924,34 @@ var useColumns = (function (form) {
|
|
|
10855
10924
|
return React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator('itemCode', {
|
|
10856
10925
|
initialValue: editGood.itemCode
|
|
10857
10926
|
})(React__default['default'].createElement(ItemCodeInput, {
|
|
10858
|
-
|
|
10859
|
-
onChange: function
|
|
10860
|
-
|
|
10861
|
-
|
|
10927
|
+
record: record,
|
|
10928
|
+
onChange: function () {
|
|
10929
|
+
var _onChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
10930
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
10931
|
+
while (1) {
|
|
10932
|
+
switch (_context2.prev = _context2.next) {
|
|
10933
|
+
case 0:
|
|
10934
|
+
_context2.next = 2;
|
|
10935
|
+
return onChangeItemCode(controller, form, record);
|
|
10936
|
+
|
|
10937
|
+
case 2:
|
|
10938
|
+
_context2.next = 4;
|
|
10939
|
+
return onChangeLineAmountIncludeTax(controller, form, record);
|
|
10940
|
+
|
|
10941
|
+
case 4:
|
|
10942
|
+
case "end":
|
|
10943
|
+
return _context2.stop();
|
|
10944
|
+
}
|
|
10945
|
+
}
|
|
10946
|
+
}, _callee2);
|
|
10947
|
+
}));
|
|
10948
|
+
|
|
10949
|
+
function onChange() {
|
|
10950
|
+
return _onChange.apply(this, arguments);
|
|
10951
|
+
}
|
|
10952
|
+
|
|
10953
|
+
return onChange;
|
|
10954
|
+
}()
|
|
10862
10955
|
})));
|
|
10863
10956
|
} else {
|
|
10864
10957
|
return record.itemCode;
|
|
@@ -10876,39 +10969,39 @@ var useColumns = (function (form) {
|
|
|
10876
10969
|
display: 'flex'
|
|
10877
10970
|
}
|
|
10878
10971
|
}, getFieldDecorator('itemName', {
|
|
10879
|
-
initialValue:
|
|
10972
|
+
initialValue: record.itemName,
|
|
10880
10973
|
rules: [].concat(_toConsumableArray(getReplenishRules('itemName')), [{
|
|
10881
10974
|
validator: function () {
|
|
10882
|
-
var _validator = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
10975
|
+
var _validator = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(_, __, callback) {
|
|
10883
10976
|
var value;
|
|
10884
|
-
return _regeneratorRuntime().wrap(function
|
|
10977
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
10885
10978
|
while (1) {
|
|
10886
|
-
switch (
|
|
10979
|
+
switch (_context3.prev = _context3.next) {
|
|
10887
10980
|
case 0:
|
|
10888
|
-
|
|
10981
|
+
_context3.next = 2;
|
|
10889
10982
|
return controller.wait();
|
|
10890
10983
|
|
|
10891
10984
|
case 2:
|
|
10892
10985
|
value = controller.state.goodsListState.editGood;
|
|
10893
10986
|
|
|
10894
10987
|
if (!(!(value === null || value === void 0 ? void 0 : value.itemName) && !(value === null || value === void 0 ? void 0 : value.itemNameSelf))) {
|
|
10895
|
-
|
|
10988
|
+
_context3.next = 7;
|
|
10896
10989
|
break;
|
|
10897
10990
|
}
|
|
10898
10991
|
|
|
10899
10992
|
callback('项目名称不能为空');
|
|
10900
|
-
|
|
10993
|
+
_context3.next = 8;
|
|
10901
10994
|
break;
|
|
10902
10995
|
|
|
10903
10996
|
case 7:
|
|
10904
|
-
return
|
|
10997
|
+
return _context3.abrupt("return");
|
|
10905
10998
|
|
|
10906
10999
|
case 8:
|
|
10907
11000
|
case "end":
|
|
10908
|
-
return
|
|
11001
|
+
return _context3.stop();
|
|
10909
11002
|
}
|
|
10910
11003
|
}
|
|
10911
|
-
},
|
|
11004
|
+
}, _callee3);
|
|
10912
11005
|
}));
|
|
10913
11006
|
|
|
10914
11007
|
function validator(_x2, _x3, _x4) {
|
|
@@ -10929,19 +11022,19 @@ var useColumns = (function (form) {
|
|
|
10929
11022
|
title: "\u70B9\u51FB\u4ECE\u5546\u54C1\u7BA1\u7406\u4E2D\u6DFB\u52A0\u5546\u54C1\u4FE1\u606F"
|
|
10930
11023
|
}, React__default['default'].createElement(ktsComponentsAntdX3.Button, {
|
|
10931
11024
|
onClick: controller.pipeline( /*#__PURE__*/function () {
|
|
10932
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
10933
|
-
return _regeneratorRuntime().wrap(function
|
|
11025
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(s) {
|
|
11026
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
10934
11027
|
while (1) {
|
|
10935
|
-
switch (
|
|
11028
|
+
switch (_context4.prev = _context4.next) {
|
|
10936
11029
|
case 0:
|
|
10937
11030
|
s.goodsListState.importGoods.isVisibleDrawer = true;
|
|
10938
11031
|
|
|
10939
11032
|
case 1:
|
|
10940
11033
|
case "end":
|
|
10941
|
-
return
|
|
11034
|
+
return _context4.stop();
|
|
10942
11035
|
}
|
|
10943
11036
|
}
|
|
10944
|
-
},
|
|
11037
|
+
}, _callee4);
|
|
10945
11038
|
}));
|
|
10946
11039
|
|
|
10947
11040
|
return function (_x5) {
|
|
@@ -10978,13 +11071,13 @@ var useColumns = (function (form) {
|
|
|
10978
11071
|
rules: getReplenishRules('itemModelName')
|
|
10979
11072
|
})(React__default['default'].createElement(MyInput, {
|
|
10980
11073
|
onChange: function () {
|
|
10981
|
-
var
|
|
11074
|
+
var _onChange2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
10982
11075
|
var key, value;
|
|
10983
|
-
return _regeneratorRuntime().wrap(function
|
|
11076
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
10984
11077
|
while (1) {
|
|
10985
|
-
switch (
|
|
11078
|
+
switch (_context5.prev = _context5.next) {
|
|
10986
11079
|
case 0:
|
|
10987
|
-
|
|
11080
|
+
_context5.next = 2;
|
|
10988
11081
|
return controller.wait();
|
|
10989
11082
|
|
|
10990
11083
|
case 2:
|
|
@@ -10995,14 +11088,14 @@ var useColumns = (function (form) {
|
|
|
10995
11088
|
|
|
10996
11089
|
case 6:
|
|
10997
11090
|
case "end":
|
|
10998
|
-
return
|
|
11091
|
+
return _context5.stop();
|
|
10999
11092
|
}
|
|
11000
11093
|
}
|
|
11001
|
-
},
|
|
11094
|
+
}, _callee5);
|
|
11002
11095
|
}));
|
|
11003
11096
|
|
|
11004
11097
|
function onChange() {
|
|
11005
|
-
return
|
|
11098
|
+
return _onChange2.apply(this, arguments);
|
|
11006
11099
|
}
|
|
11007
11100
|
|
|
11008
11101
|
return onChange;
|
|
@@ -11033,12 +11126,12 @@ var useColumns = (function (form) {
|
|
|
11033
11126
|
},
|
|
11034
11127
|
dataSource: unitList,
|
|
11035
11128
|
onChange: function () {
|
|
11036
|
-
var
|
|
11037
|
-
return _regeneratorRuntime().wrap(function
|
|
11129
|
+
var _onChange3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
11130
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
11038
11131
|
while (1) {
|
|
11039
|
-
switch (
|
|
11132
|
+
switch (_context6.prev = _context6.next) {
|
|
11040
11133
|
case 0:
|
|
11041
|
-
|
|
11134
|
+
_context6.next = 2;
|
|
11042
11135
|
return controller.wait();
|
|
11043
11136
|
|
|
11044
11137
|
case 2:
|
|
@@ -11051,14 +11144,14 @@ var useColumns = (function (form) {
|
|
|
11051
11144
|
|
|
11052
11145
|
case 3:
|
|
11053
11146
|
case "end":
|
|
11054
|
-
return
|
|
11147
|
+
return _context6.stop();
|
|
11055
11148
|
}
|
|
11056
11149
|
}
|
|
11057
|
-
},
|
|
11150
|
+
}, _callee6);
|
|
11058
11151
|
}));
|
|
11059
11152
|
|
|
11060
11153
|
function onChange() {
|
|
11061
|
-
return
|
|
11154
|
+
return _onChange3.apply(this, arguments);
|
|
11062
11155
|
}
|
|
11063
11156
|
|
|
11064
11157
|
return onChange;
|
|
@@ -11090,13 +11183,13 @@ var useColumns = (function (form) {
|
|
|
11090
11183
|
message: '数量必须为数字'
|
|
11091
11184
|
}, {
|
|
11092
11185
|
validator: function () {
|
|
11093
|
-
var _validator2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
11186
|
+
var _validator2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(_, value, callback) {
|
|
11094
11187
|
var isvalue, isPrice;
|
|
11095
|
-
return _regeneratorRuntime().wrap(function
|
|
11188
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
11096
11189
|
while (1) {
|
|
11097
|
-
switch (
|
|
11190
|
+
switch (_context7.prev = _context7.next) {
|
|
11098
11191
|
case 0:
|
|
11099
|
-
|
|
11192
|
+
_context7.next = 2;
|
|
11100
11193
|
return controller.wait();
|
|
11101
11194
|
|
|
11102
11195
|
case 2:
|
|
@@ -11104,21 +11197,21 @@ var useColumns = (function (form) {
|
|
|
11104
11197
|
isPrice = !!getFieldValue(isTaxIncluded ? 'priceIncludeTax' : 'priceExcludeTax') || getFieldValue(isTaxIncluded ? 'priceIncludeTax' : 'priceExcludeTax') === 0;
|
|
11105
11198
|
|
|
11106
11199
|
if (!(isvalue || isPrice === isvalue)) {
|
|
11107
|
-
|
|
11200
|
+
_context7.next = 6;
|
|
11108
11201
|
break;
|
|
11109
11202
|
}
|
|
11110
11203
|
|
|
11111
|
-
return
|
|
11204
|
+
return _context7.abrupt("return");
|
|
11112
11205
|
|
|
11113
11206
|
case 6:
|
|
11114
11207
|
callback('请输入数量');
|
|
11115
11208
|
|
|
11116
11209
|
case 7:
|
|
11117
11210
|
case "end":
|
|
11118
|
-
return
|
|
11211
|
+
return _context7.stop();
|
|
11119
11212
|
}
|
|
11120
11213
|
}
|
|
11121
|
-
},
|
|
11214
|
+
}, _callee7);
|
|
11122
11215
|
}));
|
|
11123
11216
|
|
|
11124
11217
|
function validator(_x6, _x7, _x8) {
|
|
@@ -11135,25 +11228,25 @@ var useColumns = (function (form) {
|
|
|
11135
11228
|
maxLength: 16,
|
|
11136
11229
|
loading: isCipher(changeField, "quantity"),
|
|
11137
11230
|
onChange: function () {
|
|
11138
|
-
var
|
|
11139
|
-
return _regeneratorRuntime().wrap(function
|
|
11231
|
+
var _onChange4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
|
|
11232
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
11140
11233
|
while (1) {
|
|
11141
|
-
switch (
|
|
11234
|
+
switch (_context8.prev = _context8.next) {
|
|
11142
11235
|
case 0:
|
|
11143
11236
|
setChangeField('quantity');
|
|
11144
|
-
|
|
11237
|
+
_context8.next = 3;
|
|
11145
11238
|
return onChangeQuantity(controller, form, record);
|
|
11146
11239
|
|
|
11147
11240
|
case 3:
|
|
11148
11241
|
case "end":
|
|
11149
|
-
return
|
|
11242
|
+
return _context8.stop();
|
|
11150
11243
|
}
|
|
11151
11244
|
}
|
|
11152
|
-
},
|
|
11245
|
+
}, _callee8);
|
|
11153
11246
|
}));
|
|
11154
11247
|
|
|
11155
11248
|
function onChange() {
|
|
11156
|
-
return
|
|
11249
|
+
return _onChange4.apply(this, arguments);
|
|
11157
11250
|
}
|
|
11158
11251
|
|
|
11159
11252
|
return onChange;
|
|
@@ -11185,13 +11278,13 @@ var useColumns = (function (form) {
|
|
|
11185
11278
|
message: '单价必须为数字'
|
|
11186
11279
|
}, {
|
|
11187
11280
|
validator: function () {
|
|
11188
|
-
var _validator3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
11281
|
+
var _validator3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(_, value, callback) {
|
|
11189
11282
|
var isQuantity, isvalue;
|
|
11190
|
-
return _regeneratorRuntime().wrap(function
|
|
11283
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
11191
11284
|
while (1) {
|
|
11192
|
-
switch (
|
|
11285
|
+
switch (_context9.prev = _context9.next) {
|
|
11193
11286
|
case 0:
|
|
11194
|
-
|
|
11287
|
+
_context9.next = 2;
|
|
11195
11288
|
return controller.wait();
|
|
11196
11289
|
|
|
11197
11290
|
case 2:
|
|
@@ -11199,21 +11292,21 @@ var useColumns = (function (form) {
|
|
|
11199
11292
|
isvalue = !!value || value === 0;
|
|
11200
11293
|
|
|
11201
11294
|
if (!(isvalue || isQuantity === isvalue)) {
|
|
11202
|
-
|
|
11295
|
+
_context9.next = 6;
|
|
11203
11296
|
break;
|
|
11204
11297
|
}
|
|
11205
11298
|
|
|
11206
|
-
return
|
|
11299
|
+
return _context9.abrupt("return");
|
|
11207
11300
|
|
|
11208
11301
|
case 6:
|
|
11209
11302
|
callback('请输入单价');
|
|
11210
11303
|
|
|
11211
11304
|
case 7:
|
|
11212
11305
|
case "end":
|
|
11213
|
-
return
|
|
11306
|
+
return _context9.stop();
|
|
11214
11307
|
}
|
|
11215
11308
|
}
|
|
11216
|
-
},
|
|
11309
|
+
}, _callee9);
|
|
11217
11310
|
}));
|
|
11218
11311
|
|
|
11219
11312
|
function validator(_x9, _x10, _x11) {
|
|
@@ -11260,13 +11353,13 @@ var useColumns = (function (form) {
|
|
|
11260
11353
|
message: '单价必须为数字'
|
|
11261
11354
|
}, {
|
|
11262
11355
|
validator: function () {
|
|
11263
|
-
var _validator4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
11356
|
+
var _validator4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(_, value, callback) {
|
|
11264
11357
|
var isQuantity, isvalue;
|
|
11265
|
-
return _regeneratorRuntime().wrap(function
|
|
11358
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
11266
11359
|
while (1) {
|
|
11267
|
-
switch (
|
|
11360
|
+
switch (_context10.prev = _context10.next) {
|
|
11268
11361
|
case 0:
|
|
11269
|
-
|
|
11362
|
+
_context10.next = 2;
|
|
11270
11363
|
return controller.wait();
|
|
11271
11364
|
|
|
11272
11365
|
case 2:
|
|
@@ -11274,21 +11367,21 @@ var useColumns = (function (form) {
|
|
|
11274
11367
|
isvalue = !!value || value === 0;
|
|
11275
11368
|
|
|
11276
11369
|
if (!(isvalue || isQuantity === isvalue)) {
|
|
11277
|
-
|
|
11370
|
+
_context10.next = 6;
|
|
11278
11371
|
break;
|
|
11279
11372
|
}
|
|
11280
11373
|
|
|
11281
|
-
return
|
|
11374
|
+
return _context10.abrupt("return");
|
|
11282
11375
|
|
|
11283
11376
|
case 6:
|
|
11284
11377
|
callback('请输入单价');
|
|
11285
11378
|
|
|
11286
11379
|
case 7:
|
|
11287
11380
|
case "end":
|
|
11288
|
-
return
|
|
11381
|
+
return _context10.stop();
|
|
11289
11382
|
}
|
|
11290
11383
|
}
|
|
11291
|
-
},
|
|
11384
|
+
}, _callee10);
|
|
11292
11385
|
}));
|
|
11293
11386
|
|
|
11294
11387
|
function validator(_x12, _x13, _x14) {
|
|
@@ -11338,10 +11431,10 @@ var useColumns = (function (form) {
|
|
|
11338
11431
|
message: '金额必须为数字'
|
|
11339
11432
|
}, {
|
|
11340
11433
|
validator: function () {
|
|
11341
|
-
var _validator5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
11342
|
-
return _regeneratorRuntime().wrap(function
|
|
11434
|
+
var _validator5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(_, value, callback) {
|
|
11435
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
11343
11436
|
while (1) {
|
|
11344
|
-
switch (
|
|
11437
|
+
switch (_context11.prev = _context11.next) {
|
|
11345
11438
|
case 0:
|
|
11346
11439
|
if ("".concat(value).split('.')[0].length > priceIntegerDigit) {
|
|
11347
11440
|
callback("\u91D1\u989D\u6574\u6570\u90E8\u5206\u4E0D\u80FD\u5927\u4E8E".concat(priceIntegerDigit, "\u4F4D\uFF0C\u5C0F\u6570\u70B9\u540E\u6700\u591A2\u4F4D"));
|
|
@@ -11349,10 +11442,10 @@ var useColumns = (function (form) {
|
|
|
11349
11442
|
|
|
11350
11443
|
case 1:
|
|
11351
11444
|
case "end":
|
|
11352
|
-
return
|
|
11445
|
+
return _context11.stop();
|
|
11353
11446
|
}
|
|
11354
11447
|
}
|
|
11355
|
-
},
|
|
11448
|
+
}, _callee11);
|
|
11356
11449
|
}));
|
|
11357
11450
|
|
|
11358
11451
|
function validator(_x15, _x16, _x17) {
|
|
@@ -11363,10 +11456,10 @@ var useColumns = (function (form) {
|
|
|
11363
11456
|
}()
|
|
11364
11457
|
}, {
|
|
11365
11458
|
validator: function () {
|
|
11366
|
-
var _validator6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
11367
|
-
return _regeneratorRuntime().wrap(function
|
|
11459
|
+
var _validator6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(_, value, callback) {
|
|
11460
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
11368
11461
|
while (1) {
|
|
11369
|
-
switch (
|
|
11462
|
+
switch (_context12.prev = _context12.next) {
|
|
11370
11463
|
case 0:
|
|
11371
11464
|
if (deduction && parseFloat(value) <= deduction) {
|
|
11372
11465
|
callback('扣除额不能大于等于价税合计');
|
|
@@ -11374,10 +11467,10 @@ var useColumns = (function (form) {
|
|
|
11374
11467
|
|
|
11375
11468
|
case 1:
|
|
11376
11469
|
case "end":
|
|
11377
|
-
return
|
|
11470
|
+
return _context12.stop();
|
|
11378
11471
|
}
|
|
11379
11472
|
}
|
|
11380
|
-
},
|
|
11473
|
+
}, _callee12);
|
|
11381
11474
|
}));
|
|
11382
11475
|
|
|
11383
11476
|
function validator(_x18, _x19, _x20) {
|
|
@@ -11426,10 +11519,10 @@ var useColumns = (function (form) {
|
|
|
11426
11519
|
message: '金额必须为数字'
|
|
11427
11520
|
}, {
|
|
11428
11521
|
validator: function () {
|
|
11429
|
-
var _validator7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
11430
|
-
return _regeneratorRuntime().wrap(function
|
|
11522
|
+
var _validator7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(_, value, callback) {
|
|
11523
|
+
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
|
11431
11524
|
while (1) {
|
|
11432
|
-
switch (
|
|
11525
|
+
switch (_context13.prev = _context13.next) {
|
|
11433
11526
|
case 0:
|
|
11434
11527
|
if ("".concat(value).split('.')[0].length > priceIntegerDigit) {
|
|
11435
11528
|
callback("\u91D1\u989D\u6574\u6570\u90E8\u5206\u4E0D\u80FD\u5927\u4E8E".concat(priceIntegerDigit, "\u4F4D\uFF0C\u5C0F\u6570\u70B9\u540E\u6700\u591A2\u4F4D"));
|
|
@@ -11437,10 +11530,10 @@ var useColumns = (function (form) {
|
|
|
11437
11530
|
|
|
11438
11531
|
case 1:
|
|
11439
11532
|
case "end":
|
|
11440
|
-
return
|
|
11533
|
+
return _context13.stop();
|
|
11441
11534
|
}
|
|
11442
11535
|
}
|
|
11443
|
-
},
|
|
11536
|
+
}, _callee13);
|
|
11444
11537
|
}));
|
|
11445
11538
|
|
|
11446
11539
|
function validator(_x21, _x22, _x23) {
|