@kmkf-fe-packages/kmkf-work-order-service-component 2.2.31-beta.75 → 2.2.31-beta.77

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.
@@ -10,6 +10,7 @@ export declare const DETAIL_ITEM_LIST: DetailItemSchemaType[];
10
10
  declare const OrderInfo: {
11
11
  (props: {
12
12
  id: string;
13
+ setIsShowServiceProgress: (isShow: boolean) => void;
13
14
  shopList: Shop[];
14
15
  }): React.JSX.Element;
15
16
  displayName: string;
@@ -40,9 +40,6 @@ export var renderTable = function renderTable(value, record, item, effects, key)
40
40
  columns: item.children,
41
41
  dataSource: value,
42
42
  pagination: false,
43
- rowKey: function rowKey(record, index) {
44
- return "".concat(key, "-table-").concat(index);
45
- },
46
43
  size: "small"
47
44
  });
48
45
  };
@@ -54,7 +51,20 @@ export var DETAIL_ITEM_LIST = [{
54
51
  title: '下单状态',
55
52
  dataIndex: 'orderStatus',
56
53
  render: function render(value) {
57
- return ['失败', '成功'][value] || value;
54
+ var item = [{
55
+ value: 0,
56
+ label: '失败',
57
+ color: '#ff4d4f'
58
+ }, {
59
+ value: 1,
60
+ label: '成功',
61
+ color: '#52c41a'
62
+ }][value];
63
+ return item ? /*#__PURE__*/React.createElement("span", {
64
+ style: {
65
+ color: item.color
66
+ }
67
+ }, item.label) : value;
58
68
  }
59
69
  }, {
60
70
  title: '安装/维修订单编号',
@@ -70,10 +80,24 @@ export var DETAIL_ITEM_LIST = [{
70
80
  dataIndex: 'serviceTypeDesc'
71
81
  }, {
72
82
  title: '服务状态',
73
- dataIndex: 'serviceStatusDesc'
83
+ dataIndex: 'serviceStatusDesc',
84
+ render: function render(value) {
85
+ return /*#__PURE__*/React.createElement("span", {
86
+ style: {
87
+ color: '#1b5bf3'
88
+ }
89
+ }, value);
90
+ }
74
91
  }, {
75
92
  title: '最新服务进度',
76
- dataIndex: 'latestServiceProgressDesc'
93
+ dataIndex: 'latestServiceProgressDesc',
94
+ render: function render(value) {
95
+ return /*#__PURE__*/React.createElement("span", {
96
+ style: {
97
+ color: '#1b5bf3'
98
+ }
99
+ }, value);
100
+ }
77
101
  }, {
78
102
  title: '最新服务进度时间',
79
103
  dataIndex: 'latestProgressTime',
@@ -272,7 +296,10 @@ export var DETAIL_ITEM_LIST = [{
272
296
  render: renderTime
273
297
  }, {
274
298
  title: '师傅打卡方式',
275
- dataIndex: 'clockInMethod'
299
+ dataIndex: 'clockInType',
300
+ render: function render(value) {
301
+ return value === 0 ? '位置' : value === 1 ? '打卡码' : value;
302
+ }
276
303
  }, {
277
304
  title: '师傅完工时间',
278
305
  dataIndex: 'workerFinishTime',
@@ -537,6 +564,10 @@ var OrderInfo = function OrderInfo(props) {
537
564
  queryInstallationRepairDetail(props.id).then(function (res) {
538
565
  if (res.data) {
539
566
  setOrderInfo(res.data);
567
+ if (res.data.main.orderStatus) {
568
+ //显示服务进度tab
569
+ props.setIsShowServiceProgress(true);
570
+ }
540
571
  } else {
541
572
  message.error('安装/维修单详情为空');
542
573
  setOrderInfo(void 0);
@@ -29,6 +29,7 @@ var renderDetailItem = function renderDetailItem(record, item, effects) {
29
29
 
30
30
  // 不同 serviceProgress 对应的配置,利用 satisfies 做强类型约束
31
31
  var serviceProgressDetailConfig = {
32
+ '-1': [],
32
33
  2: [[{
33
34
  title: '师傅姓名',
34
35
  dataIndex: 'workerName'
@@ -383,6 +384,7 @@ var ProgressContent = function ProgressContent(_ref) {
383
384
  shopList = _ref.shopList,
384
385
  singleColumn = _ref.singleColumn;
385
386
  var list = getServiceProgressList(detail.serviceProgress, singleColumn);
387
+ if (list.length === 0) return null;
386
388
  return /*#__PURE__*/React.createElement("div", {
387
389
  className: styles.progressContent
388
390
  }, /*#__PURE__*/React.createElement("div", null, list.map(function (listItem) {
@@ -15,6 +15,10 @@ function LBOrderDetail(props) {
15
15
  _useState2 = _slicedToArray(_useState, 2),
16
16
  activeKey = _useState2[0],
17
17
  setActiveKey = _useState2[1];
18
+ var _useState3 = useState(false),
19
+ _useState4 = _slicedToArray(_useState3, 2),
20
+ isShowServiceProgress = _useState4[0],
21
+ setIsShowServiceProgress = _useState4[1];
18
22
  return /*#__PURE__*/React.createElement("div", {
19
23
  className: styles.containerBox
20
24
  }, /*#__PURE__*/React.createElement(Tabs, {
@@ -27,17 +31,18 @@ function LBOrderDetail(props) {
27
31
  }, /*#__PURE__*/React.createElement(Tabs.TabPane, {
28
32
  tab: "\u8BA2\u5355\u4FE1\u606F",
29
33
  key: "orderInfo"
30
- }), /*#__PURE__*/React.createElement(Tabs.TabPane, {
34
+ }), isShowServiceProgress && /*#__PURE__*/React.createElement(Tabs.TabPane, {
31
35
  tab: "\u670D\u52A1\u8FDB\u5EA6",
32
36
  key: "serviceProgress"
33
37
  })), /*#__PURE__*/React.createElement("div", {
34
38
  className: styles.content
35
- }, activeKey === 'serviceProgress' && /*#__PURE__*/React.createElement(ServiceProgress, {
39
+ }, activeKey === 'serviceProgress' && isShowServiceProgress && /*#__PURE__*/React.createElement(ServiceProgress, {
36
40
  contentWidth: props.contentWidth,
37
41
  id: props.id,
38
42
  shopList: props.shopList
39
43
  }), activeKey === 'orderInfo' && /*#__PURE__*/React.createElement(OrderInfo, {
40
44
  id: props.id,
45
+ setIsShowServiceProgress: setIsShowServiceProgress,
41
46
  shopList: props.shopList
42
47
  })));
43
48
  }
@@ -62,7 +62,7 @@ export declare type DetailType = {
62
62
  appointEndTime: string;
63
63
  clockInWorkerName: string;
64
64
  clockInTime: string;
65
- clockInMethod: string;
65
+ clockInType: 0 | 1;
66
66
  exceptionAppointTime: string;
67
67
  exceptionType: string;
68
68
  exceptionRemark: string;
@@ -172,6 +172,11 @@ export declare type DetailItemSchemaType = {
172
172
  }[TableKeyType];
173
173
  export declare type ServiceProgressType = ServiceProgressDataType['serviceProgress'];
174
174
  declare type ServiceProgressDataType = {
175
+ serviceProgress: -1;
176
+ data: {
177
+ time: string;
178
+ };
179
+ } | {
175
180
  serviceProgress: 2;
176
181
  data: {
177
182
  workerName: string;
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.75",
3
+ "version": "2.2.31-beta.77",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -75,7 +75,7 @@
75
75
  "publishConfig": {
76
76
  "access": "public"
77
77
  },
78
- "gitHead": "c0cad8d5b7cebe20ae861c226b953e7820c8de3b",
78
+ "gitHead": "d7c5aae8383190143985343943f30c6e2c015f06",
79
79
  "gitHooks": {
80
80
  "pre-commit": "lint-staged"
81
81
  }