kts-component-invoice-operate 1.2.22 → 2.0.0
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/d.dio +2 -69
- package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/{EndowCode.d.ts → EndowCode/index.d.ts} +2 -2
- package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/{IGood.d.ts → IGood/index.d.ts} +15 -5
- package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/{ImportGoods.d.ts → ImportGoods/index.d.ts} +0 -0
- package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/{LineAttributeType.d.ts → LineAttributeType/index.d.ts} +0 -0
- package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/ProductComparison/index.d.ts +7 -0
- package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/index.d.ts +7 -0
- package/dist/Invoice/_test/buyerNameSearch/index.d.ts +1 -0
- package/dist/Invoice/_test/deduction/index.d.ts +1 -0
- package/dist/Invoice/_test/draft/index.d.ts +1 -0
- package/dist/Invoice/_test/easiest/index.d.ts +1 -0
- package/dist/Invoice/_test/endowCode/index.d.ts +1 -0
- package/dist/Invoice/_test/goodsMenuExpand/index.d.ts +1 -0
- package/dist/Invoice/_test/importBuyer/index.d.ts +1 -0
- package/dist/Invoice/_test/importGoods/index.d.ts +1 -0
- package/dist/Invoice/_test/invoiceType/index.d.ts +1 -0
- package/dist/Invoice/_test/isInvoiceNo/index.d.ts +1 -0
- package/dist/Invoice/_test/replaceHead/index.d.ts +1 -0
- package/dist/Invoice/_test/retrieveData/index.d.ts +1 -0
- package/dist/Invoice/_test/seller/index.d.ts +1 -0
- package/dist/Invoice/_test/setDataSource/index.d.ts +1 -0
- package/dist/Invoice/_test/unit/index.d.ts +1 -0
- package/dist/Invoice/index.d.ts +1 -1
- package/dist/Invoice/tools/itemName/index.d.ts +14 -0
- package/dist/Invoice/ui/AddComparisonDrawer/index.d.ts +3 -0
- package/dist/Invoice/ui/Buyer/ui/BuyerNameInput/index.d.ts +1 -0
- package/dist/Invoice/ui/Buyer/ui/ImportBuyerButton/index.d.ts +1 -0
- package/dist/Invoice/ui/EndowCodeDrawer/index.d.ts +1 -0
- package/dist/Invoice/ui/GoodsList/hook/useColumns/autoFillFn/index.d.ts +2 -0
- package/dist/Invoice/ui/GoodsList/hook/useColumns/ui/RowEditButton/index.d.ts +1 -0
- package/dist/Invoice/ui/GoodsList/hook/useColumns/ui/RowMenu/hook/useAddComparison/index.d.ts +5 -0
- package/dist/Invoice/ui/GoodsList/hook/useColumns/ui/RowMenu/hook/useAddDiscount/index.d.ts +1 -0
- package/dist/Invoice/ui/GoodsList/hook/useColumns/ui/RowMenu/hook/useDelItem/index.d.ts +1 -0
- package/dist/Invoice/ui/GoodsList/hook/useColumns/ui/RowMenu/hook/useEndowCode/index.d.ts +1 -0
- package/dist/Invoice/ui/GoodsList/hook/useColumns/ui/RowMenu/index.d.ts +1 -0
- package/dist/Invoice/ui/GoodsList/hook/useColumns/ui/RowSaveButton/index.d.ts +1 -0
- package/dist/Invoice/ui/GoodsList/hook/useRowSelection/index.d.ts +1 -0
- package/dist/Invoice/ui/GoodsList/ui/AddRowButton/index.d.ts +1 -0
- package/dist/Invoice/ui/GoodsList/ui/CommodityComparisonButton/index.d.ts +3 -0
- package/dist/Invoice/ui/GoodsList/ui/DelRowButton/index.d.ts +1 -0
- package/dist/Invoice/ui/GoodsList/ui/DescribeSwitch/index.d.ts +3 -0
- package/dist/Invoice/ui/GoodsList/ui/EndowCodeButton/index.d.ts +1 -0
- package/dist/Invoice/ui/GoodsList/ui/Statistics/index.d.ts +1 -0
- package/dist/Invoice/ui/GoodsList/ui/TableRow/index.d.ts +1 -0
- package/dist/Invoice/ui/GoodsList/ui/TableVirtual/index.d.ts +1 -0
- package/dist/Invoice/ui/GoodsList/ui/TaxIncludedSwitch/index.d.ts +1 -0
- package/dist/Invoice/ui/ImportBuyerDrawer/index.d.ts +1 -0
- package/dist/Invoice/ui/ImportGoodsDrawer/index.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +1044 -267
- package/dist/index.js +1043 -266
- package/docs/index.md +1 -1
- package/package.json +4 -1
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/{EndowCode.tsx → EndowCode/index.tsx} +3 -3
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/{IGood.ts → IGood/index.ts} +20 -5
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/{ImportGoods.ts → ImportGoods/index.ts} +0 -0
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/{LineAttributeType.ts → LineAttributeType/index.ts} +0 -0
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/ProductComparison/index.ts +10 -0
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/index.ts +11 -1
- package/src/Invoice/_test/importGoods/index.tsx +21 -3
- package/src/Invoice/index.tsx +5 -1
- package/src/Invoice/tools/itemName/index.ts +48 -0
- package/src/Invoice/ui/AddComparisonDrawer/index.tsx +179 -0
- package/src/Invoice/ui/EndowCodeDrawer/index.tsx +6 -17
- package/src/Invoice/ui/GoodsList/hook/useColumns/autoFillFn/index.ts +15 -0
- package/src/Invoice/ui/GoodsList/hook/useColumns/index.tsx +71 -29
- package/src/Invoice/ui/GoodsList/hook/useColumns/ui/RowMenu/hook/useAddComparison/index.tsx +39 -0
- package/src/Invoice/ui/GoodsList/hook/useColumns/ui/RowMenu/index.tsx +5 -2
- package/src/Invoice/ui/GoodsList/index.less +34 -37
- package/src/Invoice/ui/GoodsList/index.tsx +8 -0
- package/src/Invoice/ui/GoodsList/ui/CommodityComparisonButton/index.tsx +74 -0
- package/src/Invoice/ui/GoodsList/ui/DescribeSwitch/index.tsx +37 -0
- package/src/Invoice/ui/GoodsList/ui/TaxIncludedSwitch/index.tsx +2 -2
- package/src/Invoice/ui/ImportGoodsDrawer/index.tsx +70 -18
- package/src/index.ts +1 -0
- package/yarn.o.lock +14800 -0
package/dist/index.js
CHANGED
|
@@ -982,6 +982,13 @@ function draft(value) {
|
|
|
982
982
|
}
|
|
983
983
|
}
|
|
984
984
|
|
|
985
|
+
var ProductComparison = /*#__PURE__*/_createClass(function ProductComparison() {
|
|
986
|
+
_classCallCheck(this, ProductComparison);
|
|
987
|
+
|
|
988
|
+
this.onComply = void 0;
|
|
989
|
+
this.onUpdateComparisonTable = void 0;
|
|
990
|
+
});
|
|
991
|
+
|
|
985
992
|
var GoodsListState = /*#__PURE__*/_createClass(function GoodsListState() {
|
|
986
993
|
_classCallCheck(this, GoodsListState);
|
|
987
994
|
|
|
@@ -990,6 +997,7 @@ var GoodsListState = /*#__PURE__*/_createClass(function GoodsListState() {
|
|
|
990
997
|
this.isSwitchTax = void 0;
|
|
991
998
|
this.isAddDiscount = void 0;
|
|
992
999
|
this.isTaxIncluded = true;
|
|
1000
|
+
this.isMyShow = false;
|
|
993
1001
|
this.editGood = void 0;
|
|
994
1002
|
this.form = void 0;
|
|
995
1003
|
this.unitList = [];
|
|
@@ -1002,7 +1010,9 @@ var GoodsListState = /*#__PURE__*/_createClass(function GoodsListState() {
|
|
|
1002
1010
|
this.discountGoodIndex = [];
|
|
1003
1011
|
this.endowCode = new EndowCode();
|
|
1004
1012
|
this.importGoods = new ImportGoods();
|
|
1013
|
+
this.productComparison = new ProductComparison();
|
|
1005
1014
|
this.isVisibleDrawer = false;
|
|
1015
|
+
this.addComparisonIndex = void 0;
|
|
1006
1016
|
});
|
|
1007
1017
|
|
|
1008
1018
|
var BuyerState = /*#__PURE__*/_createClass(function BuyerState() {
|
|
@@ -1589,7 +1599,7 @@ var InvoiceHeader = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
|
|
|
1589
1599
|
/** 控制器 */
|
|
1590
1600
|
|
|
1591
1601
|
|
|
1592
|
-
var controller =
|
|
1602
|
+
var controller = Invoice.useInvoiceController();
|
|
1593
1603
|
var model = controller.useMemo(function (s) {
|
|
1594
1604
|
return s.model;
|
|
1595
1605
|
}, []);
|
|
@@ -1903,7 +1913,7 @@ styleInject(css_248z$3);
|
|
|
1903
1913
|
var nzhcn = require('nzh').cn;
|
|
1904
1914
|
|
|
1905
1915
|
var Statistics = (function () {
|
|
1906
|
-
var controller =
|
|
1916
|
+
var controller = Invoice.useInvoiceController();
|
|
1907
1917
|
/** 是否不含税) */
|
|
1908
1918
|
|
|
1909
1919
|
var isTaxIncluded = controller.useMemo(function (s) {
|
|
@@ -2011,7 +2021,7 @@ var Statistics = (function () {
|
|
|
2011
2021
|
});
|
|
2012
2022
|
|
|
2013
2023
|
var AddRowButton = (function () {
|
|
2014
|
-
var controller =
|
|
2024
|
+
var controller = Invoice.useInvoiceController();
|
|
2015
2025
|
var model = controller.useMemo(function (s) {
|
|
2016
2026
|
return s.model;
|
|
2017
2027
|
}, []);
|
|
@@ -2100,7 +2110,7 @@ var AddRowButton = (function () {
|
|
|
2100
2110
|
});
|
|
2101
2111
|
|
|
2102
2112
|
var TaxIncludedSwitch = (function () {
|
|
2103
|
-
var controller =
|
|
2113
|
+
var controller = Invoice.useInvoiceController();
|
|
2104
2114
|
/** 是否含税 */
|
|
2105
2115
|
|
|
2106
2116
|
var isTaxIncluded = controller.useMemo(function (e) {
|
|
@@ -2135,7 +2145,11 @@ var TaxIncludedSwitch = (function () {
|
|
|
2135
2145
|
};
|
|
2136
2146
|
}())();
|
|
2137
2147
|
}, []);
|
|
2138
|
-
return /*#__PURE__*/React__default['default'].createElement("span", null, /*#__PURE__*/React__default['default'].createElement("label",
|
|
2148
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, /*#__PURE__*/React__default['default'].createElement("label", {
|
|
2149
|
+
style: {
|
|
2150
|
+
marginRight: 2
|
|
2151
|
+
}
|
|
2152
|
+
}, "\u542B\u7A0E:"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Switch, {
|
|
2139
2153
|
disabled: isSwitchTax === false,
|
|
2140
2154
|
checked: isTaxIncluded,
|
|
2141
2155
|
checkedChildren: "\u5F00",
|
|
@@ -2145,8 +2159,59 @@ var TaxIncludedSwitch = (function () {
|
|
|
2145
2159
|
}));
|
|
2146
2160
|
});
|
|
2147
2161
|
|
|
2162
|
+
var DescribeSwitch = (function () {
|
|
2163
|
+
var controller = Invoice.useInvoiceController();
|
|
2164
|
+
var productComparison = controller.useMemo(function (s) {
|
|
2165
|
+
return s.goodsListState.productComparison;
|
|
2166
|
+
}, []);
|
|
2167
|
+
var isMyShow = controller.useMemo(function (s) {
|
|
2168
|
+
return s.goodsListState.isMyShow;
|
|
2169
|
+
}, []);
|
|
2170
|
+
var onChange = React__default['default'].useCallback(function (e) {
|
|
2171
|
+
controller.run( /*#__PURE__*/function () {
|
|
2172
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
|
|
2173
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
2174
|
+
while (1) {
|
|
2175
|
+
switch (_context.prev = _context.next) {
|
|
2176
|
+
case 0:
|
|
2177
|
+
return _context.abrupt("return", s.goodsListState.isMyShow = !s.goodsListState.isMyShow);
|
|
2178
|
+
|
|
2179
|
+
case 1:
|
|
2180
|
+
case "end":
|
|
2181
|
+
return _context.stop();
|
|
2182
|
+
}
|
|
2183
|
+
}
|
|
2184
|
+
}, _callee);
|
|
2185
|
+
}));
|
|
2186
|
+
|
|
2187
|
+
return function (_x) {
|
|
2188
|
+
return _ref.apply(this, arguments);
|
|
2189
|
+
};
|
|
2190
|
+
}());
|
|
2191
|
+
}, []);
|
|
2192
|
+
if (!productComparison.onComply) return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
|
|
2193
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, /*#__PURE__*/React__default['default'].createElement("label", {
|
|
2194
|
+
style: {
|
|
2195
|
+
marginRight: 2
|
|
2196
|
+
}
|
|
2197
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Tooltip, {
|
|
2198
|
+
title: "\u84DD\u8272\u4EE3\u8868\u6211\u65B9\u5546\u54C1\u63CF\u8FF0\uFF0C\u9ED1\u8272\u4EE3\u8868\u5BF9\u65B9\u7684\u5546\u54C1\u63CF\u8FF0\u3002"
|
|
2199
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Icon, {
|
|
2200
|
+
style: {
|
|
2201
|
+
marginRight: 3
|
|
2202
|
+
},
|
|
2203
|
+
type: "info-circle"
|
|
2204
|
+
})), "\u4F7F\u7528\u54EA\u65B9\u5546\u54C1\u63CF\u8FF0:"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Switch, {
|
|
2205
|
+
checked: isMyShow,
|
|
2206
|
+
checkedChildren: "\u6211\u65B9",
|
|
2207
|
+
unCheckedChildren: "\u5BF9\u65B9",
|
|
2208
|
+
defaultChecked: true,
|
|
2209
|
+
onChange: onChange
|
|
2210
|
+
}));
|
|
2211
|
+
});
|
|
2212
|
+
|
|
2148
2213
|
function TableRow(props) {
|
|
2149
|
-
var controller =
|
|
2214
|
+
var controller = Invoice.useInvoiceController();
|
|
2150
2215
|
var goodsMap = controller.useMemo(function (s) {
|
|
2151
2216
|
return s.goodsListState.goodsMap;
|
|
2152
2217
|
}, []);
|
|
@@ -2208,7 +2273,7 @@ var _create = mathjs.create(mathjs.all, {
|
|
|
2208
2273
|
|
|
2209
2274
|
var AddDiscountRowButton = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function (props) {
|
|
2210
2275
|
/** 控制器 */
|
|
2211
|
-
var controller =
|
|
2276
|
+
var controller = Invoice.useInvoiceController();
|
|
2212
2277
|
var model = controller.useMemo(function (s) {
|
|
2213
2278
|
return s.model;
|
|
2214
2279
|
}, []);
|
|
@@ -2370,7 +2435,7 @@ var AddDiscountRowButton = GreyReactBox.decorator(ktsComponentsAntdX3.Form.creat
|
|
|
2370
2435
|
var DrawerBody = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function (props) {
|
|
2371
2436
|
var form = props.form;
|
|
2372
2437
|
var getFieldDecorator = form.getFieldDecorator;
|
|
2373
|
-
var controller =
|
|
2438
|
+
var controller = Invoice.useInvoiceController();
|
|
2374
2439
|
/** 选中的货物索引列表 */
|
|
2375
2440
|
|
|
2376
2441
|
var discountGoodIndex = controller.useMemo(function (s) {
|
|
@@ -2590,7 +2655,7 @@ var coolingFn = (function () {
|
|
|
2590
2655
|
});
|
|
2591
2656
|
|
|
2592
2657
|
var EndowCodeButton = (function () {
|
|
2593
|
-
var controller =
|
|
2658
|
+
var controller = Invoice.useInvoiceController();
|
|
2594
2659
|
/** 是否禁用 */
|
|
2595
2660
|
|
|
2596
2661
|
var disabled = controller.useMemo(function (s) {
|
|
@@ -2675,7 +2740,7 @@ var EndowCodeButton = (function () {
|
|
|
2675
2740
|
});
|
|
2676
2741
|
|
|
2677
2742
|
var DelRowButton = (function () {
|
|
2678
|
-
var controller =
|
|
2743
|
+
var controller = Invoice.useInvoiceController();
|
|
2679
2744
|
var model = controller.useMemo(function (s) {
|
|
2680
2745
|
return s.model;
|
|
2681
2746
|
}, []);
|
|
@@ -2733,6 +2798,162 @@ var DelRowButton = (function () {
|
|
|
2733
2798
|
}, "\u5220\u9664\u884C");
|
|
2734
2799
|
});
|
|
2735
2800
|
|
|
2801
|
+
/** 拆分全称加简称 */
|
|
2802
|
+
var getSN = function getSN(value) {
|
|
2803
|
+
debugger;
|
|
2804
|
+
if (!value) return undefined;
|
|
2805
|
+
var arr = value.match(/\*[^*]+\*/);
|
|
2806
|
+
|
|
2807
|
+
if (arr && arr[0]) {
|
|
2808
|
+
return {
|
|
2809
|
+
shorthand: arr[0].split('*')[1],
|
|
2810
|
+
full: value.replace(arr[0], '')
|
|
2811
|
+
};
|
|
2812
|
+
} else {
|
|
2813
|
+
return {
|
|
2814
|
+
shorthand: undefined,
|
|
2815
|
+
full: value
|
|
2816
|
+
};
|
|
2817
|
+
}
|
|
2818
|
+
};
|
|
2819
|
+
/** 组合全称加简称 */
|
|
2820
|
+
|
|
2821
|
+
var getItemName = function getItemName(value) {
|
|
2822
|
+
if (value.shorthand) {
|
|
2823
|
+
return "*".concat(value.shorthand, "*").concat(value.full);
|
|
2824
|
+
} else {
|
|
2825
|
+
return value.full;
|
|
2826
|
+
}
|
|
2827
|
+
};
|
|
2828
|
+
/** 设置简称 */
|
|
2829
|
+
|
|
2830
|
+
var setShorthand = function setShorthand(name, shorthand) {
|
|
2831
|
+
if (!name) return undefined;
|
|
2832
|
+
var sn = getSN(name);
|
|
2833
|
+
if (!sn) return undefined;
|
|
2834
|
+
sn.shorthand = shorthand || '';
|
|
2835
|
+
return getItemName(sn);
|
|
2836
|
+
};
|
|
2837
|
+
|
|
2838
|
+
var CommodityComparisonButton = (function () {
|
|
2839
|
+
var controller = Invoice.useInvoiceController();
|
|
2840
|
+
|
|
2841
|
+
var _controller$useMemo = controller.useMemo(function (s) {
|
|
2842
|
+
return s.goodsListState.productComparison;
|
|
2843
|
+
}, []),
|
|
2844
|
+
onComply = _controller$useMemo.onComply;
|
|
2845
|
+
/** 是否禁用 */
|
|
2846
|
+
|
|
2847
|
+
|
|
2848
|
+
var disabled = controller.useMemo(function (s) {
|
|
2849
|
+
if (s.goodsListState.selectedGoodIndex.length <= 0) return true;
|
|
2850
|
+
}, []);
|
|
2851
|
+
/** 点击了 */
|
|
2852
|
+
|
|
2853
|
+
var onClick = React__default['default'].useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
2854
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
2855
|
+
while (1) {
|
|
2856
|
+
switch (_context2.prev = _context2.next) {
|
|
2857
|
+
case 0:
|
|
2858
|
+
_context2.next = 2;
|
|
2859
|
+
return controller.saveEditGood();
|
|
2860
|
+
|
|
2861
|
+
case 2:
|
|
2862
|
+
_context2.next = 4;
|
|
2863
|
+
return controller.wait();
|
|
2864
|
+
|
|
2865
|
+
case 4:
|
|
2866
|
+
_context2.next = 6;
|
|
2867
|
+
return controller.run( /*#__PURE__*/function () {
|
|
2868
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
|
|
2869
|
+
var _s$goodsListState, _s$goodsListState$pro;
|
|
2870
|
+
|
|
2871
|
+
var goods, newGoods;
|
|
2872
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
2873
|
+
while (1) {
|
|
2874
|
+
switch (_context.prev = _context.next) {
|
|
2875
|
+
case 0:
|
|
2876
|
+
if (!(s.goodsListState.editGood && s.goodsListState.selectedGoodIndex.indexOf(s.goodsListState.editGood.$index) >= 0)) {
|
|
2877
|
+
_context.next = 3;
|
|
2878
|
+
break;
|
|
2879
|
+
}
|
|
2880
|
+
|
|
2881
|
+
coolingFn('不能给正在编辑的货物执行商品对照', 3000, function () {
|
|
2882
|
+
ktsComponentsAntdX3.message.error('不能给正在编辑的货物执行商品对照');
|
|
2883
|
+
});
|
|
2884
|
+
return _context.abrupt("return");
|
|
2885
|
+
|
|
2886
|
+
case 3:
|
|
2887
|
+
if ((_s$goodsListState = s.goodsListState) === null || _s$goodsListState === void 0 ? void 0 : (_s$goodsListState$pro = _s$goodsListState.productComparison) === null || _s$goodsListState$pro === void 0 ? void 0 : _s$goodsListState$pro.onComply) {
|
|
2888
|
+
_context.next = 5;
|
|
2889
|
+
break;
|
|
2890
|
+
}
|
|
2891
|
+
|
|
2892
|
+
return _context.abrupt("return");
|
|
2893
|
+
|
|
2894
|
+
case 5:
|
|
2895
|
+
goods = s.goodsListState.selectedGoodIndex.map(function (e) {
|
|
2896
|
+
var _getSN, _getSN2;
|
|
2897
|
+
|
|
2898
|
+
var t = s.goodsListState.goodsMap.get(e);
|
|
2899
|
+
if (!t) return undefined;
|
|
2900
|
+
return _objectSpread2(_objectSpread2({}, t), {}, {
|
|
2901
|
+
itemName: (_getSN = getSN(t.itemName)) === null || _getSN === void 0 ? void 0 : _getSN.full,
|
|
2902
|
+
itemNameOther: (_getSN2 = getSN(t.itemNameOther)) === null || _getSN2 === void 0 ? void 0 : _getSN2.full
|
|
2903
|
+
});
|
|
2904
|
+
}).filter(function (e) {
|
|
2905
|
+
return !!e;
|
|
2906
|
+
}); // 比对后的商品
|
|
2907
|
+
|
|
2908
|
+
_context.next = 8;
|
|
2909
|
+
return s.goodsListState.productComparison.onComply(goods);
|
|
2910
|
+
|
|
2911
|
+
case 8:
|
|
2912
|
+
newGoods = _context.sent;
|
|
2913
|
+
newGoods.filter(function (e) {
|
|
2914
|
+
var _getSN3, _getSN4;
|
|
2915
|
+
|
|
2916
|
+
var vt = s.goodsListState.goodsMap.get(e.$index);
|
|
2917
|
+
if (!vt) return undefined;
|
|
2918
|
+
vt.itemName = e.itemName ? setShorthand(e.itemName, (_getSN3 = getSN(vt.itemName)) === null || _getSN3 === void 0 ? void 0 : _getSN3.shorthand) : vt.itemName;
|
|
2919
|
+
vt.itemNameOther = e.itemNameOther ? setShorthand(e.itemNameOther, (_getSN4 = getSN(vt.itemNameOther)) === null || _getSN4 === void 0 ? void 0 : _getSN4.shorthand) : vt.itemNameOther;
|
|
2920
|
+
vt.unit = e.unit ? e.unit : vt.unit;
|
|
2921
|
+
vt.unitOther = e.unitOther ? e.unitOther : vt.unitOther;
|
|
2922
|
+
vt.itemModelName = e.itemModelName ? e.itemModelName : vt.itemModelName;
|
|
2923
|
+
vt.itemModelNameOther = e.itemModelNameOther ? e.itemModelNameOther : vt.itemModelNameOther;
|
|
2924
|
+
vt.itemCode = e.itemCode ? e.itemCode : vt.itemCode;
|
|
2925
|
+
vt.itemCodeOther = e.itemCodeOther ? e.itemCodeOther : vt.itemCodeOther;
|
|
2926
|
+
});
|
|
2927
|
+
|
|
2928
|
+
case 10:
|
|
2929
|
+
case "end":
|
|
2930
|
+
return _context.stop();
|
|
2931
|
+
}
|
|
2932
|
+
}
|
|
2933
|
+
}, _callee);
|
|
2934
|
+
}));
|
|
2935
|
+
|
|
2936
|
+
return function (_x) {
|
|
2937
|
+
return _ref2.apply(this, arguments);
|
|
2938
|
+
};
|
|
2939
|
+
}());
|
|
2940
|
+
|
|
2941
|
+
case 6:
|
|
2942
|
+
case "end":
|
|
2943
|
+
return _context2.stop();
|
|
2944
|
+
}
|
|
2945
|
+
}
|
|
2946
|
+
}, _callee2);
|
|
2947
|
+
})), []); // 没用 执行商品对照 的方法 不显示按钮
|
|
2948
|
+
|
|
2949
|
+
if (!onComply) return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
|
|
2950
|
+
return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Button, {
|
|
2951
|
+
icon: 'swap',
|
|
2952
|
+
disabled: disabled,
|
|
2953
|
+
onClick: onClick
|
|
2954
|
+
}, "\u6267\u884C\u5546\u54C1\u5BF9\u7167");
|
|
2955
|
+
});
|
|
2956
|
+
|
|
2736
2957
|
var _defs$1, _path$1;
|
|
2737
2958
|
|
|
2738
2959
|
function _extends$1() { _extends$1 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
|
|
@@ -2749,7 +2970,7 @@ function SvgSpot(props) {
|
|
|
2749
2970
|
|
|
2750
2971
|
var Text$1 = ktsComponentsAntdX3.Typography.Text;
|
|
2751
2972
|
var useDelItem = (function (goods) {
|
|
2752
|
-
var controller =
|
|
2973
|
+
var controller = Invoice.useInvoiceController();
|
|
2753
2974
|
var onClick = React__default['default'].useCallback(function () {
|
|
2754
2975
|
controller.delGood(goods.$index);
|
|
2755
2976
|
}, [controller, goods.$index]);
|
|
@@ -2771,7 +2992,7 @@ var useDelItem = (function (goods) {
|
|
|
2771
2992
|
|
|
2772
2993
|
var Text$2 = ktsComponentsAntdX3.Typography.Text;
|
|
2773
2994
|
var useAddDiscount = (function (goods) {
|
|
2774
|
-
var controller =
|
|
2995
|
+
var controller = Invoice.useInvoiceController();
|
|
2775
2996
|
/** 点击了 添加折扣行 按钮 */
|
|
2776
2997
|
|
|
2777
2998
|
var onClick = React__default['default'].useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
@@ -9369,44 +9590,6 @@ var updateUnitPriceTax = function updateUnitPriceTax(controller, form, record) {
|
|
|
9369
9590
|
};
|
|
9370
9591
|
}());
|
|
9371
9592
|
};
|
|
9372
|
-
/** 保存到编辑货物 */
|
|
9373
|
-
|
|
9374
|
-
var onSaveEditGood = lazyFn$1(function (controller, form, record, id) {
|
|
9375
|
-
form.validateFields( /*#__PURE__*/function () {
|
|
9376
|
-
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(err, values) {
|
|
9377
|
-
var v;
|
|
9378
|
-
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
9379
|
-
while (1) {
|
|
9380
|
-
switch (_context9.prev = _context9.next) {
|
|
9381
|
-
case 0:
|
|
9382
|
-
err = err || {};
|
|
9383
|
-
|
|
9384
|
-
if (!err[id]) {
|
|
9385
|
-
_context9.next = 3;
|
|
9386
|
-
break;
|
|
9387
|
-
}
|
|
9388
|
-
|
|
9389
|
-
return _context9.abrupt("return");
|
|
9390
|
-
|
|
9391
|
-
case 3:
|
|
9392
|
-
v = {};
|
|
9393
|
-
v[id] = values[id];
|
|
9394
|
-
_context9.next = 7;
|
|
9395
|
-
return controller.setEditGood(_objectSpread2({}, v));
|
|
9396
|
-
|
|
9397
|
-
case 7:
|
|
9398
|
-
case "end":
|
|
9399
|
-
return _context9.stop();
|
|
9400
|
-
}
|
|
9401
|
-
}
|
|
9402
|
-
}, _callee9);
|
|
9403
|
-
}));
|
|
9404
|
-
|
|
9405
|
-
return function (_x17, _x18) {
|
|
9406
|
-
return _ref9.apply(this, arguments);
|
|
9407
|
-
};
|
|
9408
|
-
}());
|
|
9409
|
-
}, 1000);
|
|
9410
9593
|
/** 单调赋码 */
|
|
9411
9594
|
|
|
9412
9595
|
var endowCode = /*#__PURE__*/function () {
|
|
@@ -9502,10 +9685,101 @@ var endowCode = /*#__PURE__*/function () {
|
|
|
9502
9685
|
return _ref10.apply(this, arguments);
|
|
9503
9686
|
};
|
|
9504
9687
|
}();
|
|
9688
|
+
/** 修改了 货物名称 */
|
|
9689
|
+
|
|
9690
|
+
var onChangeItemName = /*#__PURE__*/function () {
|
|
9691
|
+
var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(controller, form, record) {
|
|
9692
|
+
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
|
9693
|
+
while (1) {
|
|
9694
|
+
switch (_context13.prev = _context13.next) {
|
|
9695
|
+
case 0:
|
|
9696
|
+
controller.run( /*#__PURE__*/function () {
|
|
9697
|
+
var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(s) {
|
|
9698
|
+
var _getSN$shorthand, _getSN;
|
|
9699
|
+
|
|
9700
|
+
var value, shorthand;
|
|
9701
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
9702
|
+
while (1) {
|
|
9703
|
+
switch (_context12.prev = _context12.next) {
|
|
9704
|
+
case 0:
|
|
9705
|
+
value = form.getFieldsValue().itemName;
|
|
9706
|
+
shorthand = (_getSN$shorthand = (_getSN = getSN(value)) === null || _getSN === void 0 ? void 0 : _getSN.shorthand) !== null && _getSN$shorthand !== void 0 ? _getSN$shorthand : '';
|
|
9707
|
+
|
|
9708
|
+
if (!s.goodsListState.isMyShow) {
|
|
9709
|
+
_context12.next = 11;
|
|
9710
|
+
break;
|
|
9711
|
+
}
|
|
9712
|
+
|
|
9713
|
+
_context12.next = 5;
|
|
9714
|
+
return controller.setEditGood({
|
|
9715
|
+
itemName: value
|
|
9716
|
+
});
|
|
9717
|
+
|
|
9718
|
+
case 5:
|
|
9719
|
+
_context12.t0 = record.itemNameOther;
|
|
9720
|
+
|
|
9721
|
+
if (!_context12.t0) {
|
|
9722
|
+
_context12.next = 9;
|
|
9723
|
+
break;
|
|
9724
|
+
}
|
|
9725
|
+
|
|
9726
|
+
_context12.next = 9;
|
|
9727
|
+
return controller.setEditGood({
|
|
9728
|
+
itemNameOther: setShorthand(record.itemNameOther, shorthand)
|
|
9729
|
+
});
|
|
9730
|
+
|
|
9731
|
+
case 9:
|
|
9732
|
+
_context12.next = 17;
|
|
9733
|
+
break;
|
|
9734
|
+
|
|
9735
|
+
case 11:
|
|
9736
|
+
_context12.next = 13;
|
|
9737
|
+
return controller.setEditGood({
|
|
9738
|
+
itemNameOther: value
|
|
9739
|
+
});
|
|
9740
|
+
|
|
9741
|
+
case 13:
|
|
9742
|
+
_context12.t1 = record.itemName;
|
|
9743
|
+
|
|
9744
|
+
if (!_context12.t1) {
|
|
9745
|
+
_context12.next = 17;
|
|
9746
|
+
break;
|
|
9747
|
+
}
|
|
9748
|
+
|
|
9749
|
+
_context12.next = 17;
|
|
9750
|
+
return controller.setEditGood({
|
|
9751
|
+
itemName: setShorthand(record.itemName, shorthand)
|
|
9752
|
+
});
|
|
9753
|
+
|
|
9754
|
+
case 17:
|
|
9755
|
+
case "end":
|
|
9756
|
+
return _context12.stop();
|
|
9757
|
+
}
|
|
9758
|
+
}
|
|
9759
|
+
}, _callee12);
|
|
9760
|
+
}));
|
|
9761
|
+
|
|
9762
|
+
return function (_x25) {
|
|
9763
|
+
return _ref13.apply(this, arguments);
|
|
9764
|
+
};
|
|
9765
|
+
}());
|
|
9766
|
+
|
|
9767
|
+
case 1:
|
|
9768
|
+
case "end":
|
|
9769
|
+
return _context13.stop();
|
|
9770
|
+
}
|
|
9771
|
+
}
|
|
9772
|
+
}, _callee13);
|
|
9773
|
+
}));
|
|
9774
|
+
|
|
9775
|
+
return function onChangeItemName(_x22, _x23, _x24) {
|
|
9776
|
+
return _ref12.apply(this, arguments);
|
|
9777
|
+
};
|
|
9778
|
+
}();
|
|
9505
9779
|
|
|
9506
9780
|
var Text$3 = ktsComponentsAntdX3.Typography.Text;
|
|
9507
9781
|
var useEndowCode = (function (goods) {
|
|
9508
|
-
var controller =
|
|
9782
|
+
var controller = Invoice.useInvoiceController();
|
|
9509
9783
|
var onClick = React__default['default'].useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
9510
9784
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
9511
9785
|
while (1) {
|
|
@@ -9530,45 +9804,139 @@ var useEndowCode = (function (goods) {
|
|
|
9530
9804
|
}, [goods.lineAttribute, onClick]);
|
|
9531
9805
|
});
|
|
9532
9806
|
|
|
9533
|
-
var
|
|
9534
|
-
|
|
9535
|
-
|
|
9536
|
-
var
|
|
9537
|
-
|
|
9538
|
-
var model = controller.useMemo(function (s) {
|
|
9539
|
-
return s.model;
|
|
9540
|
-
}, []);
|
|
9541
|
-
/** 是否能添加折扣行 */
|
|
9542
|
-
|
|
9543
|
-
var isAddDiscount = controller.useMemo(function (s) {
|
|
9544
|
-
return s.goodsListState.isAddDiscount;
|
|
9545
|
-
}, []);
|
|
9546
|
-
var goodsMenuExpand = controller.useMemo(function (s) {
|
|
9547
|
-
return s.goodsListState.goodsMenuExpand;
|
|
9807
|
+
var Text$4 = ktsComponentsAntdX3.Typography.Text;
|
|
9808
|
+
var useAddComparison = (function (goods) {
|
|
9809
|
+
var controller = Invoice.useInvoiceController();
|
|
9810
|
+
var productComparison = controller.useMemo(function (s) {
|
|
9811
|
+
return s.goodsListState.productComparison;
|
|
9548
9812
|
}, []);
|
|
9549
|
-
var
|
|
9550
|
-
|
|
9551
|
-
|
|
9552
|
-
|
|
9553
|
-
|
|
9554
|
-
|
|
9813
|
+
var onClick = React__default['default'].useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
9814
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
9815
|
+
while (1) {
|
|
9816
|
+
switch (_context2.prev = _context2.next) {
|
|
9817
|
+
case 0:
|
|
9818
|
+
_context2.next = 2;
|
|
9819
|
+
return controller.saveEditGood();
|
|
9555
9820
|
|
|
9556
|
-
|
|
9821
|
+
case 2:
|
|
9822
|
+
_context2.next = 4;
|
|
9823
|
+
return controller.wait();
|
|
9557
9824
|
|
|
9558
|
-
|
|
9825
|
+
case 4:
|
|
9826
|
+
_context2.next = 6;
|
|
9827
|
+
return controller.run( /*#__PURE__*/function () {
|
|
9828
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
|
|
9829
|
+
var err, key;
|
|
9830
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
9831
|
+
while (1) {
|
|
9832
|
+
switch (_context.prev = _context.next) {
|
|
9833
|
+
case 0:
|
|
9834
|
+
if (!s.goodsListState.form) {
|
|
9835
|
+
_context.next = 11;
|
|
9836
|
+
break;
|
|
9837
|
+
}
|
|
9559
9838
|
|
|
9560
|
-
|
|
9561
|
-
|
|
9562
|
-
key: "divider-1"
|
|
9563
|
-
}));
|
|
9839
|
+
err = s.goodsListState.form.getFieldsError();
|
|
9840
|
+
_context.t0 = _regeneratorRuntime().keys(err);
|
|
9564
9841
|
|
|
9565
|
-
|
|
9566
|
-
|
|
9567
|
-
|
|
9568
|
-
|
|
9842
|
+
case 3:
|
|
9843
|
+
if ((_context.t1 = _context.t0()).done) {
|
|
9844
|
+
_context.next = 11;
|
|
9845
|
+
break;
|
|
9846
|
+
}
|
|
9569
9847
|
|
|
9570
|
-
|
|
9571
|
-
|
|
9848
|
+
key = _context.t1.value;
|
|
9849
|
+
|
|
9850
|
+
if (err[key]) {
|
|
9851
|
+
_context.next = 7;
|
|
9852
|
+
break;
|
|
9853
|
+
}
|
|
9854
|
+
|
|
9855
|
+
return _context.abrupt("continue", 3);
|
|
9856
|
+
|
|
9857
|
+
case 7:
|
|
9858
|
+
ktsComponentsAntdX3.message.error(err[key][0]);
|
|
9859
|
+
return _context.abrupt("return");
|
|
9860
|
+
|
|
9861
|
+
case 11:
|
|
9862
|
+
s.goodsListState.addComparisonIndex = goods.$index;
|
|
9863
|
+
|
|
9864
|
+
case 12:
|
|
9865
|
+
case "end":
|
|
9866
|
+
return _context.stop();
|
|
9867
|
+
}
|
|
9868
|
+
}
|
|
9869
|
+
}, _callee);
|
|
9870
|
+
}));
|
|
9871
|
+
|
|
9872
|
+
return function (_x) {
|
|
9873
|
+
return _ref2.apply(this, arguments);
|
|
9874
|
+
};
|
|
9875
|
+
}());
|
|
9876
|
+
|
|
9877
|
+
case 6:
|
|
9878
|
+
case "end":
|
|
9879
|
+
return _context2.stop();
|
|
9880
|
+
}
|
|
9881
|
+
}
|
|
9882
|
+
}, _callee2);
|
|
9883
|
+
})), [controller, goods.$index]);
|
|
9884
|
+
return React__default['default'].useMemo(function () {
|
|
9885
|
+
if (productComparison.onComply) {
|
|
9886
|
+
return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Menu.Item, {
|
|
9887
|
+
key: "delItem",
|
|
9888
|
+
onClick: onClick
|
|
9889
|
+
}, /*#__PURE__*/React__default['default'].createElement(Text$4, {
|
|
9890
|
+
strong: true
|
|
9891
|
+
}, "\u6DFB\u52A0\u5546\u54C1\u5BF9\u7167"));
|
|
9892
|
+
} else {
|
|
9893
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
|
|
9894
|
+
}
|
|
9895
|
+
}, [onClick, productComparison]);
|
|
9896
|
+
});
|
|
9897
|
+
|
|
9898
|
+
var css_248z$5 = ".ktsAnt3x-btn.kts-invoice-operate-goods-list-columns-row-menu:focus,\n.ktsAnt3x-btn.kts-invoice-operate-goods-list-columns-row-menu:hover,\n.ktsAnt3x-btn.kts-invoice-operate-goods-list-columns-row-menu {\n font-size: 16px;\n color: #000;\n text-align: center;\n padding: 0;\n}\n.ktsAnt3x-btn.kts-invoice-operate-goods-list-columns-row-menu:hover,\n.ktsAnt3x-btn.kts-invoice-operate-goods-list-columns-row-menu.ktsAnt3x-dropdown-open {\n background: #ebebeb;\n border-radius: 9999px;\n}\n";
|
|
9899
|
+
styleInject(css_248z$5);
|
|
9900
|
+
|
|
9901
|
+
var RowMenu = (function (props) {
|
|
9902
|
+
var controller = Invoice.useInvoiceController();
|
|
9903
|
+
var model = controller.useMemo(function (s) {
|
|
9904
|
+
return s.model;
|
|
9905
|
+
}, []);
|
|
9906
|
+
/** 是否能添加折扣行 */
|
|
9907
|
+
|
|
9908
|
+
var isAddDiscount = controller.useMemo(function (s) {
|
|
9909
|
+
return s.goodsListState.isAddDiscount;
|
|
9910
|
+
}, []);
|
|
9911
|
+
var goodsMenuExpand = controller.useMemo(function (s) {
|
|
9912
|
+
return s.goodsListState.goodsMenuExpand;
|
|
9913
|
+
}, []);
|
|
9914
|
+
var delItem = useDelItem(props.goods);
|
|
9915
|
+
var addDiscount = useAddDiscount(props.goods);
|
|
9916
|
+
var endowCode = useEndowCode(props.goods);
|
|
9917
|
+
var addComparison = useAddComparison(props.goods);
|
|
9918
|
+
var itemList = React__default['default'].useMemo(function () {
|
|
9919
|
+
var arr = [];
|
|
9920
|
+
model !== 'prefab' && isAddDiscount !== false && addDiscount && arr.push(addDiscount); // 添加折扣行
|
|
9921
|
+
|
|
9922
|
+
arr.push(addComparison); // 添加商品对照
|
|
9923
|
+
|
|
9924
|
+
endowCode && arr.push(endowCode); // 赋码
|
|
9925
|
+
|
|
9926
|
+
model !== 'prefab' && delItem && arr.push(delItem); // 删除
|
|
9927
|
+
|
|
9928
|
+
if (!goodsMenuExpand || goodsMenuExpand.length === 0) return arr;
|
|
9929
|
+
arr.unshift( /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Menu.Divider, {
|
|
9930
|
+
key: "divider-1"
|
|
9931
|
+
}));
|
|
9932
|
+
|
|
9933
|
+
for (var i = goodsMenuExpand.length - 1; i >= 0; i--) {
|
|
9934
|
+
var fn = goodsMenuExpand[i];
|
|
9935
|
+
arr.unshift(fn(props.goods.$index, controller));
|
|
9936
|
+
}
|
|
9937
|
+
|
|
9938
|
+
return arr;
|
|
9939
|
+
}, [controller, endowCode, addDiscount, delItem, goodsMenuExpand, props.goods, model, isAddDiscount]);
|
|
9572
9940
|
|
|
9573
9941
|
if (itemList.length === 0) {
|
|
9574
9942
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
|
|
@@ -9585,16 +9953,21 @@ var RowMenu = (function (props) {
|
|
|
9585
9953
|
})));
|
|
9586
9954
|
});
|
|
9587
9955
|
|
|
9588
|
-
var Text$
|
|
9956
|
+
var Text$5 = ktsComponentsAntdX3.Typography.Text;
|
|
9589
9957
|
var useColumns = (function (form) {
|
|
9590
9958
|
var getFieldDecorator = form.getFieldDecorator,
|
|
9591
9959
|
getFieldValue = form.getFieldValue;
|
|
9592
|
-
var controller =
|
|
9960
|
+
var controller = Invoice.useInvoiceController();
|
|
9593
9961
|
/** 是否含税 */
|
|
9594
9962
|
|
|
9595
9963
|
var isTaxIncluded = controller.useMemo(function (e) {
|
|
9596
9964
|
return e.goodsListState.isTaxIncluded;
|
|
9597
9965
|
}, []);
|
|
9966
|
+
/** 是否显示我方 */
|
|
9967
|
+
|
|
9968
|
+
var isMyShow = controller.useMemo(function (e) {
|
|
9969
|
+
return e.goodsListState.isMyShow;
|
|
9970
|
+
}, []);
|
|
9598
9971
|
/** 正在编辑的货物 */
|
|
9599
9972
|
|
|
9600
9973
|
var editGood = controller.useMemo(function (e) {
|
|
@@ -9626,12 +9999,11 @@ var useColumns = (function (form) {
|
|
|
9626
9999
|
|
|
9627
10000
|
var columns = React__default['default'].useMemo(function () {
|
|
9628
10001
|
return [{
|
|
9629
|
-
title: /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(Text$
|
|
10002
|
+
title: /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(Text$5, {
|
|
9630
10003
|
type: "danger"
|
|
9631
10004
|
}, "*"), "\u8D27\u7269\u540D\u79F0"),
|
|
9632
|
-
dataIndex: 'itemName',
|
|
9633
10005
|
key: 'itemName',
|
|
9634
|
-
render: function render(
|
|
10006
|
+
render: function render(_, record) {
|
|
9635
10007
|
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
9636
10008
|
var _editGood$itemName;
|
|
9637
10009
|
|
|
@@ -9640,17 +10012,54 @@ var useColumns = (function (form) {
|
|
|
9640
10012
|
display: 'flex'
|
|
9641
10013
|
}
|
|
9642
10014
|
}, getFieldDecorator('itemName', {
|
|
9643
|
-
initialValue:
|
|
10015
|
+
initialValue: isMyShow ? record.itemName : record.itemNameOther,
|
|
9644
10016
|
rules: [{
|
|
9645
|
-
|
|
9646
|
-
|
|
10017
|
+
validator: function () {
|
|
10018
|
+
var _validator = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_, __, callback) {
|
|
10019
|
+
var value;
|
|
10020
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10021
|
+
while (1) {
|
|
10022
|
+
switch (_context.prev = _context.next) {
|
|
10023
|
+
case 0:
|
|
10024
|
+
_context.next = 2;
|
|
10025
|
+
return controller.wait();
|
|
10026
|
+
|
|
10027
|
+
case 2:
|
|
10028
|
+
value = controller.state.goodsListState.editGood;
|
|
10029
|
+
|
|
10030
|
+
if (!(!(value === null || value === void 0 ? void 0 : value.itemName) && !(value === null || value === void 0 ? void 0 : value.itemNameOther))) {
|
|
10031
|
+
_context.next = 7;
|
|
10032
|
+
break;
|
|
10033
|
+
}
|
|
10034
|
+
|
|
10035
|
+
callback('货物名称不能为空');
|
|
10036
|
+
_context.next = 8;
|
|
10037
|
+
break;
|
|
10038
|
+
|
|
10039
|
+
case 7:
|
|
10040
|
+
return _context.abrupt("return");
|
|
10041
|
+
|
|
10042
|
+
case 8:
|
|
10043
|
+
case "end":
|
|
10044
|
+
return _context.stop();
|
|
10045
|
+
}
|
|
10046
|
+
}
|
|
10047
|
+
}, _callee);
|
|
10048
|
+
}));
|
|
10049
|
+
|
|
10050
|
+
function validator(_x, _x2, _x3) {
|
|
10051
|
+
return _validator.apply(this, arguments);
|
|
10052
|
+
}
|
|
10053
|
+
|
|
10054
|
+
return validator;
|
|
10055
|
+
}()
|
|
9647
10056
|
}]
|
|
9648
10057
|
})( /*#__PURE__*/React__default['default'].createElement(MyInput, {
|
|
9649
10058
|
style: {
|
|
9650
10059
|
flex: 1
|
|
9651
10060
|
},
|
|
9652
10061
|
onChange: function onChange() {
|
|
9653
|
-
|
|
10062
|
+
onChangeItemName(controller, form, record);
|
|
9654
10063
|
}
|
|
9655
10064
|
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
9656
10065
|
className: "kts-invoice-operate-goods-list-able-list-itemName-import"
|
|
@@ -9661,67 +10070,90 @@ var useColumns = (function (form) {
|
|
|
9661
10070
|
type: "link",
|
|
9662
10071
|
icon: "file-add"
|
|
9663
10072
|
}), controller.getGoodsList && /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Button, {
|
|
9664
|
-
onClick: function
|
|
9665
|
-
|
|
9666
|
-
|
|
9667
|
-
|
|
9668
|
-
|
|
9669
|
-
|
|
9670
|
-
|
|
9671
|
-
s.goodsListState.importGoods.isVisibleDrawer = true;
|
|
10073
|
+
onClick: controller.pipeline( /*#__PURE__*/function () {
|
|
10074
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
|
|
10075
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
10076
|
+
while (1) {
|
|
10077
|
+
switch (_context2.prev = _context2.next) {
|
|
10078
|
+
case 0:
|
|
10079
|
+
s.goodsListState.importGoods.isVisibleDrawer = true;
|
|
9672
10080
|
|
|
9673
|
-
|
|
9674
|
-
|
|
9675
|
-
|
|
9676
|
-
}
|
|
10081
|
+
case 1:
|
|
10082
|
+
case "end":
|
|
10083
|
+
return _context2.stop();
|
|
9677
10084
|
}
|
|
9678
|
-
}
|
|
9679
|
-
})
|
|
10085
|
+
}
|
|
10086
|
+
}, _callee2);
|
|
10087
|
+
}));
|
|
9680
10088
|
|
|
9681
|
-
|
|
9682
|
-
|
|
9683
|
-
|
|
9684
|
-
|
|
9685
|
-
},
|
|
10089
|
+
return function (_x4) {
|
|
10090
|
+
return _ref.apply(this, arguments);
|
|
10091
|
+
};
|
|
10092
|
+
}()),
|
|
9686
10093
|
type: "link",
|
|
9687
10094
|
icon: "plus-circle"
|
|
9688
10095
|
}))));
|
|
9689
10096
|
} else {
|
|
9690
|
-
return /*#__PURE__*/React__default['default'].createElement(
|
|
9691
|
-
|
|
9692
|
-
|
|
9693
|
-
|
|
9694
|
-
}
|
|
10097
|
+
return /*#__PURE__*/React__default['default'].createElement(MyItemNameDiv, {
|
|
10098
|
+
valueT: record.itemName,
|
|
10099
|
+
valueF: record.itemNameOther,
|
|
10100
|
+
isMyShow: isMyShow
|
|
10101
|
+
});
|
|
9695
10102
|
}
|
|
9696
10103
|
}
|
|
9697
10104
|
}, {
|
|
9698
10105
|
title: '货物规格型号',
|
|
9699
|
-
dataIndex: 'itemModelName',
|
|
9700
10106
|
key: 'itemModelName',
|
|
9701
10107
|
width: 119,
|
|
9702
|
-
render: function render(
|
|
10108
|
+
render: function render(_, record) {
|
|
9703
10109
|
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
9704
10110
|
return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator('itemModelName', {
|
|
9705
|
-
initialValue: editGood.itemModelName
|
|
10111
|
+
initialValue: isMyShow ? editGood.itemModelName : editGood.itemModelNameOther
|
|
9706
10112
|
})( /*#__PURE__*/React__default['default'].createElement(MyInput, {
|
|
9707
|
-
onChange: function
|
|
9708
|
-
|
|
9709
|
-
|
|
10113
|
+
onChange: function () {
|
|
10114
|
+
var _onChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
10115
|
+
var key, value;
|
|
10116
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
10117
|
+
while (1) {
|
|
10118
|
+
switch (_context3.prev = _context3.next) {
|
|
10119
|
+
case 0:
|
|
10120
|
+
_context3.next = 2;
|
|
10121
|
+
return controller.wait();
|
|
10122
|
+
|
|
10123
|
+
case 2:
|
|
10124
|
+
key = isMyShow ? 'itemModelName' : 'itemModelNameOther';
|
|
10125
|
+
value = {};
|
|
10126
|
+
value[key] = form.getFieldsValue().itemModelName;
|
|
10127
|
+
controller.setEditGood(value);
|
|
10128
|
+
|
|
10129
|
+
case 6:
|
|
10130
|
+
case "end":
|
|
10131
|
+
return _context3.stop();
|
|
10132
|
+
}
|
|
10133
|
+
}
|
|
10134
|
+
}, _callee3);
|
|
10135
|
+
}));
|
|
10136
|
+
|
|
10137
|
+
function onChange() {
|
|
10138
|
+
return _onChange.apply(this, arguments);
|
|
10139
|
+
}
|
|
10140
|
+
|
|
10141
|
+
return onChange;
|
|
10142
|
+
}()
|
|
9710
10143
|
})));
|
|
9711
10144
|
} else {
|
|
9712
|
-
return /*#__PURE__*/React__default['default'].createElement(
|
|
9713
|
-
|
|
9714
|
-
|
|
9715
|
-
|
|
9716
|
-
}
|
|
10145
|
+
return /*#__PURE__*/React__default['default'].createElement(MyItemNameDiv, {
|
|
10146
|
+
valueT: record.itemModelName,
|
|
10147
|
+
valueF: record.itemModelNameOther,
|
|
10148
|
+
isMyShow: isMyShow
|
|
10149
|
+
});
|
|
9717
10150
|
}
|
|
9718
10151
|
}
|
|
9719
10152
|
}, {
|
|
9720
10153
|
title: '单位',
|
|
9721
|
-
dataIndex: 'unit',
|
|
9722
10154
|
key: 'unit',
|
|
9723
10155
|
width: 70,
|
|
9724
|
-
render: function render(
|
|
10156
|
+
render: function render(_, record) {
|
|
9725
10157
|
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
9726
10158
|
return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator('unit', {
|
|
9727
10159
|
initialValue: editGood.unit
|
|
@@ -9730,16 +10162,43 @@ var useColumns = (function (form) {
|
|
|
9730
10162
|
width: '100%'
|
|
9731
10163
|
},
|
|
9732
10164
|
dataSource: unitList,
|
|
9733
|
-
onChange: function
|
|
9734
|
-
|
|
9735
|
-
|
|
10165
|
+
onChange: function () {
|
|
10166
|
+
var _onChange2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
10167
|
+
var key, value;
|
|
10168
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
10169
|
+
while (1) {
|
|
10170
|
+
switch (_context4.prev = _context4.next) {
|
|
10171
|
+
case 0:
|
|
10172
|
+
_context4.next = 2;
|
|
10173
|
+
return controller.wait();
|
|
10174
|
+
|
|
10175
|
+
case 2:
|
|
10176
|
+
key = isMyShow ? 'unit' : 'unitOther';
|
|
10177
|
+
value = {};
|
|
10178
|
+
value[key] = form.getFieldsValue().unit;
|
|
10179
|
+
controller.setEditGood(value);
|
|
10180
|
+
|
|
10181
|
+
case 6:
|
|
10182
|
+
case "end":
|
|
10183
|
+
return _context4.stop();
|
|
10184
|
+
}
|
|
10185
|
+
}
|
|
10186
|
+
}, _callee4);
|
|
10187
|
+
}));
|
|
10188
|
+
|
|
10189
|
+
function onChange() {
|
|
10190
|
+
return _onChange2.apply(this, arguments);
|
|
10191
|
+
}
|
|
10192
|
+
|
|
10193
|
+
return onChange;
|
|
10194
|
+
}()
|
|
9736
10195
|
})));
|
|
9737
10196
|
} else {
|
|
9738
|
-
return /*#__PURE__*/React__default['default'].createElement(
|
|
9739
|
-
|
|
9740
|
-
|
|
9741
|
-
|
|
9742
|
-
}
|
|
10197
|
+
return /*#__PURE__*/React__default['default'].createElement(MyItemNameDiv, {
|
|
10198
|
+
valueT: record.unit,
|
|
10199
|
+
valueF: record.unitOther,
|
|
10200
|
+
isMyShow: isMyShow
|
|
10201
|
+
});
|
|
9743
10202
|
}
|
|
9744
10203
|
}
|
|
9745
10204
|
}, {
|
|
@@ -9757,13 +10216,13 @@ var useColumns = (function (form) {
|
|
|
9757
10216
|
message: '数量必须为数字'
|
|
9758
10217
|
}, {
|
|
9759
10218
|
validator: function () {
|
|
9760
|
-
var
|
|
10219
|
+
var _validator2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(_, value, callback) {
|
|
9761
10220
|
var isvalue, isPrice;
|
|
9762
|
-
return _regeneratorRuntime().wrap(function
|
|
10221
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
9763
10222
|
while (1) {
|
|
9764
|
-
switch (
|
|
10223
|
+
switch (_context5.prev = _context5.next) {
|
|
9765
10224
|
case 0:
|
|
9766
|
-
|
|
10225
|
+
_context5.next = 2;
|
|
9767
10226
|
return controller.wait();
|
|
9768
10227
|
|
|
9769
10228
|
case 2:
|
|
@@ -9771,25 +10230,25 @@ var useColumns = (function (form) {
|
|
|
9771
10230
|
isPrice = !!getFieldValue(isTaxIncluded ? 'priceIncludeTax' : 'priceExcludeTax') || getFieldValue(isTaxIncluded ? 'priceIncludeTax' : 'priceExcludeTax') === 0;
|
|
9772
10231
|
|
|
9773
10232
|
if (!(isvalue || isPrice === isvalue)) {
|
|
9774
|
-
|
|
10233
|
+
_context5.next = 6;
|
|
9775
10234
|
break;
|
|
9776
10235
|
}
|
|
9777
10236
|
|
|
9778
|
-
return
|
|
10237
|
+
return _context5.abrupt("return");
|
|
9779
10238
|
|
|
9780
10239
|
case 6:
|
|
9781
10240
|
callback('请输入数量');
|
|
9782
10241
|
|
|
9783
10242
|
case 7:
|
|
9784
10243
|
case "end":
|
|
9785
|
-
return
|
|
10244
|
+
return _context5.stop();
|
|
9786
10245
|
}
|
|
9787
10246
|
}
|
|
9788
|
-
},
|
|
10247
|
+
}, _callee5);
|
|
9789
10248
|
}));
|
|
9790
10249
|
|
|
9791
|
-
function validator(
|
|
9792
|
-
return
|
|
10250
|
+
function validator(_x5, _x6, _x7) {
|
|
10251
|
+
return _validator2.apply(this, arguments);
|
|
9793
10252
|
}
|
|
9794
10253
|
|
|
9795
10254
|
return validator;
|
|
@@ -9829,13 +10288,13 @@ var useColumns = (function (form) {
|
|
|
9829
10288
|
message: '单价必须为数字'
|
|
9830
10289
|
}, {
|
|
9831
10290
|
validator: function () {
|
|
9832
|
-
var
|
|
10291
|
+
var _validator3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(_, value, callback) {
|
|
9833
10292
|
var isQuantity, isvalue;
|
|
9834
|
-
return _regeneratorRuntime().wrap(function
|
|
10293
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
9835
10294
|
while (1) {
|
|
9836
|
-
switch (
|
|
10295
|
+
switch (_context6.prev = _context6.next) {
|
|
9837
10296
|
case 0:
|
|
9838
|
-
|
|
10297
|
+
_context6.next = 2;
|
|
9839
10298
|
return controller.wait();
|
|
9840
10299
|
|
|
9841
10300
|
case 2:
|
|
@@ -9843,25 +10302,25 @@ var useColumns = (function (form) {
|
|
|
9843
10302
|
isvalue = !!value || value === 0;
|
|
9844
10303
|
|
|
9845
10304
|
if (!(isvalue || isQuantity === isvalue)) {
|
|
9846
|
-
|
|
10305
|
+
_context6.next = 6;
|
|
9847
10306
|
break;
|
|
9848
10307
|
}
|
|
9849
10308
|
|
|
9850
|
-
return
|
|
10309
|
+
return _context6.abrupt("return");
|
|
9851
10310
|
|
|
9852
10311
|
case 6:
|
|
9853
10312
|
callback('请输入单价');
|
|
9854
10313
|
|
|
9855
10314
|
case 7:
|
|
9856
10315
|
case "end":
|
|
9857
|
-
return
|
|
10316
|
+
return _context6.stop();
|
|
9858
10317
|
}
|
|
9859
10318
|
}
|
|
9860
|
-
},
|
|
10319
|
+
}, _callee6);
|
|
9861
10320
|
}));
|
|
9862
10321
|
|
|
9863
|
-
function validator(
|
|
9864
|
-
return
|
|
10322
|
+
function validator(_x8, _x9, _x10) {
|
|
10323
|
+
return _validator3.apply(this, arguments);
|
|
9865
10324
|
}
|
|
9866
10325
|
|
|
9867
10326
|
return validator;
|
|
@@ -9901,13 +10360,13 @@ var useColumns = (function (form) {
|
|
|
9901
10360
|
message: '单价必须为数字'
|
|
9902
10361
|
}, {
|
|
9903
10362
|
validator: function () {
|
|
9904
|
-
var
|
|
10363
|
+
var _validator4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(_, value, callback) {
|
|
9905
10364
|
var isQuantity, isvalue;
|
|
9906
|
-
return _regeneratorRuntime().wrap(function
|
|
10365
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
9907
10366
|
while (1) {
|
|
9908
|
-
switch (
|
|
10367
|
+
switch (_context7.prev = _context7.next) {
|
|
9909
10368
|
case 0:
|
|
9910
|
-
|
|
10369
|
+
_context7.next = 2;
|
|
9911
10370
|
return controller.wait();
|
|
9912
10371
|
|
|
9913
10372
|
case 2:
|
|
@@ -9915,25 +10374,25 @@ var useColumns = (function (form) {
|
|
|
9915
10374
|
isvalue = !!value || value === 0;
|
|
9916
10375
|
|
|
9917
10376
|
if (!(isvalue || isQuantity === isvalue)) {
|
|
9918
|
-
|
|
10377
|
+
_context7.next = 6;
|
|
9919
10378
|
break;
|
|
9920
10379
|
}
|
|
9921
10380
|
|
|
9922
|
-
return
|
|
10381
|
+
return _context7.abrupt("return");
|
|
9923
10382
|
|
|
9924
10383
|
case 6:
|
|
9925
10384
|
callback('请输入单价');
|
|
9926
10385
|
|
|
9927
10386
|
case 7:
|
|
9928
10387
|
case "end":
|
|
9929
|
-
return
|
|
10388
|
+
return _context7.stop();
|
|
9930
10389
|
}
|
|
9931
10390
|
}
|
|
9932
|
-
},
|
|
10391
|
+
}, _callee7);
|
|
9933
10392
|
}));
|
|
9934
10393
|
|
|
9935
|
-
function validator(
|
|
9936
|
-
return
|
|
10394
|
+
function validator(_x11, _x12, _x13) {
|
|
10395
|
+
return _validator4.apply(this, arguments);
|
|
9937
10396
|
}
|
|
9938
10397
|
|
|
9939
10398
|
return validator;
|
|
@@ -9959,7 +10418,7 @@ var useColumns = (function (form) {
|
|
|
9959
10418
|
}
|
|
9960
10419
|
}
|
|
9961
10420
|
}, {
|
|
9962
|
-
title: /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(Text$
|
|
10421
|
+
title: /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(Text$5, {
|
|
9963
10422
|
type: "danger"
|
|
9964
10423
|
}, "*"), "\u91D1\u989D(\u542B\u7A0E)"),
|
|
9965
10424
|
dataIndex: 'lineAmountIncludeTax',
|
|
@@ -9978,10 +10437,10 @@ var useColumns = (function (form) {
|
|
|
9978
10437
|
message: '金额必须为数字'
|
|
9979
10438
|
}, {
|
|
9980
10439
|
validator: function () {
|
|
9981
|
-
var
|
|
9982
|
-
return _regeneratorRuntime().wrap(function
|
|
10440
|
+
var _validator5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(_, value, callback) {
|
|
10441
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
9983
10442
|
while (1) {
|
|
9984
|
-
switch (
|
|
10443
|
+
switch (_context8.prev = _context8.next) {
|
|
9985
10444
|
case 0:
|
|
9986
10445
|
if ("".concat(value).split('.')[0].length > 9) {
|
|
9987
10446
|
callback('金额整数部分不能大于9位,小数点后最多2位');
|
|
@@ -9989,24 +10448,24 @@ var useColumns = (function (form) {
|
|
|
9989
10448
|
|
|
9990
10449
|
case 1:
|
|
9991
10450
|
case "end":
|
|
9992
|
-
return
|
|
10451
|
+
return _context8.stop();
|
|
9993
10452
|
}
|
|
9994
10453
|
}
|
|
9995
|
-
},
|
|
10454
|
+
}, _callee8);
|
|
9996
10455
|
}));
|
|
9997
10456
|
|
|
9998
|
-
function validator(
|
|
9999
|
-
return
|
|
10457
|
+
function validator(_x14, _x15, _x16) {
|
|
10458
|
+
return _validator5.apply(this, arguments);
|
|
10000
10459
|
}
|
|
10001
10460
|
|
|
10002
10461
|
return validator;
|
|
10003
10462
|
}()
|
|
10004
10463
|
}, {
|
|
10005
10464
|
validator: function () {
|
|
10006
|
-
var
|
|
10007
|
-
return _regeneratorRuntime().wrap(function
|
|
10465
|
+
var _validator6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(_, value, callback) {
|
|
10466
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
10008
10467
|
while (1) {
|
|
10009
|
-
switch (
|
|
10468
|
+
switch (_context9.prev = _context9.next) {
|
|
10010
10469
|
case 0:
|
|
10011
10470
|
if (deduction && parseFloat(value) <= deduction) {
|
|
10012
10471
|
callback('扣除额不能大于等于价税合计');
|
|
@@ -10014,14 +10473,14 @@ var useColumns = (function (form) {
|
|
|
10014
10473
|
|
|
10015
10474
|
case 1:
|
|
10016
10475
|
case "end":
|
|
10017
|
-
return
|
|
10476
|
+
return _context9.stop();
|
|
10018
10477
|
}
|
|
10019
10478
|
}
|
|
10020
|
-
},
|
|
10479
|
+
}, _callee9);
|
|
10021
10480
|
}));
|
|
10022
10481
|
|
|
10023
|
-
function validator(
|
|
10024
|
-
return
|
|
10482
|
+
function validator(_x17, _x18, _x19) {
|
|
10483
|
+
return _validator6.apply(this, arguments);
|
|
10025
10484
|
}
|
|
10026
10485
|
|
|
10027
10486
|
return validator;
|
|
@@ -10046,7 +10505,7 @@ var useColumns = (function (form) {
|
|
|
10046
10505
|
}
|
|
10047
10506
|
}
|
|
10048
10507
|
}, {
|
|
10049
|
-
title: /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(Text$
|
|
10508
|
+
title: /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(Text$5, {
|
|
10050
10509
|
type: "danger"
|
|
10051
10510
|
}, "*"), "\u91D1\u989D(\u4E0D\u542B\u7A0E)"),
|
|
10052
10511
|
dataIndex: 'lineAmountExcludeTax',
|
|
@@ -10065,10 +10524,10 @@ var useColumns = (function (form) {
|
|
|
10065
10524
|
message: '金额必须为数字'
|
|
10066
10525
|
}, {
|
|
10067
10526
|
validator: function () {
|
|
10068
|
-
var
|
|
10069
|
-
return _regeneratorRuntime().wrap(function
|
|
10527
|
+
var _validator7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(_, value, callback) {
|
|
10528
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
10070
10529
|
while (1) {
|
|
10071
|
-
switch (
|
|
10530
|
+
switch (_context10.prev = _context10.next) {
|
|
10072
10531
|
case 0:
|
|
10073
10532
|
if ("".concat(value).split('.')[0].length > 9) {
|
|
10074
10533
|
callback('金额整数部分不能大于9位,小数点后最多2位');
|
|
@@ -10076,14 +10535,14 @@ var useColumns = (function (form) {
|
|
|
10076
10535
|
|
|
10077
10536
|
case 1:
|
|
10078
10537
|
case "end":
|
|
10079
|
-
return
|
|
10538
|
+
return _context10.stop();
|
|
10080
10539
|
}
|
|
10081
10540
|
}
|
|
10082
|
-
},
|
|
10541
|
+
}, _callee10);
|
|
10083
10542
|
}));
|
|
10084
10543
|
|
|
10085
|
-
function validator(
|
|
10086
|
-
return
|
|
10544
|
+
function validator(_x20, _x21, _x22) {
|
|
10545
|
+
return _validator7.apply(this, arguments);
|
|
10087
10546
|
}
|
|
10088
10547
|
|
|
10089
10548
|
return validator;
|
|
@@ -10108,7 +10567,7 @@ var useColumns = (function (form) {
|
|
|
10108
10567
|
}
|
|
10109
10568
|
}
|
|
10110
10569
|
}, {
|
|
10111
|
-
title: /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(Text$
|
|
10570
|
+
title: /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(Text$5, {
|
|
10112
10571
|
type: "danger"
|
|
10113
10572
|
}, "*"), "\u7A0E\u7387"),
|
|
10114
10573
|
dataIndex: 'taxRate',
|
|
@@ -10194,7 +10653,7 @@ var useColumns = (function (form) {
|
|
|
10194
10653
|
ellipsis: true
|
|
10195
10654
|
});
|
|
10196
10655
|
});
|
|
10197
|
-
}, [isTaxIncluded, editGood, controller, changeField, deduction]);
|
|
10656
|
+
}, [isTaxIncluded, editGood, controller, changeField, deduction, isMyShow]);
|
|
10198
10657
|
React__default['default'].useEffect(function () {
|
|
10199
10658
|
if (!changeField) return;
|
|
10200
10659
|
var t = setTimeout(function () {
|
|
@@ -10269,9 +10728,65 @@ var MyDiv = /*#__PURE__*/function (_React$Component2) {
|
|
|
10269
10728
|
return MyDiv;
|
|
10270
10729
|
}(React__default['default'].Component);
|
|
10271
10730
|
|
|
10731
|
+
var MyItemNameDiv = /*#__PURE__*/function (_React$Component3) {
|
|
10732
|
+
_inherits(MyItemNameDiv, _React$Component3);
|
|
10733
|
+
|
|
10734
|
+
var _super3 = _createSuper(MyItemNameDiv);
|
|
10735
|
+
|
|
10736
|
+
function MyItemNameDiv() {
|
|
10737
|
+
_classCallCheck(this, MyItemNameDiv);
|
|
10738
|
+
|
|
10739
|
+
return _super3.apply(this, arguments);
|
|
10740
|
+
}
|
|
10741
|
+
|
|
10742
|
+
_createClass(MyItemNameDiv, [{
|
|
10743
|
+
key: "render",
|
|
10744
|
+
value: function render() {
|
|
10745
|
+
var _this$props = this.props,
|
|
10746
|
+
isMyShow = _this$props.isMyShow,
|
|
10747
|
+
valueT = _this$props.valueT,
|
|
10748
|
+
valueF = _this$props.valueF;
|
|
10749
|
+
|
|
10750
|
+
if (isMyShow) {
|
|
10751
|
+
if (valueT) {
|
|
10752
|
+
return /*#__PURE__*/React__default['default'].createElement("span", {
|
|
10753
|
+
style: {
|
|
10754
|
+
padding: '0 10px',
|
|
10755
|
+
color: '#0074ff'
|
|
10756
|
+
}
|
|
10757
|
+
}, valueT);
|
|
10758
|
+
} else {
|
|
10759
|
+
return /*#__PURE__*/React__default['default'].createElement("span", {
|
|
10760
|
+
style: {
|
|
10761
|
+
padding: '0 10px'
|
|
10762
|
+
}
|
|
10763
|
+
}, valueF);
|
|
10764
|
+
}
|
|
10765
|
+
} else {
|
|
10766
|
+
if (valueF) {
|
|
10767
|
+
return /*#__PURE__*/React__default['default'].createElement("span", {
|
|
10768
|
+
style: {
|
|
10769
|
+
padding: '0 10px'
|
|
10770
|
+
}
|
|
10771
|
+
}, valueF);
|
|
10772
|
+
} else {
|
|
10773
|
+
return /*#__PURE__*/React__default['default'].createElement("span", {
|
|
10774
|
+
style: {
|
|
10775
|
+
padding: '0 10px',
|
|
10776
|
+
color: '#0074ff'
|
|
10777
|
+
}
|
|
10778
|
+
}, valueT);
|
|
10779
|
+
}
|
|
10780
|
+
}
|
|
10781
|
+
}
|
|
10782
|
+
}]);
|
|
10783
|
+
|
|
10784
|
+
return MyItemNameDiv;
|
|
10785
|
+
}(React__default['default'].Component);
|
|
10786
|
+
|
|
10272
10787
|
var useOnRow = (function () {
|
|
10273
10788
|
/** 控制器 */
|
|
10274
|
-
var controller =
|
|
10789
|
+
var controller = Invoice.useInvoiceController();
|
|
10275
10790
|
var model = controller.useMemo(function (s) {
|
|
10276
10791
|
return s.model;
|
|
10277
10792
|
}, []);
|
|
@@ -10454,7 +10969,7 @@ function useWindowClick(controller) {
|
|
|
10454
10969
|
|
|
10455
10970
|
var useRowSelection = (function () {
|
|
10456
10971
|
/** 控制器 */
|
|
10457
|
-
var controller =
|
|
10972
|
+
var controller = Invoice.useInvoiceController();
|
|
10458
10973
|
/** 列表选中的货物索引列表 */
|
|
10459
10974
|
|
|
10460
10975
|
var selectedRowKeys = controller.useMemo(function (s) {
|
|
@@ -10678,7 +11193,7 @@ var useRowSelection = (function () {
|
|
|
10678
11193
|
};
|
|
10679
11194
|
});
|
|
10680
11195
|
|
|
10681
|
-
var css_248z$6 = ".kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-table-tax-rate .ktsAnt3x-select-selection-selected-value {\n float: right;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able {\n display: flex;\n padding: 10px;\n border-bottom: 1px solid #dcdcdc;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able-list {\n flex: 1;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able-list button {\n padding-left: 10px;\n padding-right: 10px;\n border-radius: 12px;\n color: #0074ff;\n border: 1px solid #0074ff;\n margin: 0 10px;\n height: 24px;\n line-height: 22px;\n cursor: pointer;\n font-size: 12px;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able-list button[disabled] {\n color: rgba(0, 0, 0, 0.25);\n border: 1px solid;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able-extend {\n flex: none;\n display: flex;\n
|
|
11196
|
+
var css_248z$6 = ".kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-table-tax-rate .ktsAnt3x-select-selection-selected-value {\n float: right;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able {\n display: flex;\n padding: 10px;\n border-bottom: 1px solid #dcdcdc;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able-list {\n flex: 1;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able-list button {\n padding-left: 10px;\n padding-right: 10px;\n border-radius: 12px;\n color: #0074ff;\n border: 1px solid #0074ff;\n margin: 0 10px;\n height: 24px;\n line-height: 22px;\n cursor: pointer;\n font-size: 12px;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able-list button[disabled] {\n color: rgba(0, 0, 0, 0.25);\n border: 1px solid;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able-extend {\n flex: none;\n display: flex;\n gap: 5px;\n}\n.kts-invoice-operate-goods-list-table.kts-invoice-operate-prefab .ktsAnt3x-table-row {\n color: rgba(0, 0, 0, 0.25);\n background: #f5f5f5;\n}\n.kts-invoice-operate-goods-list-table {\n border-bottom: 1px solid #dcdcdc;\n}\n.kts-invoice-operate-goods-list-table .kts-invoice-operate-goods-discount {\n color: rgba(0, 0, 0, 0.25);\n background: #f5f5f5;\n}\n.kts-invoice-operate-goods-list-table .kts-invoice-operate-goods-list-able-list-itemName-import {\n display: flex;\n}\n.kts-invoice-operate-goods-list-table .kts-invoice-operate-goods-list-able-list-itemName-import .ktsAnt3x-btn {\n display: block;\n line-height: 0;\n width: auto;\n padding-right: 5px;\n}\n.kts-invoice-operate-goods-list-table .ktsAnt3x-form-item-children {\n height: 30px;\n display: block;\n}\n.kts-invoice-operate-goods-list-table .ktsAnt3x-table-body {\n height: 263px;\n}\n.kts-invoice-operate-goods-list-table .ktsAnt3x-form-explain {\n position: absolute;\n right: 6px;\n top: 6px;\n}\n.kts-invoice-operate-goods-list-table table {\n border-bottom: 1px solid #d9d9d9 !important;\n}\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td {\n padding: 0 !important;\n}\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .ktsAnt3x-form-explain {\n display: none;\n}\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .ktsAnt3x-form-item {\n padding: 0;\n margin: 0;\n}\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .ktsAnt3x-form-item .ktsAnt3x-form-item-control {\n line-height: inherit;\n}\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .has-error .ktsAnt3x-select-selection,\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .has-error .ktsAnt3x-input,\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .has-error .ktsAnt3x-input:hover {\n border-right-width: 1px !important;\n border-top-width: 1px;\n border-left-width: 1px;\n border-bottom-width: 1px;\n}\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .ktsAnt3x-select-selection--single,\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .ktsAnt3x-select-auto-complete.ktsAnt3x-select .ktsAnt3x-input:hover,\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .ktsAnt3x-input {\n height: 30px;\n border-radius: 0;\n border-right-width: 0 !important;\n border-top-width: 0;\n border-left-width: 0;\n border-bottom-width: 0;\n box-shadow: none;\n}\n";
|
|
10682
11197
|
styleInject(css_248z$6);
|
|
10683
11198
|
|
|
10684
11199
|
var GoodsList = /*#__PURE__*/function (_React$Component) {
|
|
@@ -10703,7 +11218,7 @@ var GoodsList = /*#__PURE__*/function (_React$Component) {
|
|
|
10703
11218
|
}(React__default['default'].Component);
|
|
10704
11219
|
var Main = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function (props) {
|
|
10705
11220
|
/** 控制器 */
|
|
10706
|
-
var controller =
|
|
11221
|
+
var controller = Invoice.useInvoiceController();
|
|
10707
11222
|
var goodsList = controller.useMemo(function (s) {
|
|
10708
11223
|
return s.goodsListState.goodsList;
|
|
10709
11224
|
}, []);
|
|
@@ -10873,9 +11388,9 @@ var Main = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function (p
|
|
|
10873
11388
|
className: "kts-invoice-operate-goods-list-able"
|
|
10874
11389
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
10875
11390
|
className: "kts-invoice-operate-goods-list-able-list"
|
|
10876
|
-
}, /*#__PURE__*/React__default['default'].createElement(AddRowButton, null), /*#__PURE__*/React__default['default'].createElement(DelRowButton, null), /*#__PURE__*/React__default['default'].createElement(AddDiscountRowButton, null), /*#__PURE__*/React__default['default'].createElement(EndowCodeButton, null)), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11391
|
+
}, /*#__PURE__*/React__default['default'].createElement(AddRowButton, null), /*#__PURE__*/React__default['default'].createElement(DelRowButton, null), /*#__PURE__*/React__default['default'].createElement(AddDiscountRowButton, null), /*#__PURE__*/React__default['default'].createElement(EndowCodeButton, null), /*#__PURE__*/React__default['default'].createElement(CommodityComparisonButton, null)), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
10877
11392
|
className: "kts-invoice-operate-goods-list-able-extend"
|
|
10878
|
-
}, props.menuExpansion, /*#__PURE__*/React__default['default'].createElement(TaxIncludedSwitch, null))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11393
|
+
}, props.menuExpansion, /*#__PURE__*/React__default['default'].createElement(DescribeSwitch, null), /*#__PURE__*/React__default['default'].createElement(TaxIncludedSwitch, null))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
10879
11394
|
className: classnames__default['default']('kts-invoice-operate-goods-list-table', {
|
|
10880
11395
|
'kts-invoice-operate-prefab': isprefab
|
|
10881
11396
|
})
|
|
@@ -10942,7 +11457,7 @@ var Main$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function
|
|
|
10942
11457
|
var getFieldDecorator = form.getFieldDecorator;
|
|
10943
11458
|
/** 控制器 */
|
|
10944
11459
|
|
|
10945
|
-
var controller =
|
|
11460
|
+
var controller = Invoice.useInvoiceController();
|
|
10946
11461
|
/** 控制器 */
|
|
10947
11462
|
|
|
10948
11463
|
var model = controller.useMemo(function (s) {
|
|
@@ -11060,7 +11575,7 @@ var Sign = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function (p
|
|
|
11060
11575
|
var getFieldDecorator = form.getFieldDecorator;
|
|
11061
11576
|
/** 控制器 */
|
|
11062
11577
|
|
|
11063
|
-
var controller =
|
|
11578
|
+
var controller = Invoice.useInvoiceController();
|
|
11064
11579
|
var model = controller.useMemo(function (s) {
|
|
11065
11580
|
return s.model;
|
|
11066
11581
|
}, []); // 注册 form
|
|
@@ -11102,7 +11617,7 @@ var formItemLayout = {
|
|
|
11102
11617
|
};
|
|
11103
11618
|
|
|
11104
11619
|
var ImportBuyerButton = (function () {
|
|
11105
|
-
var controller =
|
|
11620
|
+
var controller = Invoice.useInvoiceController();
|
|
11106
11621
|
var onClick = React__default['default'].useCallback(function () {
|
|
11107
11622
|
controller.pipeline( /*#__PURE__*/function () {
|
|
11108
11623
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
|
|
@@ -11134,7 +11649,7 @@ var ImportBuyerButton = (function () {
|
|
|
11134
11649
|
|
|
11135
11650
|
var BuyerNameInput = (function (props) {
|
|
11136
11651
|
/** 控制器 */
|
|
11137
|
-
var controller =
|
|
11652
|
+
var controller = Invoice.useInvoiceController();
|
|
11138
11653
|
/** 组件模式 */
|
|
11139
11654
|
|
|
11140
11655
|
var model = controller.useMemo(function (s) {
|
|
@@ -11294,7 +11809,7 @@ var BuyerNameInput = (function (props) {
|
|
|
11294
11809
|
|
|
11295
11810
|
function useDataSource() {
|
|
11296
11811
|
/** 控制器 */
|
|
11297
|
-
var controller =
|
|
11812
|
+
var controller = Invoice.useInvoiceController();
|
|
11298
11813
|
|
|
11299
11814
|
var _React$useState3 = React__default['default'].useState(false),
|
|
11300
11815
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
@@ -11378,7 +11893,7 @@ function interval(i, t) {
|
|
|
11378
11893
|
var css_248z$9 = ".kts-invoice-operate-buyer {\n display: flex;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message {\n flex: 1;\n display: flex;\n position: relative;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .ktsAnt3x-descriptions-item-label {\n width: 179px;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list {\n width: 100%;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-descriptions-view {\n border: none;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-descriptions-item-label {\n padding: 0 10px;\n font-size: 12px;\n background-color: #fff;\n line-height: 30px;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-descriptions-item-content {\n padding: 0;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-descriptions-item-content .ktsAnt3x-input {\n box-shadow: none;\n border-color: #fff;\n border-radius: 0;\n padding: 0 10px;\n font-size: 12px;\n line-height: 30px;\n width: 100%;\n height: 100%;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-descriptions-item-content .ktsAnt3x-input:hover {\n border: 1 solid;\n border-color: #40a9ff;\n border-right-width: 1px !important;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-descriptions-item-content .has-error .ktsAnt3x-input,\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-descriptions-item-content .has-error .ktsAnt3x-input:hover {\n background-color: #fff;\n border: 1 solid;\n border-color: #f5222d;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-form-item {\n margin: 0;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-form-item-control {\n line-height: 0;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-form-item-children {\n height: 30px;\n display: block;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-form-item-children .ktsAnt3x-btn {\n line-height: 0;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-form-explain {\n position: absolute;\n left: 5px;\n top: 6px;\n z-index: 10;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-Import {\n position: absolute;\n right: 0px;\n top: 0px;\n z-index: 10;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-password {\n border-left: 1px solid #dcdcdc;\n display: flex;\n flex: none;\n width: 458px;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-title {\n flex: none;\n width: 30px;\n height: 100%;\n text-align: center;\n border-right: 1px solid #dcdcdc;\n display: table;\n padding: 0 5px;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-title label {\n display: table-cell;\n vertical-align: middle;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover {\n padding-top: 0;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .ktsAnt3x-popover-inner-content {\n padding: 6px 0;\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n overflow-x: hidden;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .ktsAnt3x-popover-arrow {\n display: none;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content {\n width: 567px;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-block {\n padding: 14px 0;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-block label {\n display: block;\n font-size: 12px;\n color: #666666;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-recently-issued {\n padding: 0;\n margin: 0;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-recently-issued li {\n list-style: none;\n width: 50%;\n float: left;\n margin-bottom: 20px;\n padding: 0 10px;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-recently-issued::after {\n content: \".\";\n display: block;\n height: 0;\n clear: left;\n visibility: hidden;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-select-company {\n padding: 0;\n margin: 0;\n font-size: 12px;\n padding: 10px;\n font-weight: bold;\n color: #000000;\n cursor: pointer;\n transition: background 0.4s;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-select-company:hover {\n background: #e6e6e6e6;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-select-company:last-child {\n margin-bottom: 0;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-select-company li {\n list-style: none;\n width: 50%;\n float: left;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n padding-right: 10px;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-select-company::after {\n content: \".\";\n display: block;\n height: 0;\n clear: left;\n visibility: hidden;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content-tag {\n line-height: 1;\n padding: 4px 12px;\n background: #F3F3F3;\n border-radius: 9999px;\n font-size: 12px;\n font-weight: bold;\n color: #000;\n cursor: pointer;\n transition: background 0.4s;\n display: inline-block;\n max-width: 100%;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content-tag:hover {\n background: #e6e6e6e6;\n}\n";
|
|
11379
11894
|
styleInject(css_248z$9);
|
|
11380
11895
|
|
|
11381
|
-
var Text$
|
|
11896
|
+
var Text$6 = ktsComponentsAntdX3.Typography.Text;
|
|
11382
11897
|
|
|
11383
11898
|
var Buyer$1 = /*#__PURE__*/function (_React$Component) {
|
|
11384
11899
|
_inherits(Buyer, _React$Component);
|
|
@@ -11410,7 +11925,7 @@ var Main$2 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function
|
|
|
11410
11925
|
var getFieldDecorator = form.getFieldDecorator;
|
|
11411
11926
|
/** 控制器 */
|
|
11412
11927
|
|
|
11413
|
-
var controller =
|
|
11928
|
+
var controller = Invoice.useInvoiceController();
|
|
11414
11929
|
/** 组件模式 */
|
|
11415
11930
|
|
|
11416
11931
|
var model = controller.useMemo(function (s) {
|
|
@@ -11492,7 +12007,7 @@ var Main$2 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function
|
|
|
11492
12007
|
if (e.options.rules.some(function (e) {
|
|
11493
12008
|
return e.required;
|
|
11494
12009
|
})) {
|
|
11495
|
-
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(Text$
|
|
12010
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(Text$6, {
|
|
11496
12011
|
type: "danger"
|
|
11497
12012
|
}, "*"), e.label);
|
|
11498
12013
|
} else {
|
|
@@ -11528,7 +12043,7 @@ var Main$2 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function
|
|
|
11528
12043
|
});
|
|
11529
12044
|
|
|
11530
12045
|
var ImportBuyerDrawer = (function () {
|
|
11531
|
-
var controller =
|
|
12046
|
+
var controller = Invoice.useInvoiceController();
|
|
11532
12047
|
var visible = controller.useMemo(function (s) {
|
|
11533
12048
|
return s.buyerState.isVisibleDrawer;
|
|
11534
12049
|
}, []);
|
|
@@ -11570,7 +12085,7 @@ var ImportBuyerDrawer = (function () {
|
|
|
11570
12085
|
});
|
|
11571
12086
|
|
|
11572
12087
|
var DrawerBody$1 = function DrawerBody() {
|
|
11573
|
-
var controller =
|
|
12088
|
+
var controller = Invoice.useInvoiceController();
|
|
11574
12089
|
var columns = controller.useMemo(function (e) {
|
|
11575
12090
|
return e.buyerState.columns;
|
|
11576
12091
|
}, []);
|
|
@@ -11658,7 +12173,7 @@ var DrawerBody$1 = function DrawerBody() {
|
|
|
11658
12173
|
};
|
|
11659
12174
|
|
|
11660
12175
|
var ImportGoodsDrawer = (function () {
|
|
11661
|
-
var controller =
|
|
12176
|
+
var controller = Invoice.useInvoiceController();
|
|
11662
12177
|
var visible = controller.useMemo(function (s) {
|
|
11663
12178
|
return s.goodsListState.importGoods.isVisibleDrawer;
|
|
11664
12179
|
}, []);
|
|
@@ -11704,7 +12219,7 @@ var ImportGoodsDrawer = (function () {
|
|
|
11704
12219
|
});
|
|
11705
12220
|
|
|
11706
12221
|
var DrawerBody$2 = function DrawerBody() {
|
|
11707
|
-
var controller =
|
|
12222
|
+
var controller = Invoice.useInvoiceController();
|
|
11708
12223
|
var columns = controller.useMemo(function (s) {
|
|
11709
12224
|
return s.goodsListState.importGoods.columns;
|
|
11710
12225
|
}, []);
|
|
@@ -11738,6 +12253,7 @@ var DrawerBody$2 = function DrawerBody() {
|
|
|
11738
12253
|
onClick: function onClick() {
|
|
11739
12254
|
controller.run( /*#__PURE__*/function () {
|
|
11740
12255
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
|
|
12256
|
+
var between, editGood;
|
|
11741
12257
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
11742
12258
|
while (1) {
|
|
11743
12259
|
switch (_context2.prev = _context2.next) {
|
|
@@ -11746,7 +12262,8 @@ var DrawerBody$2 = function DrawerBody() {
|
|
|
11746
12262
|
return !record[e] && record[e] !== 0;
|
|
11747
12263
|
}).forEach(function (e) {
|
|
11748
12264
|
delete record[e];
|
|
11749
|
-
});
|
|
12265
|
+
}); // 导入时校验函数
|
|
12266
|
+
|
|
11750
12267
|
_context2.next = 3;
|
|
11751
12268
|
return s.goodsListState.importGoods.verifyFn(record);
|
|
11752
12269
|
|
|
@@ -11774,30 +12291,41 @@ var DrawerBody$2 = function DrawerBody() {
|
|
|
11774
12291
|
record.priceIncludeTax = s.goodsListState.editGood.priceIncludeTax;
|
|
11775
12292
|
record.lineAmountExcludeTax = s.goodsListState.editGood.lineAmountExcludeTax;
|
|
11776
12293
|
record.lineAmountIncludeTax = s.goodsListState.editGood.lineAmountIncludeTax;
|
|
11777
|
-
}
|
|
12294
|
+
} // 中间数据
|
|
11778
12295
|
|
|
11779
|
-
s.goodsListState.editGood = _objectSpread2(_objectSpread2({}, s.goodsListState.editGood), record);
|
|
11780
12296
|
|
|
11781
|
-
|
|
11782
|
-
|
|
11783
|
-
|
|
12297
|
+
between = _objectSpread2({}, record);
|
|
12298
|
+
between.itemName = getItemName$1(record, s.goodsListState.editGood);
|
|
12299
|
+
between.itemNameOther = getItemNameOther(record, s.goodsListState.editGood); // 设置编辑货物
|
|
12300
|
+
|
|
12301
|
+
editGood = s.goodsListState.editGood = _objectSpread2(_objectSpread2({}, s.goodsListState.editGood), between);
|
|
12302
|
+
|
|
12303
|
+
if (editGood.taxRate) {
|
|
12304
|
+
editGood.taxRate = dutyFree(controller, editGood.taxRate, s.goodsListState.form, editGood);
|
|
11784
12305
|
}
|
|
11785
12306
|
|
|
11786
|
-
|
|
12307
|
+
if ("".concat(editGood.priceIncludeTax) === '0') {
|
|
12308
|
+
editGood.priceIncludeTax = undefined;
|
|
12309
|
+
editGood.priceExcludeTax = undefined;
|
|
12310
|
+
} else {
|
|
12311
|
+
editGood.priceExcludeTax = getPriceExcludeTax(editGood, record);
|
|
12312
|
+
}
|
|
12313
|
+
|
|
12314
|
+
if (editGood.quantity && editGood.priceIncludeTax) {
|
|
12315
|
+
editGood.lineAmountIncludeTax = countAmountIncludeTax(editGood.quantity, editGood.priceIncludeTax);
|
|
12316
|
+
} // 导入FORM里
|
|
11787
12317
|
|
|
11788
|
-
case 12:
|
|
11789
|
-
if (s.goodsListState.editGood.taxRate) s.goodsListState.editGood.taxRate = dutyFree(controller, s.goodsListState.editGood.taxRate, s.goodsListState.form, s.goodsListState.editGood);
|
|
11790
12318
|
|
|
11791
|
-
if (
|
|
11792
|
-
s.goodsListState.editGood
|
|
11793
|
-
s.goodsListState.editGood.priceExcludeTax = undefined;
|
|
12319
|
+
if (s.goodsListState.isMyShow) {
|
|
12320
|
+
s.goodsListState.form.setFieldsValue(editGood);
|
|
11794
12321
|
} else {
|
|
11795
|
-
s.goodsListState.
|
|
12322
|
+
s.goodsListState.form.setFieldsValue(_objectSpread2(_objectSpread2({}, editGood), {}, {
|
|
12323
|
+
itemName: editGood.itemNameOther,
|
|
12324
|
+
unit: editGood.unitOther,
|
|
12325
|
+
itemModelName: editGood.itemModelNameOther
|
|
12326
|
+
}));
|
|
11796
12327
|
}
|
|
11797
12328
|
|
|
11798
|
-
if (s.goodsListState.editGood.quantity && s.goodsListState.editGood.priceIncludeTax) s.goodsListState.editGood.lineAmountIncludeTax = countAmountIncludeTax(s.goodsListState.editGood.quantity, s.goodsListState.editGood.priceIncludeTax);
|
|
11799
|
-
s.goodsListState.editGood.itemName = getItemName(record);
|
|
11800
|
-
s.goodsListState.form.setFieldsValue(s.goodsListState.editGood);
|
|
11801
12329
|
s.goodsListState.importGoods.isVisibleDrawer = false;
|
|
11802
12330
|
s.goodsListState.isTaxIncluded ? updateUnitPriceExcludingTax(controller, s.goodsListState.form) : updateUnitPriceTax(controller, s.goodsListState.form);
|
|
11803
12331
|
|
|
@@ -11819,11 +12347,12 @@ var DrawerBody$2 = function DrawerBody() {
|
|
|
11819
12347
|
});
|
|
11820
12348
|
};
|
|
11821
12349
|
/** 货物名称 */
|
|
12350
|
+
// const getItemName = (record: any) => {
|
|
12351
|
+
// return record.shorthand
|
|
12352
|
+
// ? `*${record.shorthand}*${record.itemName}`
|
|
12353
|
+
// : record.itemName;
|
|
12354
|
+
// };
|
|
11822
12355
|
|
|
11823
|
-
|
|
11824
|
-
var getItemName = function getItemName(record) {
|
|
11825
|
-
return record.shorthand ? "*".concat(record.shorthand, "*").concat(record.itemName) : record.itemName;
|
|
11826
|
-
};
|
|
11827
12356
|
/** 货物单价,不含税 */
|
|
11828
12357
|
|
|
11829
12358
|
|
|
@@ -11831,6 +12360,39 @@ var getPriceExcludeTax = function getPriceExcludeTax(s, record) {
|
|
|
11831
12360
|
if (!s.taxRate && s.taxRate !== 0 || !record.priceIncludeTax && record.priceIncludeTax !== 0) return; // 单价(含税)/(1+税率) = 单价(不含税)
|
|
11832
12361
|
|
|
11833
12362
|
return format15(evaluate("".concat(record.priceIncludeTax, " / (1+").concat(s.taxRate, "/100)")));
|
|
12363
|
+
}; // 获取我方名称
|
|
12364
|
+
|
|
12365
|
+
|
|
12366
|
+
var getItemName$1 = function getItemName(record, editGood) {
|
|
12367
|
+
var _getSN;
|
|
12368
|
+
|
|
12369
|
+
var shorthand;
|
|
12370
|
+
shorthand = record.shorthand;
|
|
12371
|
+
|
|
12372
|
+
if (shorthand) {
|
|
12373
|
+
return "*".concat(shorthand, "*").concat(record.itemName);
|
|
12374
|
+
}
|
|
12375
|
+
|
|
12376
|
+
shorthand = (_getSN = getSN(editGood.itemNameOther)) === null || _getSN === void 0 ? void 0 : _getSN.shorthand;
|
|
12377
|
+
|
|
12378
|
+
if (shorthand) {
|
|
12379
|
+
return "*".concat(shorthand, "*").concat(record.itemName);
|
|
12380
|
+
}
|
|
12381
|
+
|
|
12382
|
+
return record.itemName;
|
|
12383
|
+
}; // 获取他方名称
|
|
12384
|
+
|
|
12385
|
+
|
|
12386
|
+
var getItemNameOther = function getItemNameOther(record, editGood) {
|
|
12387
|
+
if (!editGood.itemNameOther) return editGood.itemNameOther;
|
|
12388
|
+
var shorthand;
|
|
12389
|
+
shorthand = record.shorthand;
|
|
12390
|
+
|
|
12391
|
+
if (shorthand) {
|
|
12392
|
+
return "*".concat(shorthand, "*").concat(record.itemName);
|
|
12393
|
+
}
|
|
12394
|
+
|
|
12395
|
+
return record.itemNameOther;
|
|
11834
12396
|
};
|
|
11835
12397
|
|
|
11836
12398
|
/**
|
|
@@ -11890,7 +12452,7 @@ styleInject(css_248z$a);
|
|
|
11890
12452
|
var TreeNode = ktsComponentsAntdX3.Tree.TreeNode;
|
|
11891
12453
|
var confirm = ktsComponentsAntdX3.Modal.confirm;
|
|
11892
12454
|
var EndowCodeDrawer = (function () {
|
|
11893
|
-
var controller =
|
|
12455
|
+
var controller = Invoice.useInvoiceController();
|
|
11894
12456
|
var visible = controller.useMemo(function (s) {
|
|
11895
12457
|
return s.goodsListState.endowCode.endowcodeGoodIndex.length > 0;
|
|
11896
12458
|
}, []);
|
|
@@ -12005,7 +12567,7 @@ var EndowCodeDrawer = (function () {
|
|
|
12005
12567
|
var DrawerBody$3 = function DrawerBody(props) {
|
|
12006
12568
|
var _defaultValue$taxRate, _defaultValue$favoure;
|
|
12007
12569
|
|
|
12008
|
-
var controller =
|
|
12570
|
+
var controller = Invoice.useInvoiceController();
|
|
12009
12571
|
var defaultValue = props.defaultValue;
|
|
12010
12572
|
var actions = React__default['default'].useMemo(function () {
|
|
12011
12573
|
return antd.createAsyncFormActions();
|
|
@@ -12390,9 +12952,10 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
12390
12952
|
}); // 赋码
|
|
12391
12953
|
|
|
12392
12954
|
endowCodeGood.forEach(function (good) {
|
|
12393
|
-
if (!good) return;
|
|
12394
|
-
|
|
12395
|
-
good.
|
|
12955
|
+
if (!good) return;
|
|
12956
|
+
good.itemName = setShorthand(good.itemName, values.shorthand);
|
|
12957
|
+
good.itemNameOther = setShorthand(good.itemNameOther, values.shorthand); // const name = getItemName(good.itemName, values.shorthand);
|
|
12958
|
+
// good.itemName = getItemName(good.itemName, values.shorthand); // `*${values.shorthand}*${name}`;
|
|
12396
12959
|
|
|
12397
12960
|
good.taxClassificationCode = values.taxClassificationCode;
|
|
12398
12961
|
good.taxRate = values.taxRate;
|
|
@@ -12640,41 +13203,255 @@ var getShorthand = function getShorthand(value) {
|
|
|
12640
13203
|
return undefined;
|
|
12641
13204
|
}
|
|
12642
13205
|
};
|
|
12643
|
-
/** 简称填入名称 */
|
|
12644
13206
|
|
|
13207
|
+
var AddComparisonDrawer = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function (props) {
|
|
13208
|
+
var form = props.form;
|
|
13209
|
+
var getFieldDecorator = form.getFieldDecorator;
|
|
13210
|
+
/** 控制器 */
|
|
12645
13211
|
|
|
12646
|
-
var
|
|
12647
|
-
|
|
13212
|
+
var controller = Invoice.useInvoiceController();
|
|
13213
|
+
/** 正在 添加商品对照 的货物索引 */
|
|
12648
13214
|
|
|
12649
|
-
|
|
12650
|
-
return
|
|
12651
|
-
}
|
|
13215
|
+
var addComparisonIndex = controller.useMemo(function (s) {
|
|
13216
|
+
return s.goodsListState.addComparisonIndex;
|
|
13217
|
+
}, []);
|
|
13218
|
+
/** 货物字典 */
|
|
12652
13219
|
|
|
12653
|
-
var
|
|
13220
|
+
var goodsMap = controller.useMemo(function (s) {
|
|
13221
|
+
return s.goodsListState.goodsMap;
|
|
13222
|
+
}, []);
|
|
13223
|
+
/** 正在 对照 的货物 */
|
|
12654
13224
|
|
|
12655
|
-
|
|
12656
|
-
return
|
|
12657
|
-
}
|
|
12658
|
-
|
|
12659
|
-
|
|
12660
|
-
|
|
13225
|
+
var good = React__default['default'].useMemo(function () {
|
|
13226
|
+
return addComparisonIndex ? goodsMap.get(addComparisonIndex) : undefined;
|
|
13227
|
+
}, [addComparisonIndex]);
|
|
13228
|
+
/** 关闭对照 */
|
|
13229
|
+
|
|
13230
|
+
var onClose = React__default['default'].useCallback(controller.pipeline( /*#__PURE__*/function () {
|
|
13231
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
|
|
13232
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
13233
|
+
while (1) {
|
|
13234
|
+
switch (_context.prev = _context.next) {
|
|
13235
|
+
case 0:
|
|
13236
|
+
s.goodsListState.addComparisonIndex = undefined;
|
|
13237
|
+
|
|
13238
|
+
case 1:
|
|
13239
|
+
case "end":
|
|
13240
|
+
return _context.stop();
|
|
13241
|
+
}
|
|
13242
|
+
}
|
|
13243
|
+
}, _callee);
|
|
13244
|
+
}));
|
|
13245
|
+
|
|
13246
|
+
return function (_x) {
|
|
13247
|
+
return _ref.apply(this, arguments);
|
|
13248
|
+
};
|
|
13249
|
+
}()), [controller]);
|
|
13250
|
+
/** 提交数据 */
|
|
13251
|
+
|
|
13252
|
+
var onSubmit = React__default['default'].useCallback(function () {
|
|
13253
|
+
controller.run( /*#__PURE__*/function () {
|
|
13254
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
|
|
13255
|
+
var _getSN, _getSN2, _s$goodsListState, _s$goodsListState$pro;
|
|
13256
|
+
|
|
13257
|
+
var _yield$validateFields, err, values, shorthand;
|
|
13258
|
+
|
|
13259
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
13260
|
+
while (1) {
|
|
13261
|
+
switch (_context2.prev = _context2.next) {
|
|
13262
|
+
case 0:
|
|
13263
|
+
if (good) {
|
|
13264
|
+
_context2.next = 2;
|
|
13265
|
+
break;
|
|
13266
|
+
}
|
|
13267
|
+
|
|
13268
|
+
return _context2.abrupt("return");
|
|
13269
|
+
|
|
13270
|
+
case 2:
|
|
13271
|
+
_context2.next = 4;
|
|
13272
|
+
return validateFields$1(form);
|
|
13273
|
+
|
|
13274
|
+
case 4:
|
|
13275
|
+
_yield$validateFields = _context2.sent;
|
|
13276
|
+
err = _yield$validateFields.err;
|
|
13277
|
+
values = _yield$validateFields.values;
|
|
13278
|
+
|
|
13279
|
+
if (!err) {
|
|
13280
|
+
_context2.next = 9;
|
|
13281
|
+
break;
|
|
13282
|
+
}
|
|
13283
|
+
|
|
13284
|
+
return _context2.abrupt("return");
|
|
13285
|
+
|
|
13286
|
+
case 9:
|
|
13287
|
+
shorthand = s.goodsListState.isMyShow ? (_getSN = getSN(good.itemName)) === null || _getSN === void 0 ? void 0 : _getSN.shorthand : (_getSN2 = getSN(good.itemNameOther)) === null || _getSN2 === void 0 ? void 0 : _getSN2.shorthand;
|
|
13288
|
+
good.itemCode = values.itemCode;
|
|
13289
|
+
good.itemCodeOther = values.itemCodeOther;
|
|
13290
|
+
good.itemName = shorthand ? "*".concat(shorthand, "*").concat(values.itemName) : values.itemName;
|
|
13291
|
+
good.itemNameOther = shorthand ? "*".concat(shorthand, "*").concat(values.itemNameOther) : values.itemNameOther;
|
|
13292
|
+
good.itemModelName = values.itemModelName;
|
|
13293
|
+
good.itemModelNameOther = values.itemModelNameOther;
|
|
13294
|
+
good.unit = values.unit;
|
|
13295
|
+
good.unitOther = values.unitOther;
|
|
13296
|
+
s.goodsListState.addComparisonIndex = undefined;
|
|
13297
|
+
s.goodsListState.goodsList = _toConsumableArray(s.goodsListState.goodsList);
|
|
13298
|
+
|
|
13299
|
+
if (!(((_s$goodsListState = s.goodsListState) === null || _s$goodsListState === void 0 ? void 0 : (_s$goodsListState$pro = _s$goodsListState.productComparison) === null || _s$goodsListState$pro === void 0 ? void 0 : _s$goodsListState$pro.onUpdateComparisonTable) && values.isUpdate)) {
|
|
13300
|
+
_context2.next = 24;
|
|
13301
|
+
break;
|
|
13302
|
+
}
|
|
13303
|
+
|
|
13304
|
+
debugger;
|
|
13305
|
+
_context2.next = 24;
|
|
13306
|
+
return s.goodsListState.productComparison.onUpdateComparisonTable(good, values);
|
|
13307
|
+
|
|
13308
|
+
case 24:
|
|
13309
|
+
case "end":
|
|
13310
|
+
return _context2.stop();
|
|
13311
|
+
}
|
|
13312
|
+
}
|
|
13313
|
+
}, _callee2);
|
|
13314
|
+
}));
|
|
13315
|
+
|
|
13316
|
+
return function (_x2) {
|
|
13317
|
+
return _ref2.apply(this, arguments);
|
|
13318
|
+
};
|
|
13319
|
+
}());
|
|
13320
|
+
}, [form, good]);
|
|
13321
|
+
React__default['default'].useEffect(function () {
|
|
13322
|
+
form.resetFields();
|
|
13323
|
+
|
|
13324
|
+
if (good) {
|
|
13325
|
+
var _getSN3, _getSN4;
|
|
13326
|
+
|
|
13327
|
+
form.setFieldsValue(_objectSpread2(_objectSpread2({}, good), {}, {
|
|
13328
|
+
itemName: (_getSN3 = getSN(good.itemName)) === null || _getSN3 === void 0 ? void 0 : _getSN3.full,
|
|
13329
|
+
itemNameOther: (_getSN4 = getSN(good.itemNameOther)) === null || _getSN4 === void 0 ? void 0 : _getSN4.full
|
|
13330
|
+
}));
|
|
13331
|
+
}
|
|
13332
|
+
}, [good]);
|
|
13333
|
+
return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Drawer, {
|
|
13334
|
+
width: 500,
|
|
13335
|
+
onClose: onClose,
|
|
13336
|
+
placement: "right",
|
|
13337
|
+
title: "\u6DFB\u52A0\u5546\u54C1\u5BF9\u7167",
|
|
13338
|
+
visible: !!addComparisonIndex,
|
|
13339
|
+
drawerStyle: {
|
|
13340
|
+
display: 'flex',
|
|
13341
|
+
flexDirection: 'column'
|
|
13342
|
+
},
|
|
13343
|
+
bodyStyle: {
|
|
13344
|
+
flex: 1,
|
|
13345
|
+
display: 'flex',
|
|
13346
|
+
flexDirection: 'column'
|
|
13347
|
+
}
|
|
13348
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form, {
|
|
13349
|
+
layout: "vertical",
|
|
13350
|
+
style: {
|
|
13351
|
+
flex: 1
|
|
13352
|
+
}
|
|
13353
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Row, {
|
|
13354
|
+
gutter: [8, 8]
|
|
13355
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Col, {
|
|
13356
|
+
span: 12
|
|
13357
|
+
}, getFieldDecorator('itemCode', {})( /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
13358
|
+
label: "\u6211\u65B9\u5546\u54C1\u7F16\u7801"
|
|
13359
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Input, null)))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Col, {
|
|
13360
|
+
span: 12
|
|
13361
|
+
}, getFieldDecorator('itemCodeOther', {})( /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
13362
|
+
label: "\u5BF9\u65B9\u5546\u54C1\u7F16\u7801"
|
|
13363
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Input, null)))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Col, {
|
|
13364
|
+
span: 12
|
|
13365
|
+
}, getFieldDecorator('itemName', {
|
|
13366
|
+
rules: [{
|
|
13367
|
+
required: true,
|
|
13368
|
+
message: "请输入我方商品名称"
|
|
13369
|
+
}]
|
|
13370
|
+
})( /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
13371
|
+
label: "\u6211\u65B9\u5546\u54C1\u540D\u79F0"
|
|
13372
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Input, null)))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Col, {
|
|
13373
|
+
span: 12
|
|
13374
|
+
}, getFieldDecorator('itemNameOther', {
|
|
13375
|
+
rules: [{
|
|
13376
|
+
required: true,
|
|
13377
|
+
message: "请输入对方商品名称"
|
|
13378
|
+
}]
|
|
13379
|
+
})( /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
13380
|
+
label: "\u5BF9\u65B9\u5546\u54C1\u540D\u79F0"
|
|
13381
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Input, null)))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Col, {
|
|
13382
|
+
span: 12
|
|
13383
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
13384
|
+
label: "\u6211\u65B9\u89C4\u683C\u578B\u53F7"
|
|
13385
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Input, null))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Col, {
|
|
13386
|
+
span: 12
|
|
13387
|
+
}, getFieldDecorator('itemModelNameOther', {
|
|
13388
|
+
rules: [{
|
|
13389
|
+
required: true,
|
|
13390
|
+
message: "请输入对方规格型号"
|
|
13391
|
+
}]
|
|
13392
|
+
})( /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
13393
|
+
label: "\u5BF9\u65B9\u89C4\u683C\u578B\u53F7"
|
|
13394
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Input, null)))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Col, {
|
|
13395
|
+
span: 12
|
|
13396
|
+
}, getFieldDecorator('unit', {
|
|
13397
|
+
rules: [{
|
|
13398
|
+
required: true,
|
|
13399
|
+
message: "请输入对方规格型号"
|
|
13400
|
+
}]
|
|
13401
|
+
})( /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
13402
|
+
label: "\u6211\u65B9\u8BA1\u91CF\u5355\u4F4D"
|
|
13403
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Input, null)))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Col, {
|
|
13404
|
+
span: 12
|
|
13405
|
+
}, getFieldDecorator('unitOther', {
|
|
13406
|
+
rules: [{
|
|
13407
|
+
required: true,
|
|
13408
|
+
message: "请输入对方计量单位"
|
|
13409
|
+
}]
|
|
13410
|
+
})( /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
13411
|
+
label: "\u5BF9\u65B9\u8BA1\u91CF\u5355\u4F4D"
|
|
13412
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Input, null)))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Col, {
|
|
13413
|
+
span: 24
|
|
13414
|
+
}, getFieldDecorator('isUpdate', {})( /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Checkbox, null, "\u66F4\u65B0\u5230\u5546\u54C1\u5BF9\u7167\u8868\u4E2D")))))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
13415
|
+
style: {
|
|
13416
|
+
display: 'flex',
|
|
13417
|
+
justifyContent: 'flex-end',
|
|
13418
|
+
gap: 10
|
|
13419
|
+
}
|
|
13420
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Button, {
|
|
13421
|
+
type: "primary",
|
|
13422
|
+
onClick: onSubmit
|
|
13423
|
+
}, "\u63D0\u4EA4"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Button, {
|
|
13424
|
+
onClick: onClose
|
|
13425
|
+
}, "\u53D6\u6D88")));
|
|
13426
|
+
});
|
|
13427
|
+
|
|
13428
|
+
function validateFields$1(form) {
|
|
13429
|
+
return new Promise(function (resolve) {
|
|
13430
|
+
form.validateFields(function (err, values) {
|
|
13431
|
+
resolve({
|
|
13432
|
+
err: err,
|
|
13433
|
+
values: values
|
|
13434
|
+
});
|
|
13435
|
+
});
|
|
13436
|
+
});
|
|
13437
|
+
}
|
|
12661
13438
|
|
|
12662
13439
|
/** 发票组件的上下文 */
|
|
12663
13440
|
|
|
12664
13441
|
var InvoiceContext = /*#__PURE__*/React__default['default'].createContext(undefined);
|
|
12665
13442
|
|
|
12666
|
-
var
|
|
12667
|
-
_inherits(
|
|
13443
|
+
var Invoice = /*#__PURE__*/function (_React$PureComponent) {
|
|
13444
|
+
_inherits(Invoice, _React$PureComponent);
|
|
12668
13445
|
|
|
12669
|
-
var _super = _createSuper(
|
|
13446
|
+
var _super = _createSuper(Invoice);
|
|
12670
13447
|
|
|
12671
|
-
function
|
|
12672
|
-
_classCallCheck(this,
|
|
13448
|
+
function Invoice() {
|
|
13449
|
+
_classCallCheck(this, Invoice);
|
|
12673
13450
|
|
|
12674
13451
|
return _super.apply(this, arguments);
|
|
12675
13452
|
}
|
|
12676
13453
|
|
|
12677
|
-
_createClass(
|
|
13454
|
+
_createClass(Invoice, [{
|
|
12678
13455
|
key: "render",
|
|
12679
13456
|
value:
|
|
12680
13457
|
/** 控制器 */
|
|
@@ -12697,18 +13474,18 @@ var default_1 = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
12697
13474
|
}
|
|
12698
13475
|
}]);
|
|
12699
13476
|
|
|
12700
|
-
return
|
|
13477
|
+
return Invoice;
|
|
12701
13478
|
}(React__default['default'].PureComponent);
|
|
12702
13479
|
|
|
12703
|
-
|
|
12704
|
-
|
|
12705
|
-
|
|
12706
|
-
|
|
12707
|
-
|
|
12708
|
-
|
|
12709
|
-
|
|
13480
|
+
Invoice.InvoiceController = InvoiceController;
|
|
13481
|
+
Invoice.InvoiceHeader = InvoiceHeader;
|
|
13482
|
+
Invoice.GoodsList = GoodsList;
|
|
13483
|
+
Invoice.Seller = Buyer;
|
|
13484
|
+
Invoice.Sign = Sign;
|
|
13485
|
+
Invoice.Buyer = Buyer$1;
|
|
13486
|
+
Invoice.idGenerator = idGenerator;
|
|
12710
13487
|
|
|
12711
|
-
|
|
13488
|
+
Invoice.useInvoiceController = function () {
|
|
12712
13489
|
return React__default['default'].useContext(InvoiceContext);
|
|
12713
13490
|
};
|
|
12714
13491
|
|
|
@@ -12740,8 +13517,8 @@ var Main$3 = function Main(props) {
|
|
|
12740
13517
|
/** 销售方 */
|
|
12741
13518
|
, props.sign || /*#__PURE__*/React__default['default'].createElement(Sign, null)
|
|
12742
13519
|
/** 落款 */
|
|
12743
|
-
, props.footExpand), /*#__PURE__*/React__default['default'].createElement(ImportBuyerDrawer, null), /*#__PURE__*/React__default['default'].createElement(ImportGoodsDrawer, null), /*#__PURE__*/React__default['default'].createElement(EndowCodeDrawer, null));
|
|
13520
|
+
, props.footExpand), /*#__PURE__*/React__default['default'].createElement(ImportBuyerDrawer, null), /*#__PURE__*/React__default['default'].createElement(ImportGoodsDrawer, null), /*#__PURE__*/React__default['default'].createElement(EndowCodeDrawer, null), /*#__PURE__*/React__default['default'].createElement(AddComparisonDrawer, null));
|
|
12744
13521
|
};
|
|
12745
13522
|
|
|
12746
|
-
exports.Invoice =
|
|
13523
|
+
exports.Invoice = Invoice;
|
|
12747
13524
|
exports.InvoiceController = InvoiceController;
|