kmkf-work-order-service-component 0.5.0-alpha.1 → 0.5.0-alpha.10

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.
Files changed (40) hide show
  1. package/dist/esm/FormRender/index.js +59 -20
  2. package/dist/esm/FormRender/index.less +1 -1
  3. package/dist/esm/SingleShopWorkOrder/components/Card/index.less +1 -1
  4. package/dist/esm/SingleShopWorkOrder/components/CustomizeFormModal/index.js +4 -4
  5. package/dist/esm/SingleShopWorkOrder/components/CustomizeFormModal/index.less +1 -1
  6. package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/components/CustomizeWorkOrderCard/index.js +25 -17
  7. package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/components/CustomizeWorkOrderCard/index.less +14 -2
  8. package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/components/RecordLog/index.js +2 -2
  9. package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/components/TemplateList/index.d.ts +11 -0
  10. package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/components/TemplateList/index.js +23 -0
  11. package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/components/TemplateList/index.less +17 -0
  12. package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/index.js +65 -47
  13. package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/index.less +26 -17
  14. package/dist/esm/WorkOrder/components/PaymentWorkOrderList/components/PaymentWorkOrderCard/index.js +56 -29
  15. package/dist/esm/WorkOrder/components/PaymentWorkOrderList/components/PaymentWorkOrderCard/index.less +12 -5
  16. package/dist/esm/WorkOrder/components/PaymentWorkOrderList/index.js +20 -18
  17. package/dist/esm/WorkOrder/components/PaymentWorkOrderList/index.less +11 -16
  18. package/dist/esm/WorkOrder/components/Widget/common/formItemWrap.d.ts +3 -1
  19. package/dist/esm/WorkOrder/components/Widget/common/formItemWrap.js +69 -10
  20. package/dist/esm/WorkOrder/components/Widget/index.d.ts +5 -1
  21. package/dist/esm/WorkOrder/components/Widget/index.js +16 -0
  22. package/dist/esm/WorkOrder/components/Widget/jst/JstItemSelect/index.d.ts +17 -0
  23. package/dist/esm/WorkOrder/components/Widget/jst/JstItemSelect/index.js +128 -0
  24. package/dist/esm/WorkOrder/components/Widget/jst/JstLogistics/index.d.ts +14 -0
  25. package/dist/esm/WorkOrder/components/Widget/jst/JstLogistics/index.js +120 -0
  26. package/dist/esm/WorkOrder/components/Widget/jst/JstSendGood/index.d.ts +14 -0
  27. package/dist/esm/WorkOrder/components/Widget/jst/JstSendGood/index.js +128 -0
  28. package/dist/esm/WorkOrder/components/Widget/jst/JstSupply/index.d.ts +14 -0
  29. package/dist/esm/WorkOrder/components/Widget/jst/JstSupply/index.js +128 -0
  30. package/dist/esm/WorkOrder/index.js +26 -15
  31. package/dist/esm/WorkOrder/index.less +3 -2
  32. package/dist/esm/common/utils/express.d.ts +1 -0
  33. package/dist/esm/common/utils/express.js +7 -1
  34. package/dist/esm/common/utils/tools.d.ts +4 -1
  35. package/dist/esm/common/utils/tools.js +427 -181
  36. package/dist/esm/model/customizeWorkOrder/index.d.ts +1 -1
  37. package/dist/esm/model/servers/api.d.ts +1 -0
  38. package/dist/esm/model/servers/api.js +8 -0
  39. package/dist/esm/model/workOrder.js +1 -0
  40. package/package.json +2 -2
@@ -7,10 +7,11 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
7
7
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
8
8
 
9
9
  import React from 'react';
10
- import { Divider, Modal } from 'antd';
10
+ import { Divider, Modal, Button, message, Tooltip } from 'antd';
11
11
  import moment from 'moment';
12
+ import copy from 'copy-to-clipboard';
13
+ import { useAppSelector, useAppDispatch } from "../../../../../model/hooks";
12
14
  import { useDispatch } from 'react-redux';
13
- import { useAppDispatch } from "../../../../../model/hooks";
14
15
  import { setPaymentWorkOrderExamineModalVisible, setCurrentPaymentRecord, setPaymentWorkOrderUnExamineModalVisible, setDeletePaymentWorkOrderVisible, setFlagPayModalVisible, setLogModalVisible, setPaymentFormModalVisible, setRepeatModalVisible, setRepeatWorkOrderList } from "../../../../../model/paymentWorkOrder";
15
16
  import { getAlipayBillReceipt } from "../../../../../model/servers/api";
16
17
  import repeatPng from "../../../../../assets/repeat.png";
@@ -84,22 +85,30 @@ var WorkOrderId = function WorkOrderId(props) {
84
85
  };
85
86
 
86
87
  return /*#__PURE__*/_jsxs("div", {
87
- className: "orderItemView",
88
+ className: "paymentOrderItemView",
88
89
  children: [/*#__PURE__*/_jsx("span", {
89
90
  className: "itemViewLeft",
90
91
  children: props.label
91
- }), /*#__PURE__*/_jsxs("span", {
92
+ }), /*#__PURE__*/_jsx("span", {
92
93
  className: "itemViewRight",
93
- children: [((_props$tidRepeatPayme = props.tidRepeatPaymentUks) === null || _props$tidRepeatPayme === void 0 ? void 0 : _props$tidRepeatPayme.length) > 1 && /*#__PURE__*/_jsx("img", {
94
- src: repeatPng,
95
- style: {
96
- width: '16px'
97
- },
98
- alt: "",
99
- onClick: function onClick() {
100
- return handleOpenRepeatModal(props.tidRepeatPaymentUks);
101
- }
102
- }), props.value]
94
+ children: /*#__PURE__*/_jsxs("div", {
95
+ className: "item-view-tradeId",
96
+ children: [((_props$tidRepeatPayme = props.tidRepeatPaymentUks) === null || _props$tidRepeatPayme === void 0 ? void 0 : _props$tidRepeatPayme.length) > 1 && /*#__PURE__*/_jsx("img", {
97
+ src: repeatPng,
98
+ style: {
99
+ width: '16px'
100
+ },
101
+ alt: "",
102
+ onClick: function onClick() {
103
+ return handleOpenRepeatModal(props.tidRepeatPaymentUks);
104
+ }
105
+ }), /*#__PURE__*/_jsx(Tooltip, {
106
+ title: props.value,
107
+ children: /*#__PURE__*/_jsx("span", {
108
+ children: props.value
109
+ })
110
+ })]
111
+ })
103
112
  })]
104
113
  });
105
114
  };
@@ -108,6 +117,9 @@ function PaymentWorkOrderCard(props) {
108
117
  var _props$record = props.record,
109
118
  record = _props$record === void 0 ? {} : _props$record;
110
119
  var dispatch = useAppDispatch();
120
+ var platformInfo = useAppSelector(function (state) {
121
+ return state.global.platformInfo;
122
+ });
111
123
  var workPayStatusDesc = record.workPayStatusDesc,
112
124
  workPayStatus = record.workPayStatus,
113
125
  operateTime = record.operateTime,
@@ -201,7 +213,7 @@ function PaymentWorkOrderCard(props) {
201
213
 
202
214
  var voucherHandle = /*#__PURE__*/function () {
203
215
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(record) {
204
- var params, res, data, message;
216
+ var params, res, data, msg;
205
217
  return _regeneratorRuntime().wrap(function _callee$(_context) {
206
218
  while (1) {
207
219
  switch (_context.prev = _context.next) {
@@ -215,19 +227,34 @@ function PaymentWorkOrderCard(props) {
215
227
 
216
228
  case 3:
217
229
  res = _context.sent;
218
- console.log(res);
219
- data = res.data, message = res.message;
230
+ data = res.data, msg = res.message;
220
231
 
221
232
  if (data) {
222
- window.open(data);
233
+ if (['fxg'].includes(platformInfo === null || platformInfo === void 0 ? void 0 : platformInfo.platform)) {
234
+ Modal.info({
235
+ title: '付款凭证',
236
+ content: /*#__PURE__*/_jsxs("div", {
237
+ children: ["\u8BF7\u590D\u5236\u94FE\u63A5\u5728\u6D4F\u89C8\u5668\u4E0A\u6253\u5F00\uFF0C\u94FE\u63A5\uFF1A".concat(data), ' ', /*#__PURE__*/_jsx(Button, {
238
+ type: "primary",
239
+ onClick: function onClick() {
240
+ copy(data);
241
+ message.success('复制成功');
242
+ },
243
+ children: "\u70B9\u51FB\u590D\u5236"
244
+ })]
245
+ })
246
+ });
247
+ } else {
248
+ window.open(data);
249
+ }
223
250
  } else {
224
251
  Modal.info({
225
252
  title: '付款凭证',
226
- content: message
253
+ content: msg
227
254
  });
228
255
  }
229
256
 
230
- case 7:
257
+ case 6:
231
258
  case "end":
232
259
  return _context.stop();
233
260
  }
@@ -291,13 +318,13 @@ function PaymentWorkOrderCard(props) {
291
318
  }), /*#__PURE__*/_jsx("div", {
292
319
  className: "workOrderInfo",
293
320
  children: renderFormItem([{
294
- label: '提交时间:',
321
+ label: '提交时间:',
295
322
  value: moment(operateTime).format('YYYY-MM-DD HH:mm:ss')
296
323
  }, {
297
- label: '提交客服:',
324
+ label: '提交客服:',
298
325
  value: operateNick
299
326
  }, {
300
- label: '打款时间:',
327
+ label: '打款时间:',
301
328
  value: remitTime ? moment(remitTime).format('YYYY-MM-DD HH:mm:ss') : ''
302
329
  }])
303
330
  }), /*#__PURE__*/_jsx(Divider, {
@@ -308,22 +335,22 @@ function PaymentWorkOrderCard(props) {
308
335
  }), /*#__PURE__*/_jsxs("div", {
309
336
  className: "paymentInfo",
310
337
  children: [renderFormItem([{
311
- label: '打款金额:',
338
+ label: '打款金额:',
312
339
  value: "\xA5 ".concat(workPayFee)
313
340
  }, {
314
- label: '店铺名称:',
341
+ label: '店铺名称:',
315
342
  value: shopName
316
343
  }, {
317
- label: '买家昵称:',
344
+ label: '买家昵称:',
318
345
  value: buyerNick
319
346
  }, {
320
- label: '订单编号:',
347
+ label: '订单编号:',
321
348
  value: tid
322
349
  }, {
323
- label: '支付宝名称:',
350
+ label: '支付宝名称:',
324
351
  value: accountNickMix
325
352
  }, {
326
- label: '支付宝账号:',
353
+ label: '支付宝账号:',
327
354
  value: accountNoMix
328
355
  }]), /*#__PURE__*/_jsx(WorkOrderId, {
329
356
  label: "\u5DE5\u5355\u7F16\u53F7\uFF1A",
@@ -102,7 +102,7 @@
102
102
  border-bottom: 1px dashed rgba(0, 0, 0, 0.15);
103
103
  }
104
104
 
105
- .orderItemView {
105
+ .paymentOrderItemView {
106
106
  display: flex;
107
107
  align-items: center;
108
108
  margin: 6px 0;
@@ -116,14 +116,21 @@
116
116
  }
117
117
 
118
118
  .itemViewRight {
119
- display: flex;
120
119
  flex-grow: 1;
121
- align-items: center;
122
120
  min-width: 0;
123
121
  color: rgba(0, 0, 0, 0.85);
124
122
  word-break: break-all;
125
- img {
126
- margin-right: 8px;
123
+ .item-view-tradeId {
124
+ display: flex;
125
+ align-items: center;
126
+ img {
127
+ margin-right: 8px;
128
+ }
129
+ span {
130
+ overflow: hidden;
131
+ white-space: nowrap;
132
+ text-overflow: ellipsis;
133
+ }
127
134
  }
128
135
  }
129
136
  }
@@ -259,7 +259,8 @@ var PaymentWorkOrderList = function PaymentWorkOrderList(_ref) {
259
259
  return /*#__PURE__*/_jsxs("div", {
260
260
  className: "custom_box",
261
261
  style: {
262
- display: tabActive === 'payment' ? 'block' : 'none'
262
+ display: tabActive === 'payment' ? 'flex' : 'none',
263
+ flexDirection: 'column'
263
264
  },
264
265
  children: [/*#__PURE__*/_jsxs("div", {
265
266
  className: "bottom-actions",
@@ -275,9 +276,9 @@ var PaymentWorkOrderList = function PaymentWorkOrderList(_ref) {
275
276
  onClick: handleAddPaymentWorkOrder,
276
277
  children: "+\u65B0\u5EFA\u5DE5\u5355"
277
278
  })]
278
- }), searchForm, /*#__PURE__*/_jsx("div", {
279
- className: "payment_box_main payment_box_main_".concat(platform),
280
- children: payOrderList.length ? payOrderList.map(function (item) {
279
+ }), searchForm, /*#__PURE__*/_jsxs("div", {
280
+ className: "payment_box_main",
281
+ children: [payOrderList.length ? payOrderList.map(function (item) {
281
282
  return /*#__PURE__*/_jsx(PaymentWorkOrderCard, {
282
283
  record: item
283
284
  }, item.id);
@@ -291,20 +292,21 @@ var PaymentWorkOrderList = function PaymentWorkOrderList(_ref) {
291
292
  children: "\u6682\u65E0\u6570\u636E"
292
293
  })]
293
294
  })
294
- })
295
- }), /*#__PURE__*/_jsx("div", {
296
- className: "custom_box_page",
297
- children: /*#__PURE__*/_jsx(Pagination, {
298
- showQuickJumper: true,
299
- showSizeChanger: false,
300
- showTotal: function showTotal(total) {
301
- return "\u5171".concat(total, "\u6761");
302
- },
303
- current: paySearch.pageNo,
304
- pageSize: paySearch.pageSize,
305
- total: total,
306
- onChange: onChangePage
307
- })
295
+ }), /*#__PURE__*/_jsx("div", {
296
+ className: "payment_box_page",
297
+ children: /*#__PURE__*/_jsx(Pagination, {
298
+ size: "small",
299
+ showQuickJumper: true,
300
+ showSizeChanger: false,
301
+ showTotal: function showTotal(total) {
302
+ return "\u5171".concat(total, "\u6761");
303
+ },
304
+ current: paySearch.pageNo,
305
+ pageSize: paySearch.pageSize,
306
+ total: total,
307
+ onChange: onChangePage
308
+ })
309
+ })]
308
310
  }), /*#__PURE__*/_jsx(ExamineModal, {}), /*#__PURE__*/_jsx(UnExamineModal, {}), /*#__PURE__*/_jsx(DeletePaymentWorkOrderModal, {}), /*#__PURE__*/_jsx(FlagPayModal, {}), /*#__PURE__*/_jsx(RecordModal, {
309
311
  width: platform === PlatForm.XIAOZHI ? '100%' : '90%'
310
312
  }), /*#__PURE__*/_jsx(PaymentFormModal, {
@@ -103,12 +103,6 @@
103
103
  }
104
104
  }
105
105
 
106
- .custom_box_main {
107
- height: calc(100vh - 338px);
108
- overflow: auto;
109
- background-color: #fafafa;
110
- }
111
-
112
106
  .custom_box_main_fxg {
113
107
  height: calc(100vh - 446px);
114
108
  }
@@ -128,21 +122,22 @@
128
122
  }
129
123
 
130
124
  .payment_box_main {
131
- height: calc(100vh - 236px);
125
+ display: flex;
126
+ flex: 1 1 auto;
127
+ flex-direction: column;
128
+ justify-content: space-between;
129
+ margin-top: 8px;
130
+ margin-bottom: 40px;
131
+ overflow: auto;
132
132
  overflow: auto;
133
133
  background-color: #fafafa;
134
134
  }
135
135
 
136
- .payment_box_main_fxg {
137
- height: calc(100vh - 340px);
138
- }
139
-
140
- .payment_box_main_ks {
141
- height: calc(100vh - 436px);
142
- }
143
-
144
- .custom_box_page {
136
+ .payment_box_page {
137
+ position: absolute;
138
+ bottom: 0;
145
139
  display: flex;
140
+ align-items: center;
146
141
  justify-content: flex-end;
147
142
  width: 100%;
148
143
  height: 40px;
@@ -7,10 +7,12 @@ declare type getFormItemProps = {
7
7
  component: JSX.Element | string | null;
8
8
  };
9
9
  export declare const getFormItem: ({ name, title, rules, required, component }: getFormItemProps) => JSX.Element;
10
- export declare const showImage: ({ item, type }: {
10
+ export declare const showImage: ({ item, type, index }: {
11
11
  item: any;
12
12
  type: string;
13
+ index: number;
13
14
  }) => JSX.Element;
14
15
  export declare const ShowTotalImage: ({ total, allImage, type }: any) => JSX.Element;
15
16
  export declare const GoodImage: ({ list, type }: any) => JSX.Element | null;
17
+ export declare const JstGoodImage: ({ list, type }: any) => any;
16
18
  export {};
@@ -10,8 +10,9 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
10
10
 
11
11
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
12
 
13
- import { Form, Button, Modal, Tooltip } from 'antd';
13
+ import { Form, Button, Modal, Tooltip, Space, Image, Popover } from 'antd';
14
14
  import React, { useState } from 'react';
15
+ import express from "../../../../common/utils/express";
15
16
  import styles from "./index.module.less";
16
17
  import defaultImg from "../../../../common/imgs/default-img.png";
17
18
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -50,7 +51,8 @@ export var getFormItem = function getFormItem(_ref) {
50
51
 
51
52
  export var showImage = function showImage(_ref2) {
52
53
  var item = _ref2.item,
53
- type = _ref2.type;
54
+ type = _ref2.type,
55
+ index = _ref2.index;
54
56
  var picUrl = item.picUrl ? (item === null || item === void 0 ? void 0 : item.platform) !== 'tabao' ? item.picUrl : item.picUrl + '_40x40.jpg' : defaultImg;
55
57
  return /*#__PURE__*/_jsxs("div", {
56
58
  className: styles.goodImgBox,
@@ -80,10 +82,10 @@ export var showImage = function showImage(_ref2) {
80
82
  }), type === 'itemCode' && /*#__PURE__*/_jsx(TextTool, {
81
83
  title: '商品编码',
82
84
  text: item.outerId
83
- }), type === 'itemThird' && (item.itemId || item.supplierItemOuterId) && /*#__PURE__*/_jsx(TextTool, {
85
+ }), (type === 'itemThird' || type === 'jstItemThird') && (item.itemId || item.supplierItemOuterId) && /*#__PURE__*/_jsx(TextTool, {
84
86
  title: '供应商编码',
85
87
  text: item.itemId || item.supplierItemOuterId
86
- }), type === 'itemThird' && item.supplierName && /*#__PURE__*/_jsx(TextTool, {
88
+ }), (type === 'itemThird' || type === 'jstItemThird') && item.supplierName && /*#__PURE__*/_jsx(TextTool, {
87
89
  title: '供应商名称',
88
90
  text: item.supplierName
89
91
  }), item.propertiesName && /*#__PURE__*/_jsx(TextTool, {
@@ -91,7 +93,7 @@ export var showImage = function showImage(_ref2) {
91
93
  text: item.propertiesName
92
94
  })]
93
95
  })]
94
- });
96
+ }, index);
95
97
  }; //文字提示
96
98
 
97
99
  var TextTool = function TextTool(_ref3) {
@@ -100,7 +102,7 @@ var TextTool = function TextTool(_ref3) {
100
102
  return /*#__PURE__*/_jsx(Tooltip, {
101
103
  placement: "topLeft",
102
104
  title: text,
103
- children: /*#__PURE__*/_jsxs("p", {
105
+ children: /*#__PURE__*/_jsxs("div", {
104
106
  style: {
105
107
  overflow: 'hidden',
106
108
  whiteSpace: 'nowrap',
@@ -173,10 +175,10 @@ export var ShowTotalImage = function ShowTotalImage(_ref4) {
173
175
  }), type === 'itemCode' && /*#__PURE__*/_jsx(TextTool, {
174
176
  title: '商品编码',
175
177
  text: i.outerId
176
- }), type === 'itemThird' && (i.itemId || i.supplierItemOuterId) && /*#__PURE__*/_jsx(TextTool, {
178
+ }), (type === 'itemThird' || type === 'jstItemThird') && (i.itemId || i.supplierItemOuterId) && /*#__PURE__*/_jsx(TextTool, {
177
179
  title: '供应商编码',
178
180
  text: i.itemId || i.supplierItemOuterId
179
- }), type === 'itemThird' && i.supplierName && /*#__PURE__*/_jsx(TextTool, {
181
+ }), (type === 'itemThird' || type === 'jstItemThird') && i.supplierName && /*#__PURE__*/_jsx(TextTool, {
180
182
  title: '供应商名称',
181
183
  text: i.supplierName
182
184
  }), i.propertiesName && /*#__PURE__*/_jsx(TextTool, {
@@ -203,10 +205,11 @@ export var GoodImage = function GoodImage(_ref5) {
203
205
  style: {
204
206
  display: type === 'itemSelect' ? 'flex' : 'block'
205
207
  },
206
- children: [list === null || list === void 0 ? void 0 : (_list$slice = list.slice(0, initShowTotal)) === null || _list$slice === void 0 ? void 0 : _list$slice.map(function (item) {
208
+ children: [list === null || list === void 0 ? void 0 : (_list$slice = list.slice(0, initShowTotal)) === null || _list$slice === void 0 ? void 0 : _list$slice.map(function (item, index) {
207
209
  return showImage({
208
210
  item: item,
209
- type: type
211
+ type: type,
212
+ index: index
210
213
  });
211
214
  }), total > initShowTotal && /*#__PURE__*/_jsx(ShowTotalImage, {
212
215
  total: total,
@@ -214,4 +217,60 @@ export var GoodImage = function GoodImage(_ref5) {
214
217
  type: type
215
218
  })]
216
219
  }) : null;
220
+ };
221
+
222
+ var content = function content(item, index) {
223
+ return /*#__PURE__*/_jsxs("div", {
224
+ children: [/*#__PURE__*/_jsx("div", {
225
+ style: {
226
+ textAlign: 'center'
227
+ },
228
+ children: "\u5305\u88F9".concat(index + 1, "\u5546\u54C1\u4FE1\u606F")
229
+ }), ((item === null || item === void 0 ? void 0 : item.items) || []).map(function (t, index) {
230
+ return /*#__PURE__*/_jsx("div", {
231
+ children: /*#__PURE__*/_jsxs(Space, {
232
+ children: [/*#__PURE__*/_jsx(Image, {
233
+ width: 70,
234
+ src: t.picUrl,
235
+ preview: false
236
+ }), /*#__PURE__*/_jsxs("div", {
237
+ children: [/*#__PURE__*/_jsx("div", {
238
+ children: t.title
239
+ }), /*#__PURE__*/_jsxs("div", {
240
+ children: ["\u7F16\u7801\uFF1A", t.skuId]
241
+ })]
242
+ })]
243
+ })
244
+ }, index);
245
+ })]
246
+ });
247
+ };
248
+
249
+ export var JstGoodImage = function JstGoodImage(_ref6) {
250
+ var list = _ref6.list,
251
+ type = _ref6.type;
252
+ return list.length ? (list || []).map(function (item, index) {
253
+ var logisticsCompany = item.logisticsCompany;
254
+ var company = express.getExpressNameByCode(logisticsCompany);
255
+ return /*#__PURE__*/_jsx("div", {
256
+ children: /*#__PURE__*/_jsxs(Space, {
257
+ children: [/*#__PURE__*/_jsx(Popover, {
258
+ content: content(item, index),
259
+ children: /*#__PURE__*/_jsxs("span", {
260
+ style: {
261
+ color: '#1890ff',
262
+ cursor: 'pointer'
263
+ },
264
+ children: ["\u5305\u88F9".concat(index + 1), ":"]
265
+ }, index)
266
+ }), type === 1 ? /*#__PURE__*/_jsx("span", {
267
+ children: company && item.logisticsCode ? [company, item.logisticsCode].join('/') : company ? company : item.logisticsCode
268
+ }) : null, type === 2 ? /*#__PURE__*/_jsx("span", {
269
+ children: item.supplyName && item.supplyId ? [item.supplyId, item.supplyName].join('/') : item.supplyId ? item.supplyId : item.supplyName
270
+ }) : null, type === 3 ? /*#__PURE__*/_jsx("span", {
271
+ children: item.sendName && item.sendId ? [item.sendId, item.sendName].join('/') : item.sendId ? item.sendId : item.sendName
272
+ }) : null]
273
+ })
274
+ });
275
+ }) : null;
217
276
  };
@@ -24,4 +24,8 @@ import Status from '../Widget/third/Status';
24
24
  import Ordinary from '../Widget/third/Ordinary';
25
25
  import ItemSelectThird from '../Widget/third/ItemSelect';
26
26
  import Payment from '../Widget/third/Payment';
27
- export declare const factory: (type: string, options: any) => BasicInput | BasicRadio | BasicTextArea | BasicCheckBox | BasicDateTime | BasicSelect | BasicPicture | BasicMultSelect | BasicCascader | BasicAddress | BasicGrade | BasicRate | CommonDataTime | EBuyerNick | EReceiverAddress | ELogistics | EReturnLogistics | ERemark | EItemSelect | EItemId | EItemEncode | EAlipay | Status | Ordinary | ItemSelectThird | Payment;
27
+ import JstLogistics from './jst/JstLogistics';
28
+ import JstItemSelect from './jst/JstItemSelect';
29
+ import JstSupply from './jst/JstSupply';
30
+ import JstSendGood from './jst/JstSendGood';
31
+ export declare const factory: (type: string, options: any) => BasicInput | BasicRadio | BasicTextArea | BasicCheckBox | BasicDateTime | BasicSelect | BasicPicture | BasicMultSelect | BasicCascader | BasicAddress | BasicGrade | BasicRate | CommonDataTime | EBuyerNick | EReceiverAddress | ELogistics | EReturnLogistics | ERemark | EItemSelect | EItemId | EItemEncode | EAlipay | Status | Ordinary | ItemSelectThird | Payment | JstLogistics | JstItemSelect | JstSupply | JstSendGood;
@@ -31,6 +31,10 @@ import Ordinary from "../Widget/third/Ordinary";
31
31
  import ItemSelectThird from "../Widget/third/ItemSelect";
32
32
  import Payment from "../Widget/third/Payment";
33
33
  import SystemOrderNo from "../Widget/third/SystemOrderNo";
34
+ import JstLogistics from "./jst/JstLogistics";
35
+ import JstItemSelect from "./jst/JstItemSelect";
36
+ import JstSupply from "./jst/JstSupply";
37
+ import JstSendGood from "./jst/JstSendGood";
34
38
  export var factory = function factory(type, options) {
35
39
  switch (type) {
36
40
  case 'INPUT':
@@ -141,6 +145,18 @@ export var factory = function factory(type, options) {
141
145
  case 'UPDATE_DATETIME':
142
146
  return new CommonDataTime(options);
143
147
 
148
+ case 'JST_LOGISTICS':
149
+ return new JstLogistics(options);
150
+
151
+ case 'JST_ITEM_SELECT_THIRD':
152
+ return new JstItemSelect(options);
153
+
154
+ case 'JST_SUPPLY':
155
+ return new JstSupply(options);
156
+
157
+ case 'JST_SEND_GOOD':
158
+ return new JstSendGood(options);
159
+
144
160
  default:
145
161
  return new BasicInput(options);
146
162
  }
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ import BasicComponent from '../../BasicComponent';
3
+ declare class JstItemSelectThird extends BasicComponent {
4
+ constructor(options: any);
5
+ render: (value: any, record: any) => JSX.Element;
6
+ customRules: (config: {
7
+ enableItemId: any;
8
+ enableSupplierName: any;
9
+ }) => {
10
+ required: boolean;
11
+ validator: (_: any, value: any) => Promise<void>;
12
+ }[];
13
+ editRender: (value: any) => JSX.Element;
14
+ renderExport: (value: any, record: any) => any;
15
+ getColumns: () => any;
16
+ }
17
+ export default JstItemSelectThird;
@@ -0,0 +1,128 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+
3
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
+
5
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
+
7
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
8
+
9
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
10
+
11
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
12
+
13
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
14
+
15
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
16
+
17
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
18
+
19
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
20
+
21
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
22
+
23
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
24
+
25
+ function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
26
+
27
+ function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
28
+
29
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
30
+
31
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
32
+
33
+ import React from 'react';
34
+ import BasicComponent from "../../BasicComponent";
35
+ import { getFormItem, GoodImage } from "../../common/formItemWrap";
36
+ import { JstItemList } from '@raycloud-apaas-fe-setup/apaas-react-basics-widgets';
37
+ import { jsx as _jsx } from "react/jsx-runtime";
38
+
39
+ var JstItemSelectThird = /*#__PURE__*/function (_BasicComponent) {
40
+ _inherits(JstItemSelectThird, _BasicComponent);
41
+
42
+ var _super = _createSuper(JstItemSelectThird);
43
+
44
+ function JstItemSelectThird(options) {
45
+ var _thisSuper, _this;
46
+
47
+ _classCallCheck(this, JstItemSelectThird);
48
+
49
+ _this = _super.call(this, options);
50
+
51
+ _defineProperty(_assertThisInitialized(_this), "render", function (value, record) {
52
+ //兼容多个商品
53
+ return /*#__PURE__*/_jsx(GoodImage, {
54
+ list: value,
55
+ type: "jstItemThird"
56
+ });
57
+ });
58
+
59
+ _defineProperty(_assertThisInitialized(_this), "customRules", function (config) {
60
+ return [{
61
+ required: true,
62
+ validator: function validator(_, value) {
63
+ if (!value || !value.length) {
64
+ return Promise.reject(new Error('请选择宝贝'));
65
+ }
66
+
67
+ var hasNotId = (value || []).some(function (item) {
68
+ return !item.itemId;
69
+ });
70
+
71
+ if (config.enableItemId && hasNotId) {
72
+ return Promise.reject(new Error('请输入供应商编码'));
73
+ }
74
+
75
+ var hasNotName = (value || []).some(function (item) {
76
+ return !item.supplierName;
77
+ });
78
+
79
+ if (config.enableSupplierName && hasNotName) {
80
+ return Promise.reject(new Error('请输入供应商名称'));
81
+ }
82
+
83
+ return Promise.resolve();
84
+ }
85
+ }];
86
+ });
87
+
88
+ _defineProperty(_assertThisInitialized(_this), "editRender", function (value) {
89
+ var _assertThisInitialize, _assertThisInitialize2, _assertThisInitialize3;
90
+
91
+ return getFormItem(_objectSpread({
92
+ title: _this.name,
93
+ name: _this.id,
94
+ rules: (_assertThisInitialize = _assertThisInitialized(_this)) !== null && _assertThisInitialize !== void 0 && (_assertThisInitialize2 = _assertThisInitialize.componentConfig) !== null && _assertThisInitialize2 !== void 0 && _assertThisInitialize2.required ? _this.customRules((_assertThisInitialize3 = _assertThisInitialized(_this)) === null || _assertThisInitialize3 === void 0 ? void 0 : _assertThisInitialize3.componentConfig) : [],
95
+ required: false,
96
+ component: /*#__PURE__*/_jsx(JstItemList, _objectSpread(_objectSpread({}, _this.componentConfig), {}, {
97
+ width: "90%"
98
+ }))
99
+ }, value));
100
+ });
101
+
102
+ _defineProperty(_assertThisInitialized(_this), "renderExport", function (value, record) {
103
+ return value.map(function (item) {
104
+ return "jst\u4F9B\u5E94\u5546\u7F16\u7801:".concat(item.itemId || '', "\n jst\u4F9B\u5E94\u5546\u540D\u79F0:").concat(item.supplierName || '');
105
+ });
106
+ });
107
+
108
+ _defineProperty(_assertThisInitialized(_this), "getColumns", function () {
109
+ return _objectSpread(_objectSpread({}, _get((_thisSuper = _assertThisInitialized(_this), _getPrototypeOf(JstItemSelectThird.prototype)), "getColumns", _thisSuper).call(_thisSuper)), {}, {
110
+ renderExport: _this.renderExport
111
+ });
112
+ });
113
+
114
+ _this.name = 'jst供应商编码/名称';
115
+ _this.width = 340;
116
+ _this.canFilter = false;
117
+ _this.canGroup = false;
118
+ _this.canHidden = true;
119
+ _this.editable = true;
120
+ _this.dataType = 'string';
121
+ _this.effects = options === null || options === void 0 ? void 0 : options.effects;
122
+ return _this;
123
+ }
124
+
125
+ return _createClass(JstItemSelectThird);
126
+ }(BasicComponent);
127
+
128
+ export default JstItemSelectThird;
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import BasicComponent from '../../BasicComponent';
3
+ declare class JstLogistics extends BasicComponent {
4
+ constructor(options: any);
5
+ render: (value: any, record: any) => JSX.Element;
6
+ customRules: () => {
7
+ required: boolean;
8
+ validator: (_: any, value: any) => Promise<void>;
9
+ }[];
10
+ editRender: (value: any) => JSX.Element;
11
+ renderExport: (value: any, record: any) => any;
12
+ getColumns: () => any;
13
+ }
14
+ export default JstLogistics;