@kmkf-fe-packages/basic-components 0.11.0-alpha.0 → 0.11.0-alpha.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +89 -17
- package/dist/index.js +89 -17
- package/dist/src/bs/SystemOrder/index.d.ts +1 -0
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -9853,7 +9853,8 @@ var jstGoods = function jstGoods(props) {
|
|
|
9853
9853
|
return option.label.includes(input);
|
|
9854
9854
|
},
|
|
9855
9855
|
style: {
|
|
9856
|
-
minWidth: '100px'
|
|
9856
|
+
minWidth: '100px',
|
|
9857
|
+
maxWidth: '180px'
|
|
9857
9858
|
}
|
|
9858
9859
|
}) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React.createElement(Input, {
|
|
9859
9860
|
disabled: disabled,
|
|
@@ -11164,26 +11165,44 @@ var BsReturnGoods = function BsReturnGoods(props) {
|
|
|
11164
11165
|
})));
|
|
11165
11166
|
};
|
|
11166
11167
|
|
|
11167
|
-
var
|
|
11168
|
-
|
|
11169
|
-
|
|
11170
|
-
|
|
11171
|
-
|
|
11172
|
-
|
|
11173
|
-
|
|
11174
|
-
|
|
11175
|
-
|
|
11176
|
-
}
|
|
11168
|
+
var columnsNameMap = {
|
|
11169
|
+
BS_SYSTEM_ORDER: {
|
|
11170
|
+
typeName: '单据类型',
|
|
11171
|
+
tagName: '标签'
|
|
11172
|
+
},
|
|
11173
|
+
WLN_SYSTEM_ORDER: {
|
|
11174
|
+
typeName: '订单类型',
|
|
11175
|
+
tagName: '标记'
|
|
11176
|
+
}
|
|
11177
|
+
};
|
|
11177
11178
|
var index = (function (props) {
|
|
11178
11179
|
var value = props.value,
|
|
11179
11180
|
_onChange = props.onChange,
|
|
11180
|
-
disabled = props.disabled
|
|
11181
|
+
disabled = props.disabled,
|
|
11182
|
+
type = props.type;
|
|
11181
11183
|
useEffect(function () {
|
|
11182
11184
|
var _value$orders, _value$showOrderInfo;
|
|
11183
11185
|
if (!(value === null || value === void 0 ? void 0 : (_value$orders = value.orders) === null || _value$orders === void 0 ? void 0 : _value$orders.length) && (value === null || value === void 0 ? void 0 : value.orderNo) && (value === null || value === void 0 ? void 0 : (_value$showOrderInfo = value.showOrderInfo) === null || _value$showOrderInfo === void 0 ? void 0 : _value$showOrderInfo.length)) {
|
|
11184
|
-
|
|
11186
|
+
if (type === 'BS_SYSTEM_ORDER') {
|
|
11187
|
+
getOrderList(value.orderNo);
|
|
11188
|
+
} else if (type === 'WLN_SYSTEM_ORDER') {
|
|
11189
|
+
getWlnOrderList(value.orderNo);
|
|
11190
|
+
}
|
|
11185
11191
|
}
|
|
11186
|
-
}, [value]);
|
|
11192
|
+
}, [value, type]);
|
|
11193
|
+
var columns = useMemo(function () {
|
|
11194
|
+
var _columnsNameMap$type, _columnsNameMap$type2;
|
|
11195
|
+
return [{
|
|
11196
|
+
dataIndex: 'billType',
|
|
11197
|
+
title: columnsNameMap === null || columnsNameMap === void 0 ? void 0 : (_columnsNameMap$type = columnsNameMap[type]) === null || _columnsNameMap$type === void 0 ? void 0 : _columnsNameMap$type.typeName
|
|
11198
|
+
}, {
|
|
11199
|
+
dataIndex: 'billNo',
|
|
11200
|
+
title: '系统订单号'
|
|
11201
|
+
}, {
|
|
11202
|
+
dataIndex: 'billTag',
|
|
11203
|
+
title: columnsNameMap === null || columnsNameMap === void 0 ? void 0 : (_columnsNameMap$type2 = columnsNameMap[type]) === null || _columnsNameMap$type2 === void 0 ? void 0 : _columnsNameMap$type2.tagName
|
|
11204
|
+
}];
|
|
11205
|
+
}, [type]);
|
|
11187
11206
|
var getOrderList = /*#__PURE__*/function () {
|
|
11188
11207
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
11189
11208
|
var _yield$request, success, data;
|
|
@@ -11223,6 +11242,51 @@ var index = (function (props) {
|
|
|
11223
11242
|
return _ref.apply(this, arguments);
|
|
11224
11243
|
};
|
|
11225
11244
|
}();
|
|
11245
|
+
var getWlnOrderList = /*#__PURE__*/function () {
|
|
11246
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(orderNo) {
|
|
11247
|
+
var _yield$request2, success, data;
|
|
11248
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
11249
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
11250
|
+
case 0:
|
|
11251
|
+
_context2.next = 2;
|
|
11252
|
+
return extendRequest('/qy/gdfw/order/wlnOrderList', {
|
|
11253
|
+
method: 'post',
|
|
11254
|
+
data: {
|
|
11255
|
+
billCode: orderNo
|
|
11256
|
+
}
|
|
11257
|
+
});
|
|
11258
|
+
case 2:
|
|
11259
|
+
_yield$request2 = _context2.sent;
|
|
11260
|
+
success = _yield$request2.success;
|
|
11261
|
+
data = _yield$request2.data;
|
|
11262
|
+
if (success) {
|
|
11263
|
+
_onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
11264
|
+
orders: data === null || data === void 0 ? void 0 : data.orders.map(function (item) {
|
|
11265
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
11266
|
+
billNo: item.tradeNo,
|
|
11267
|
+
billType: item.tradeType,
|
|
11268
|
+
billTag: item.mark
|
|
11269
|
+
});
|
|
11270
|
+
}),
|
|
11271
|
+
showOrderInfo: data === null || data === void 0 ? void 0 : data.orders.map(function (item) {
|
|
11272
|
+
return {
|
|
11273
|
+
billNo: item.tradeNo,
|
|
11274
|
+
billType: item.tradeType,
|
|
11275
|
+
billTag: item.mark
|
|
11276
|
+
};
|
|
11277
|
+
})
|
|
11278
|
+
}));
|
|
11279
|
+
}
|
|
11280
|
+
case 6:
|
|
11281
|
+
case "end":
|
|
11282
|
+
return _context2.stop();
|
|
11283
|
+
}
|
|
11284
|
+
}, _callee2);
|
|
11285
|
+
}));
|
|
11286
|
+
return function getWlnOrderList(_x2) {
|
|
11287
|
+
return _ref2.apply(this, arguments);
|
|
11288
|
+
};
|
|
11289
|
+
}();
|
|
11226
11290
|
var rowSelection = {
|
|
11227
11291
|
selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
|
|
11228
11292
|
fixed: true,
|
|
@@ -11241,7 +11305,7 @@ var index = (function (props) {
|
|
|
11241
11305
|
};
|
|
11242
11306
|
return /*#__PURE__*/React.createElement(Table, {
|
|
11243
11307
|
dataSource: (value === null || value === void 0 ? void 0 : value.orders) || [],
|
|
11244
|
-
columns: columns
|
|
11308
|
+
columns: columns,
|
|
11245
11309
|
rowSelection: rowSelection,
|
|
11246
11310
|
rowKey: 'billNo',
|
|
11247
11311
|
size: "small",
|
|
@@ -11259,13 +11323,21 @@ var WlnGoods = function WlnGoods(props) {
|
|
|
11259
11323
|
var value = props.value,
|
|
11260
11324
|
disabled = props.disabled,
|
|
11261
11325
|
onChange = props.onChange;
|
|
11326
|
+
var changeHandle = function changeHandle(list) {
|
|
11327
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
11328
|
+
wlnGoods: list
|
|
11329
|
+
}));
|
|
11330
|
+
};
|
|
11262
11331
|
return /*#__PURE__*/React.createElement(GoodItem, _objectSpread2(_objectSpread2({
|
|
11263
11332
|
key: 'wlnGoods'
|
|
11264
11333
|
}, props), {}, {
|
|
11265
11334
|
disabled: disabled,
|
|
11266
|
-
value: value,
|
|
11335
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
11336
|
+
value: value === null || value === void 0 ? void 0 : value.wlnGoods,
|
|
11267
11337
|
showChangeBtn: false,
|
|
11268
|
-
onChange: onChange
|
|
11338
|
+
onChange: function onChange(val) {
|
|
11339
|
+
return changeHandle(val);
|
|
11340
|
+
}
|
|
11269
11341
|
}));
|
|
11270
11342
|
};
|
|
11271
11343
|
|
package/dist/index.js
CHANGED
|
@@ -9864,7 +9864,8 @@ var jstGoods = function jstGoods(props) {
|
|
|
9864
9864
|
return option.label.includes(input);
|
|
9865
9865
|
},
|
|
9866
9866
|
style: {
|
|
9867
|
-
minWidth: '100px'
|
|
9867
|
+
minWidth: '100px',
|
|
9868
|
+
maxWidth: '180px'
|
|
9868
9869
|
}
|
|
9869
9870
|
}) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
9870
9871
|
disabled: disabled,
|
|
@@ -11175,26 +11176,44 @@ var BsReturnGoods = function BsReturnGoods(props) {
|
|
|
11175
11176
|
})));
|
|
11176
11177
|
};
|
|
11177
11178
|
|
|
11178
|
-
var
|
|
11179
|
-
|
|
11180
|
-
|
|
11181
|
-
|
|
11182
|
-
|
|
11183
|
-
|
|
11184
|
-
|
|
11185
|
-
|
|
11186
|
-
|
|
11187
|
-
}
|
|
11179
|
+
var columnsNameMap = {
|
|
11180
|
+
BS_SYSTEM_ORDER: {
|
|
11181
|
+
typeName: '单据类型',
|
|
11182
|
+
tagName: '标签'
|
|
11183
|
+
},
|
|
11184
|
+
WLN_SYSTEM_ORDER: {
|
|
11185
|
+
typeName: '订单类型',
|
|
11186
|
+
tagName: '标记'
|
|
11187
|
+
}
|
|
11188
|
+
};
|
|
11188
11189
|
var index = (function (props) {
|
|
11189
11190
|
var value = props.value,
|
|
11190
11191
|
_onChange = props.onChange,
|
|
11191
|
-
disabled = props.disabled
|
|
11192
|
+
disabled = props.disabled,
|
|
11193
|
+
type = props.type;
|
|
11192
11194
|
React.useEffect(function () {
|
|
11193
11195
|
var _value$orders, _value$showOrderInfo;
|
|
11194
11196
|
if (!(value === null || value === void 0 ? void 0 : (_value$orders = value.orders) === null || _value$orders === void 0 ? void 0 : _value$orders.length) && (value === null || value === void 0 ? void 0 : value.orderNo) && (value === null || value === void 0 ? void 0 : (_value$showOrderInfo = value.showOrderInfo) === null || _value$showOrderInfo === void 0 ? void 0 : _value$showOrderInfo.length)) {
|
|
11195
|
-
|
|
11197
|
+
if (type === 'BS_SYSTEM_ORDER') {
|
|
11198
|
+
getOrderList(value.orderNo);
|
|
11199
|
+
} else if (type === 'WLN_SYSTEM_ORDER') {
|
|
11200
|
+
getWlnOrderList(value.orderNo);
|
|
11201
|
+
}
|
|
11196
11202
|
}
|
|
11197
|
-
}, [value]);
|
|
11203
|
+
}, [value, type]);
|
|
11204
|
+
var columns = React.useMemo(function () {
|
|
11205
|
+
var _columnsNameMap$type, _columnsNameMap$type2;
|
|
11206
|
+
return [{
|
|
11207
|
+
dataIndex: 'billType',
|
|
11208
|
+
title: columnsNameMap === null || columnsNameMap === void 0 ? void 0 : (_columnsNameMap$type = columnsNameMap[type]) === null || _columnsNameMap$type === void 0 ? void 0 : _columnsNameMap$type.typeName
|
|
11209
|
+
}, {
|
|
11210
|
+
dataIndex: 'billNo',
|
|
11211
|
+
title: '系统订单号'
|
|
11212
|
+
}, {
|
|
11213
|
+
dataIndex: 'billTag',
|
|
11214
|
+
title: columnsNameMap === null || columnsNameMap === void 0 ? void 0 : (_columnsNameMap$type2 = columnsNameMap[type]) === null || _columnsNameMap$type2 === void 0 ? void 0 : _columnsNameMap$type2.tagName
|
|
11215
|
+
}];
|
|
11216
|
+
}, [type]);
|
|
11198
11217
|
var getOrderList = /*#__PURE__*/function () {
|
|
11199
11218
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
11200
11219
|
var _yield$request, success, data;
|
|
@@ -11234,6 +11253,51 @@ var index = (function (props) {
|
|
|
11234
11253
|
return _ref.apply(this, arguments);
|
|
11235
11254
|
};
|
|
11236
11255
|
}();
|
|
11256
|
+
var getWlnOrderList = /*#__PURE__*/function () {
|
|
11257
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(orderNo) {
|
|
11258
|
+
var _yield$request2, success, data;
|
|
11259
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
11260
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
11261
|
+
case 0:
|
|
11262
|
+
_context2.next = 2;
|
|
11263
|
+
return extendRequest('/qy/gdfw/order/wlnOrderList', {
|
|
11264
|
+
method: 'post',
|
|
11265
|
+
data: {
|
|
11266
|
+
billCode: orderNo
|
|
11267
|
+
}
|
|
11268
|
+
});
|
|
11269
|
+
case 2:
|
|
11270
|
+
_yield$request2 = _context2.sent;
|
|
11271
|
+
success = _yield$request2.success;
|
|
11272
|
+
data = _yield$request2.data;
|
|
11273
|
+
if (success) {
|
|
11274
|
+
_onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
11275
|
+
orders: data === null || data === void 0 ? void 0 : data.orders.map(function (item) {
|
|
11276
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
11277
|
+
billNo: item.tradeNo,
|
|
11278
|
+
billType: item.tradeType,
|
|
11279
|
+
billTag: item.mark
|
|
11280
|
+
});
|
|
11281
|
+
}),
|
|
11282
|
+
showOrderInfo: data === null || data === void 0 ? void 0 : data.orders.map(function (item) {
|
|
11283
|
+
return {
|
|
11284
|
+
billNo: item.tradeNo,
|
|
11285
|
+
billType: item.tradeType,
|
|
11286
|
+
billTag: item.mark
|
|
11287
|
+
};
|
|
11288
|
+
})
|
|
11289
|
+
}));
|
|
11290
|
+
}
|
|
11291
|
+
case 6:
|
|
11292
|
+
case "end":
|
|
11293
|
+
return _context2.stop();
|
|
11294
|
+
}
|
|
11295
|
+
}, _callee2);
|
|
11296
|
+
}));
|
|
11297
|
+
return function getWlnOrderList(_x2) {
|
|
11298
|
+
return _ref2.apply(this, arguments);
|
|
11299
|
+
};
|
|
11300
|
+
}();
|
|
11237
11301
|
var rowSelection = {
|
|
11238
11302
|
selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
|
|
11239
11303
|
fixed: true,
|
|
@@ -11252,7 +11316,7 @@ var index = (function (props) {
|
|
|
11252
11316
|
};
|
|
11253
11317
|
return /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
11254
11318
|
dataSource: (value === null || value === void 0 ? void 0 : value.orders) || [],
|
|
11255
|
-
columns: columns
|
|
11319
|
+
columns: columns,
|
|
11256
11320
|
rowSelection: rowSelection,
|
|
11257
11321
|
rowKey: 'billNo',
|
|
11258
11322
|
size: "small",
|
|
@@ -11270,13 +11334,21 @@ var WlnGoods = function WlnGoods(props) {
|
|
|
11270
11334
|
var value = props.value,
|
|
11271
11335
|
disabled = props.disabled,
|
|
11272
11336
|
onChange = props.onChange;
|
|
11337
|
+
var changeHandle = function changeHandle(list) {
|
|
11338
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
11339
|
+
wlnGoods: list
|
|
11340
|
+
}));
|
|
11341
|
+
};
|
|
11273
11342
|
return /*#__PURE__*/React__default['default'].createElement(GoodItem, _objectSpread2(_objectSpread2({
|
|
11274
11343
|
key: 'wlnGoods'
|
|
11275
11344
|
}, props), {}, {
|
|
11276
11345
|
disabled: disabled,
|
|
11277
|
-
value: value,
|
|
11346
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
11347
|
+
value: value === null || value === void 0 ? void 0 : value.wlnGoods,
|
|
11278
11348
|
showChangeBtn: false,
|
|
11279
|
-
onChange: onChange
|
|
11349
|
+
onChange: function onChange(val) {
|
|
11350
|
+
return changeHandle(val);
|
|
11351
|
+
}
|
|
11280
11352
|
}));
|
|
11281
11353
|
};
|
|
11282
11354
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/basic-components",
|
|
3
|
-
"version": "0.11.0-alpha.
|
|
3
|
+
"version": "0.11.0-alpha.13",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"watch": "nodemon --ignore dist/ --ignore node_modules/ --watch src/ -C -e ts,tsx,less --debug -x 'yarn async'"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.11.0-alpha.
|
|
23
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.11.0-alpha.8",
|
|
24
24
|
"lodash": "^4.17.21",
|
|
25
25
|
"pubsub-js": "^1.9.4",
|
|
26
26
|
"react-copy-to-clipboard": "^5.1.0",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"access": "public"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "94d336ec667e9c1ed5d32f940d79d9517b88d36c"
|
|
65
65
|
}
|