@kmkf-fe-packages/basic-components 0.11.0-alpha.0 → 0.11.0-alpha.2
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 +76 -14
- package/dist/index.js +76 -14
- package/dist/src/bs/SystemOrder/index.d.ts +1 -0
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -11164,26 +11164,43 @@ var BsReturnGoods = function BsReturnGoods(props) {
|
|
|
11164
11164
|
})));
|
|
11165
11165
|
};
|
|
11166
11166
|
|
|
11167
|
-
var
|
|
11168
|
-
|
|
11169
|
-
|
|
11170
|
-
|
|
11171
|
-
|
|
11172
|
-
|
|
11173
|
-
|
|
11174
|
-
|
|
11175
|
-
|
|
11176
|
-
}
|
|
11167
|
+
var columnsNameMap = {
|
|
11168
|
+
BS_SYSTEM_ORDER: {
|
|
11169
|
+
typeName: '单据类型',
|
|
11170
|
+
tagName: '标签'
|
|
11171
|
+
},
|
|
11172
|
+
WLN_SYSTEM_ORDER: {
|
|
11173
|
+
typeName: '订单类型',
|
|
11174
|
+
tagName: '标记'
|
|
11175
|
+
}
|
|
11176
|
+
};
|
|
11177
11177
|
var index = (function (props) {
|
|
11178
11178
|
var value = props.value,
|
|
11179
11179
|
_onChange = props.onChange,
|
|
11180
|
-
disabled = props.disabled
|
|
11180
|
+
disabled = props.disabled,
|
|
11181
|
+
type = props.type;
|
|
11181
11182
|
useEffect(function () {
|
|
11182
11183
|
var _value$orders, _value$showOrderInfo;
|
|
11183
11184
|
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
|
-
|
|
11185
|
+
if (type === 'BS_SYSTEM_ORDER') {
|
|
11186
|
+
getOrderList(value.orderNo);
|
|
11187
|
+
} else if (type === 'WLN_SYSTEM_ORDER') {
|
|
11188
|
+
getWlnOrderList(value.orderNo);
|
|
11189
|
+
}
|
|
11185
11190
|
}
|
|
11186
|
-
}, [value]);
|
|
11191
|
+
}, [value, type]);
|
|
11192
|
+
var columns = useMemo(function () {
|
|
11193
|
+
return [{
|
|
11194
|
+
dataIndex: 'billType',
|
|
11195
|
+
title: columnsNameMap[type].typeName
|
|
11196
|
+
}, {
|
|
11197
|
+
dataIndex: 'billNo',
|
|
11198
|
+
title: '系统订单号'
|
|
11199
|
+
}, {
|
|
11200
|
+
dataIndex: 'billTag',
|
|
11201
|
+
title: columnsNameMap[type].tagName
|
|
11202
|
+
}];
|
|
11203
|
+
}, [type]);
|
|
11187
11204
|
var getOrderList = /*#__PURE__*/function () {
|
|
11188
11205
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
11189
11206
|
var _yield$request, success, data;
|
|
@@ -11223,6 +11240,51 @@ var index = (function (props) {
|
|
|
11223
11240
|
return _ref.apply(this, arguments);
|
|
11224
11241
|
};
|
|
11225
11242
|
}();
|
|
11243
|
+
var getWlnOrderList = /*#__PURE__*/function () {
|
|
11244
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(orderNo) {
|
|
11245
|
+
var _yield$request2, success, data;
|
|
11246
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
11247
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
11248
|
+
case 0:
|
|
11249
|
+
_context2.next = 2;
|
|
11250
|
+
return extendRequest('/qy/gdfw/order/wlnOrderList', {
|
|
11251
|
+
method: 'post',
|
|
11252
|
+
data: {
|
|
11253
|
+
billCode: orderNo
|
|
11254
|
+
}
|
|
11255
|
+
});
|
|
11256
|
+
case 2:
|
|
11257
|
+
_yield$request2 = _context2.sent;
|
|
11258
|
+
success = _yield$request2.success;
|
|
11259
|
+
data = _yield$request2.data;
|
|
11260
|
+
if (success) {
|
|
11261
|
+
_onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
11262
|
+
orders: data === null || data === void 0 ? void 0 : data.orders.map(function (item) {
|
|
11263
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
11264
|
+
billNo: item.tradeNo,
|
|
11265
|
+
billType: item.tradeType,
|
|
11266
|
+
billTag: item.mark
|
|
11267
|
+
});
|
|
11268
|
+
}),
|
|
11269
|
+
showOrderInfo: data === null || data === void 0 ? void 0 : data.orders.map(function (item) {
|
|
11270
|
+
return {
|
|
11271
|
+
billNo: item.tradeNo,
|
|
11272
|
+
billType: item.tradeType,
|
|
11273
|
+
billTag: item.mark
|
|
11274
|
+
};
|
|
11275
|
+
})
|
|
11276
|
+
}));
|
|
11277
|
+
}
|
|
11278
|
+
case 6:
|
|
11279
|
+
case "end":
|
|
11280
|
+
return _context2.stop();
|
|
11281
|
+
}
|
|
11282
|
+
}, _callee2);
|
|
11283
|
+
}));
|
|
11284
|
+
return function getWlnOrderList(_x2) {
|
|
11285
|
+
return _ref2.apply(this, arguments);
|
|
11286
|
+
};
|
|
11287
|
+
}();
|
|
11226
11288
|
var rowSelection = {
|
|
11227
11289
|
selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
|
|
11228
11290
|
fixed: true,
|
|
@@ -11241,7 +11303,7 @@ var index = (function (props) {
|
|
|
11241
11303
|
};
|
|
11242
11304
|
return /*#__PURE__*/React.createElement(Table, {
|
|
11243
11305
|
dataSource: (value === null || value === void 0 ? void 0 : value.orders) || [],
|
|
11244
|
-
columns: columns
|
|
11306
|
+
columns: columns,
|
|
11245
11307
|
rowSelection: rowSelection,
|
|
11246
11308
|
rowKey: 'billNo',
|
|
11247
11309
|
size: "small",
|
package/dist/index.js
CHANGED
|
@@ -11175,26 +11175,43 @@ var BsReturnGoods = function BsReturnGoods(props) {
|
|
|
11175
11175
|
})));
|
|
11176
11176
|
};
|
|
11177
11177
|
|
|
11178
|
-
var
|
|
11179
|
-
|
|
11180
|
-
|
|
11181
|
-
|
|
11182
|
-
|
|
11183
|
-
|
|
11184
|
-
|
|
11185
|
-
|
|
11186
|
-
|
|
11187
|
-
}
|
|
11178
|
+
var columnsNameMap = {
|
|
11179
|
+
BS_SYSTEM_ORDER: {
|
|
11180
|
+
typeName: '单据类型',
|
|
11181
|
+
tagName: '标签'
|
|
11182
|
+
},
|
|
11183
|
+
WLN_SYSTEM_ORDER: {
|
|
11184
|
+
typeName: '订单类型',
|
|
11185
|
+
tagName: '标记'
|
|
11186
|
+
}
|
|
11187
|
+
};
|
|
11188
11188
|
var index = (function (props) {
|
|
11189
11189
|
var value = props.value,
|
|
11190
11190
|
_onChange = props.onChange,
|
|
11191
|
-
disabled = props.disabled
|
|
11191
|
+
disabled = props.disabled,
|
|
11192
|
+
type = props.type;
|
|
11192
11193
|
React.useEffect(function () {
|
|
11193
11194
|
var _value$orders, _value$showOrderInfo;
|
|
11194
11195
|
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
|
-
|
|
11196
|
+
if (type === 'BS_SYSTEM_ORDER') {
|
|
11197
|
+
getOrderList(value.orderNo);
|
|
11198
|
+
} else if (type === 'WLN_SYSTEM_ORDER') {
|
|
11199
|
+
getWlnOrderList(value.orderNo);
|
|
11200
|
+
}
|
|
11196
11201
|
}
|
|
11197
|
-
}, [value]);
|
|
11202
|
+
}, [value, type]);
|
|
11203
|
+
var columns = React.useMemo(function () {
|
|
11204
|
+
return [{
|
|
11205
|
+
dataIndex: 'billType',
|
|
11206
|
+
title: columnsNameMap[type].typeName
|
|
11207
|
+
}, {
|
|
11208
|
+
dataIndex: 'billNo',
|
|
11209
|
+
title: '系统订单号'
|
|
11210
|
+
}, {
|
|
11211
|
+
dataIndex: 'billTag',
|
|
11212
|
+
title: columnsNameMap[type].tagName
|
|
11213
|
+
}];
|
|
11214
|
+
}, [type]);
|
|
11198
11215
|
var getOrderList = /*#__PURE__*/function () {
|
|
11199
11216
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
11200
11217
|
var _yield$request, success, data;
|
|
@@ -11234,6 +11251,51 @@ var index = (function (props) {
|
|
|
11234
11251
|
return _ref.apply(this, arguments);
|
|
11235
11252
|
};
|
|
11236
11253
|
}();
|
|
11254
|
+
var getWlnOrderList = /*#__PURE__*/function () {
|
|
11255
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(orderNo) {
|
|
11256
|
+
var _yield$request2, success, data;
|
|
11257
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
11258
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
11259
|
+
case 0:
|
|
11260
|
+
_context2.next = 2;
|
|
11261
|
+
return extendRequest('/qy/gdfw/order/wlnOrderList', {
|
|
11262
|
+
method: 'post',
|
|
11263
|
+
data: {
|
|
11264
|
+
billCode: orderNo
|
|
11265
|
+
}
|
|
11266
|
+
});
|
|
11267
|
+
case 2:
|
|
11268
|
+
_yield$request2 = _context2.sent;
|
|
11269
|
+
success = _yield$request2.success;
|
|
11270
|
+
data = _yield$request2.data;
|
|
11271
|
+
if (success) {
|
|
11272
|
+
_onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
11273
|
+
orders: data === null || data === void 0 ? void 0 : data.orders.map(function (item) {
|
|
11274
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
11275
|
+
billNo: item.tradeNo,
|
|
11276
|
+
billType: item.tradeType,
|
|
11277
|
+
billTag: item.mark
|
|
11278
|
+
});
|
|
11279
|
+
}),
|
|
11280
|
+
showOrderInfo: data === null || data === void 0 ? void 0 : data.orders.map(function (item) {
|
|
11281
|
+
return {
|
|
11282
|
+
billNo: item.tradeNo,
|
|
11283
|
+
billType: item.tradeType,
|
|
11284
|
+
billTag: item.mark
|
|
11285
|
+
};
|
|
11286
|
+
})
|
|
11287
|
+
}));
|
|
11288
|
+
}
|
|
11289
|
+
case 6:
|
|
11290
|
+
case "end":
|
|
11291
|
+
return _context2.stop();
|
|
11292
|
+
}
|
|
11293
|
+
}, _callee2);
|
|
11294
|
+
}));
|
|
11295
|
+
return function getWlnOrderList(_x2) {
|
|
11296
|
+
return _ref2.apply(this, arguments);
|
|
11297
|
+
};
|
|
11298
|
+
}();
|
|
11237
11299
|
var rowSelection = {
|
|
11238
11300
|
selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
|
|
11239
11301
|
fixed: true,
|
|
@@ -11252,7 +11314,7 @@ var index = (function (props) {
|
|
|
11252
11314
|
};
|
|
11253
11315
|
return /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
11254
11316
|
dataSource: (value === null || value === void 0 ? void 0 : value.orders) || [],
|
|
11255
|
-
columns: columns
|
|
11317
|
+
columns: columns,
|
|
11256
11318
|
rowSelection: rowSelection,
|
|
11257
11319
|
rowKey: 'billNo',
|
|
11258
11320
|
size: "small",
|
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.2",
|
|
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.2",
|
|
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": "4082b35353767d77e58b4e29caed4360b03a7d86"
|
|
65
65
|
}
|