@kmkf-fe-packages/kmkf-work-order-service-component 2.2.31-beta.17 → 2.2.31-beta.25

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.
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { isNumber } from 'lodash';
3
- import { Divider } from 'antd';
3
+ import { Divider, Button } from 'antd';
4
4
  export var AutoTaskDetail = function AutoTaskDetail(_ref) {
5
5
  var flowEventData = _ref.flowEventData;
6
6
  var mapping = {
@@ -13,6 +13,28 @@ export var AutoTaskDetail = function AutoTaskDetail(_ref) {
13
13
  6: '同时存在成功和失败且已完结',
14
14
  7: '等待业务执行'
15
15
  };
16
+ var repairOrderMapList = [{
17
+ name: '安装/维修单订单编号',
18
+ value: 'repairOrderSn'
19
+ }, {
20
+ name: '安装/维修单订单id',
21
+ value: 'repairOrderId'
22
+ }, {
23
+ name: '服务类型',
24
+ value: 'serviceType'
25
+ }, {
26
+ name: '服务状态',
27
+ value: 'serviceStatus'
28
+ }, {
29
+ name: '最新服务进度',
30
+ value: 'latestServiceProgress'
31
+ }, {
32
+ name: '最新服务进度时间',
33
+ value: 'latestServiceProgressTime'
34
+ }, {
35
+ name: '下单时间',
36
+ value: 'createTime'
37
+ }];
16
38
  var eventStatus = flowEventData === null || flowEventData === void 0 ? void 0 : flowEventData.eventStatus;
17
39
  var renderRules = function renderRules() {
18
40
  var _flowEventData$eventD, _flowEventData$eventD2;
@@ -28,8 +50,24 @@ export var AutoTaskDetail = function AutoTaskDetail(_ref) {
28
50
  }))), /*#__PURE__*/React.createElement("p", null, item.remark));
29
51
  }));
30
52
  };
53
+ var renderRepairResult = function renderRepairResult() {
54
+ var _flowEventData$eventD6;
55
+ var _ref2 = (flowEventData === null || flowEventData === void 0 ? void 0 : (_flowEventData$eventD6 = flowEventData.eventData) === null || _flowEventData$eventD6 === void 0 ? void 0 : _flowEventData$eventD6.repairResult) || {},
56
+ repairOrderStatus = _ref2.repairOrderStatus;
57
+ var isSuccess = repairOrderStatus === '成功';
58
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
59
+ type: "link"
60
+ }, "\u67E5\u770B\u8BE6\u60C5>>"), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, "\u5B89\u88C5/\u7EF4\u4FEE\u5355\u72B6\u6001:", /*#__PURE__*/React.createElement("span", {
61
+ style: {
62
+ color: isSuccess ? '#70B603' : '#D9001B'
63
+ }
64
+ }, repairOrderStatus)), isSuccess && (repairOrderMapList === null || repairOrderMapList === void 0 ? void 0 : repairOrderMapList.map(function (item) {
65
+ var _flowEventData$eventD7, _flowEventData$eventD8;
66
+ return /*#__PURE__*/React.createElement("p", null, item.name, ": ", flowEventData === null || flowEventData === void 0 ? void 0 : (_flowEventData$eventD7 = flowEventData.eventData) === null || _flowEventData$eventD7 === void 0 ? void 0 : (_flowEventData$eventD8 = _flowEventData$eventD7.repairResult) === null || _flowEventData$eventD8 === void 0 ? void 0 : _flowEventData$eventD8[item.value]);
67
+ }))));
68
+ };
31
69
  // const renderReason = () => {
32
70
  // return <p>{ flowEventData?.eventData?.businessStatus?.map((item: any) => item?.remark)?.join(',') }</p>
33
71
  // }
34
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, isNumber(eventStatus) && "\u6267\u884C\u72B6\u6001: ".concat(mapping[eventStatus])), renderRules());
72
+ return /*#__PURE__*/React.createElement("div", null, (flowEventData === null || flowEventData === void 0 ? void 0 : flowEventData.eventType) === 'LBDJ_ONE_PRICE_ORDER' ? renderRepairResult() : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("p", null, isNumber(eventStatus) && "\u6267\u884C\u72B6\u6001: ".concat(mapping[eventStatus])), renderRules()));
35
73
  };
@@ -4,7 +4,6 @@ interface JumpBuyerProps {
4
4
  buyer?: string;
5
5
  shop: string;
6
6
  order_number?: string;
7
- flowTemplateKey: string;
8
7
  }
9
8
  declare const JumpBuyer: (param: JumpBuyerProps) => React.JSX.Element;
10
9
  export default JumpBuyer;
@@ -7,15 +7,14 @@ var JumpBuyer = function JumpBuyer(param) {
7
7
  var platformType = param.platformType,
8
8
  buyer = param.buyer,
9
9
  shop = param.shop,
10
- order_number = param.order_number,
11
- flowTemplateKey = param.flowTemplateKey;
10
+ order_number = param.order_number;
12
11
  var onClick = function onClick() {
13
12
  var _window, _window$xiaozhiSDK;
14
13
  var info = {
15
14
  event: 'open_buyers',
16
15
  param: {
17
16
  platformType: Number(platformType),
18
- buyer: buyer,
17
+ buyer: buyer || "orderNum_".concat(order_number),
19
18
  shop: shop,
20
19
  order_number: order_number
21
20
  }
@@ -62,7 +62,7 @@ import { PlatForm } from "../WorkOrder/types";
62
62
  var Text = Typography.Text,
63
63
  Link = Typography.Link;
64
64
  var FlowTemplateDetail = function FlowTemplateDetail(props) {
65
- var _currentNodeDetail$wo, _currentNodeDetail$no, _currentNodeDetail$wo2, _currentNodeDetail$no14, _shopList$find, _JSON$parse, _currentNodeDetail$wo31, _currentNodeDetail$wo32, _currentNodeDetail$wo33, _currentNodeDetail$wo34, _currentNodeDetail$no27, _currentNodeDetail$no28, _currentNodeDetail$no29, _currentNodeDetail$no30;
65
+ var _currentNodeDetail$wo, _currentNodeDetail$no, _currentNodeDetail$wo2, _currentNodeDetail$no14, _shopList$find, _currentNodeDetail$wo31, _JSON$parse, _currentNodeDetail$wo32, _currentNodeDetail$wo33, _currentNodeDetail$wo34, _currentNodeDetail$wo35, _currentNodeDetail$no27, _currentNodeDetail$no28, _currentNodeDetail$no29, _currentNodeDetail$no30;
66
66
  var flowTemplateKey = props.flowTemplateKey,
67
67
  _props$shopList = props.shopList,
68
68
  shopList = _props$shopList === void 0 ? [] : _props$shopList,
@@ -1314,11 +1314,11 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
1314
1314
  }, !follow ? '关注' : '已关注'), plat.platform === PlatForm.XIAOZHI && /*#__PURE__*/React.createElement(JumpBuyer, {
1315
1315
  order_number: tid,
1316
1316
  shop: (otherInfo === null || otherInfo === void 0 ? void 0 : otherInfo.taobaoNick) || '',
1317
- platformType: otherInfo === null || otherInfo === void 0 ? void 0 : otherInfo.xzClientPlatformType,
1318
- flowTemplateKey: flowTemplateKey
1319
- })), /*#__PURE__*/React.createElement("div", null, (_JSON$parse = JSON.parse((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo31 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo31 === void 0 ? void 0 : (_currentNodeDetail$wo32 = _currentNodeDetail$wo31.jsonMap) === null || _currentNodeDetail$wo32 === void 0 ? void 0 : _currentNodeDetail$wo32.flowTags) || '[]')) !== null && _JSON$parse !== void 0 && _JSON$parse.includes('AI_BUILD') ? /*#__PURE__*/React.createElement(Tag, {
1317
+ buyer: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo31 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo31 === void 0 ? void 0 : _currentNodeDetail$wo31.buyerNick,
1318
+ platformType: otherInfo === null || otherInfo === void 0 ? void 0 : otherInfo.xzClientPlatformType
1319
+ })), /*#__PURE__*/React.createElement("div", null, (_JSON$parse = JSON.parse((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo32 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo32 === void 0 ? void 0 : (_currentNodeDetail$wo33 = _currentNodeDetail$wo32.jsonMap) === null || _currentNodeDetail$wo33 === void 0 ? void 0 : _currentNodeDetail$wo33.flowTags) || '[]')) !== null && _JSON$parse !== void 0 && _JSON$parse.includes('AI_BUILD') ? /*#__PURE__*/React.createElement(Tag, {
1320
1320
  color: "blue"
1321
- }, "AI\u81EA\u52A8\u5EFA\u5355-".concat(WORK_ORDER_STATUS_AI_BUILD[currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo33 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo33 === void 0 ? void 0 : (_currentNodeDetail$wo34 = _currentNodeDetail$wo33.jsonMap) === null || _currentNodeDetail$wo34 === void 0 ? void 0 : _currentNodeDetail$wo34.flowStatus])) : null)), flowStatus && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
1321
+ }, "AI\u81EA\u52A8\u5EFA\u5355-".concat(WORK_ORDER_STATUS_AI_BUILD[currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo34 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo34 === void 0 ? void 0 : (_currentNodeDetail$wo35 = _currentNodeDetail$wo34.jsonMap) === null || _currentNodeDetail$wo35 === void 0 ? void 0 : _currentNodeDetail$wo35.flowStatus])) : null)), flowStatus && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
1322
1322
  justify: 'space-between',
1323
1323
  className: "header"
1324
1324
  }, /*#__PURE__*/React.createElement(Col, null, /*#__PURE__*/React.createElement("div", {
@@ -185,8 +185,7 @@ var CustomizeWorkOrderCard = function CustomizeWorkOrderCard(props) {
185
185
  })))), /*#__PURE__*/React.createElement(Space, null, (platformInfo === null || platformInfo === void 0 ? void 0 : platformInfo.platform) === PlatForm.XIAOZHI && /*#__PURE__*/React.createElement(JumpBuyer, {
186
186
  order_number: item === null || item === void 0 ? void 0 : item.tid,
187
187
  shop: (platformInfo === null || platformInfo === void 0 ? void 0 : (_platformInfo$otherIn = platformInfo.otherInfo) === null || _platformInfo$otherIn === void 0 ? void 0 : _platformInfo$otherIn.taobaoNick) || '',
188
- platformType: (platformInfo === null || platformInfo === void 0 ? void 0 : (_platformInfo$otherIn2 = platformInfo.otherInfo) === null || _platformInfo$otherIn2 === void 0 ? void 0 : _platformInfo$otherIn2.xzClientPlatformType) || '',
189
- flowTemplateKey: item === null || item === void 0 ? void 0 : item.flowTemplateKey
188
+ platformType: (platformInfo === null || platformInfo === void 0 ? void 0 : (_platformInfo$otherIn2 = platformInfo.otherInfo) === null || _platformInfo$otherIn2 === void 0 ? void 0 : _platformInfo$otherIn2.xzClientPlatformType) || ''
190
189
  }), /*#__PURE__*/React.createElement("span", {
191
190
  className: "order_card_header_detail",
192
191
  onClick: function onClick() {
@@ -26,6 +26,8 @@ export var updateWorkTypeKeys = {
26
26
  BS_DEPOSIT: 'bsDeposit',
27
27
  NEW_PAYMENT_STATUS: 'newPaymentStatus',
28
28
  BUSINESS_ORDER_NO: 'businessOrderNo',
29
+ REPAIR_ORDER_SN: 'repairOrderSn',
30
+ REPAIR_ORDER_ID: 'repairOrderId',
29
31
  PAYMENT_VOUCHER_CODE: 'paymentVoucherCode',
30
32
  ACTUAL_RECEIPT_PAYMENT: 'actualReceiptPayment',
31
33
  WDT_SHOP: 'shopCode'
@@ -114,6 +116,8 @@ export var DEFAULT_STRING_COMPONENT_TYPE_FIELD_MAPPING = {
114
116
  SYSTEM_ORDER_NO: 'systemOrderNo',
115
117
  NEW_PAYMENT_STATUS: 'newPaymentStatus',
116
118
  BUSINESS_ORDER_NO: 'businessOrderNo',
119
+ REPAIR_ORDER_SN: 'repairOrderSn',
120
+ REPAIR_ORDER_ID: 'repairOrderId',
117
121
  PAYMENT_VOUCHER_CODE: 'paymentVoucherCode',
118
122
  BASIC_MULT_SELECT: 'basicMultSelect',
119
123
  ORDER_TYPE: 'erpOrderType',
@@ -179,6 +183,10 @@ export var SUBMIT_COMPONENT_STATUS_MAP = {
179
183
  RETURN_EXCHANGE_GOODS_REVIEW_STATUS: {
180
184
  status: 'returnExchangeGoodsReviewStatusValue',
181
185
  reason: 'returnExchangeGoodsReviewStatusReason'
186
+ },
187
+ REPAIR_ORDER_STATUS: {
188
+ status: 'repairOrderStatusValue',
189
+ reason: 'repairOrderStatusReason'
182
190
  }
183
191
  };
184
192
  export var SUBMIT_COMPONENT_GOOD_STATUS_MAP = {
@@ -836,6 +836,8 @@ var processComponent = function processComponent(_ref59) {
836
836
  case 'SKX_OUTBOUND_NOTICE_NO':
837
837
  case 'SKX_RETURN_BILL_NO':
838
838
  case 'JST_OUTBOUND_STATUS':
839
+ case 'REPAIR_ORDER_SN':
840
+ case 'REPAIR_ORDER_ID':
839
841
  wrapFn(handleOnlyAddContent);
840
842
  break;
841
843
  case 'RATE':
@@ -853,6 +855,7 @@ var processComponent = function processComponent(_ref59) {
853
855
  case 'INVOICE_STATUS':
854
856
  case 'INVOICING_STATUS':
855
857
  case 'AGREE_REFUND_STATUS':
858
+ case 'REPAIR_ORDER_STATUS':
856
859
  case 'REJECT_REFUND_STATUS':
857
860
  case 'ERP_AFTER_SALE_STATUS':
858
861
  case 'AGREE_RETURN_GOODS_STATUS':
@@ -65,7 +65,9 @@ var workTypeKeys = {
65
65
  PAYMENT_VOUCHER_CODE: 'paymentVoucherCode',
66
66
  EXECUTE_ACTION_TYPE: 'executeActionType',
67
67
  ERP_ORDER_STATUS: 'erpOrderStatus',
68
- JST_OUTBOUND_STATUS: 'jstOutboundStatus'
68
+ JST_OUTBOUND_STATUS: 'jstOutboundStatus',
69
+ REPAIR_ORDER_SN: 'repairOrderSn',
70
+ REPAIR_ORDER_ID: 'repairOrderId'
69
71
  };
70
72
 
71
73
  // 根据组件类型获取组件的UniqueKey
@@ -440,6 +440,10 @@ var processCallBackStatus = function processCallBackStatus(getValue) {
440
440
  RETURN_EXCHANGE_GOODS_REVIEW_STATUS: {
441
441
  status: 'returnExchangeGoodsReviewStatusValue',
442
442
  reason: 'returnExchangeGoodsReviewStatusReason'
443
+ },
444
+ REPAIR_ORDER_STATUS: {
445
+ status: 'repairOrderStatusValue',
446
+ reason: 'repairOrderStatusReason'
443
447
  }
444
448
  };
445
449
  return _defineProperty({}, nex.uniqueKey, {
@@ -1280,6 +1284,7 @@ var transformWorkOrderData = function transformWorkOrderData(templateColumns) {
1280
1284
  INVOICE_STATUS: processCallBackStatus,
1281
1285
  INVOICING_STATUS: processCallBackStatus,
1282
1286
  AGREE_REFUND_STATUS: processCallBackStatus,
1287
+ REPAIR_ORDER_STATUS: processCallBackStatus,
1283
1288
  REJECT_REFUND_STATUS: processCallBackStatus,
1284
1289
  ERP_AFTER_SALE_STATUS: processCallBackStatus,
1285
1290
  AGREE_RETURN_GOODS_STATUS: processCallBackStatus,
@@ -1372,6 +1377,8 @@ var transformWorkOrderData = function transformWorkOrderData(templateColumns) {
1372
1377
  BS_DEPOSIT: processSingleField,
1373
1378
  NEW_PAYMENT_STATUS: processSingleField,
1374
1379
  BUSINESS_ORDER_NO: processSingleField,
1380
+ REPAIR_ORDER_SN: processSingleField,
1381
+ REPAIR_ORDER_ID: processSingleField,
1375
1382
  PAYMENT_VOUCHER_CODE: processSingleField,
1376
1383
  BS_E3_REISSUE_GOODS: processBsE3ReissueGoods(templateColumns),
1377
1384
  ACTUAL_RECEIPT_PAYMENT: processSingleField,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/kmkf-work-order-service-component",
3
- "version": "2.2.31-beta.17",
3
+ "version": "2.2.31-beta.25",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -32,9 +32,9 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@ant-design/icons": "^4.7.0",
35
- "@kmkf-fe-packages/basic-components": "2.2.31-beta.17",
36
- "@kmkf-fe-packages/kmkf-utils": "2.2.31-beta.17",
37
- "@kmkf-fe-packages/services-components": "2.2.31-beta.17",
35
+ "@kmkf-fe-packages/basic-components": "2.2.31-beta.25",
36
+ "@kmkf-fe-packages/kmkf-utils": "2.2.31-beta.25",
37
+ "@kmkf-fe-packages/services-components": "2.2.31-beta.25",
38
38
  "@reduxjs/toolkit": "^1.8.5",
39
39
  "ahooks": "^3.7.4",
40
40
  "copy-to-clipboard": "^3.3.3",
@@ -75,7 +75,7 @@
75
75
  "publishConfig": {
76
76
  "access": "public"
77
77
  },
78
- "gitHead": "141c5877a6198f7dab8e3bdc667d840ab35c6405",
78
+ "gitHead": "9e1f85be0a458da3acd6075c5667834019006fe5",
79
79
  "gitHooks": {
80
80
  "pre-commit": "lint-staged"
81
81
  }