kmkf-work-order-service-component 0.0.1-alpha.8 → 0.0.1

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 (25) hide show
  1. package/README.md +2 -2
  2. package/dist/esm/WorkOrder/common/utils/tools.d.ts +1 -1
  3. package/dist/esm/WorkOrder/common/utils/tools.js +38 -36
  4. package/dist/esm/WorkOrder/components/CustomizeFormModal/index.js +29 -12
  5. package/dist/esm/WorkOrder/components/CustomizeFormModal/index.module.less +1 -1
  6. package/dist/esm/WorkOrder/components/ListOrderItem/index.js +6 -5
  7. package/dist/esm/WorkOrder/components/ListOrderItem/index.module.less +2 -2
  8. package/dist/esm/WorkOrder/components/PayListOrderItem/ModifyModal.js +16 -2
  9. package/dist/esm/WorkOrder/components/PayListOrderItem/RecordModal.js +3 -2
  10. package/dist/esm/WorkOrder/components/PayListOrderItem/index.js +1 -0
  11. package/dist/esm/WorkOrder/components/RecordLog/index.js +1 -0
  12. package/dist/esm/WorkOrder/components/TransferOrderModal/index.js +4 -2
  13. package/dist/esm/WorkOrder/components/Widget/basic/Picture/index.js +1 -1
  14. package/dist/esm/WorkOrder/components/Widget/electricity/EItemEncode/index.js +2 -2
  15. package/dist/esm/WorkOrder/components/Widget/electricity/EItemId/index.js +2 -2
  16. package/dist/esm/WorkOrder/components/Widget/electricity/ETradeId/index.js +10 -2
  17. package/dist/esm/WorkOrder/components/Widget/third/ItemSelect/index.js +2 -2
  18. package/dist/esm/WorkOrder/index.d.ts +1 -0
  19. package/dist/esm/WorkOrder/index.js +149 -117
  20. package/dist/esm/WorkOrder/{index.module.less → index.less} +2 -1
  21. package/dist/esm/WorkOrder/model/workOrder.d.ts +5 -0
  22. package/dist/esm/WorkOrder/model/workOrder.js +23 -8
  23. package/package.json +2 -2
  24. package/dist/esm/WorkOrder/components/Widget/common/utils.d.ts +0 -0
  25. package/dist/esm/WorkOrder/components/Widget/common/utils.js +0 -98
@@ -28,18 +28,19 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
28
28
  * @Author: wangzhenggui jianjia.wzg@raycloud.com
29
29
  * @Date: 2022-09-16 11:19:43
30
30
  * @LastEditors: litian
31
- * @LastEditTime: 2022-09-28 15:07:36
31
+ * @LastEditTime: 2022-10-12 17:04:02
32
32
  * @FilePath: /kmkf-work-order-service-component/src/WorkOrder/index.tsx
33
33
  * @Description:
34
34
  *
35
35
  * Copyright (c) 2022 by wangzhenggui jianjia.wzg@raycloud.com, All Rights Reserved.
36
36
  */
37
- import React, { useState, useEffect, useRef, useCallback } from 'react';
37
+ import React, { useState, useEffect, useRef } from 'react';
38
38
  import Wrapper from "./components/Wrapper";
39
- import { Tabs, Select, Pagination, Cascader, DatePicker, Space, Checkbox, message } from 'antd';
39
+ import { Tabs, Select, Pagination, Cascader, DatePicker, Space, Checkbox, Spin, message } from 'antd';
40
40
  import { useAppSelector, useAppDispatch } from "./model/hooks";
41
41
  import { fetchQueryGroupCustomTemplate, fetchQueryWorkOrder, fetchQueryCurrentCompanyUser, fetchQueryPaymentWorkOrderList } from "./model/workOrder";
42
- import openCustomizeWOrkOrder from "./components/CustomizeFormModal/wrap";
42
+ import CustomizeFormModal from "./components/CustomizeFormModal";
43
+ import PayOrderModal from "./components/PayListOrderItem/ModifyModal";
43
44
  import express from "./common/utils/express";
44
45
  import formatAddrData from "./common/utils/formatAddrData";
45
46
  import ListOrderItem from "./components/ListOrderItem";
@@ -47,14 +48,13 @@ import PayListOrderItem from "./components/PayListOrderItem";
47
48
  import RecordModal from "./components/PayListOrderItem/RecordModal";
48
49
  import RecordLog from "./components/RecordLog";
49
50
  import TransferOrderModal from "./components/TransferOrderModal";
50
- import openPaymentWOrkOrder from "./components/PayListOrderItem/wrap";
51
51
  import store from "./model/store";
52
52
  import { Provider } from 'react-redux';
53
53
  import { transferWorkOrder } from "./model/servers/api";
54
54
  import get from 'lodash/get';
55
55
  import refreshImg from "./common/imgs/refresh.png";
56
56
  import emptyImg from "./common/imgs/empty.png";
57
- import styles from "./index.module.less";
57
+ import "./index.less";
58
58
  import { jsx as _jsx } from "react/jsx-runtime";
59
59
  import { jsxs as _jsxs } from "react/jsx-runtime";
60
60
  var Option = Select.Option;
@@ -72,65 +72,80 @@ var WorkOrder = function WorkOrder(props) {
72
72
 
73
73
  return (_state$global = state.global) === null || _state$global === void 0 ? void 0 : _state$global.platformInfo;
74
74
  });
75
+ var loading = useAppSelector(function (state) {
76
+ var _state$workOrder;
77
+
78
+ return (_state$workOrder = state.workOrder) === null || _state$workOrder === void 0 ? void 0 : _state$workOrder.loading;
79
+ });
75
80
 
76
81
  var _useState = useState('custom'),
77
82
  _useState2 = _slicedToArray(_useState, 2),
78
83
  tabActive = _useState2[0],
79
84
  setTabActive = _useState2[1];
80
85
 
81
- var propsValue = useCallback(function () {
82
- return {
83
- platform: platform,
84
- shopId: shopId,
85
- buyerNick: buyerNick,
86
- buyerId: buyerId,
87
- orderNo: orderNo
88
- };
89
- }, [platform, shopId, buyerNick, buyerId, orderNo]);
90
86
  useEffect(function () {
91
- // console.log('shopid---====', shopId, platformInfo.shopId);
92
- console.log('propsValue', propsValue()); //存储平台信息
87
+ if (buyerId) {
88
+ dispatch({
89
+ type: 'workOrder/setIsBuyer',
90
+ payload: true
91
+ });
92
+ } else {
93
+ dispatch({
94
+ type: 'workOrder/setIsBuyer',
95
+ payload: false
96
+ });
97
+ }
98
+ }, [buyerId]);
99
+ useEffect(function () {
100
+ if (shopId != platformInfo.shopId) {
101
+ initHandle();
102
+ } //存储平台信息
103
+
93
104
 
94
105
  dispatch({
95
106
  type: 'global/setState',
96
107
  payload: {
97
- platformInfo: _objectSpread({}, propsValue())
108
+ platformInfo: {
109
+ platform: platform,
110
+ shopId: shopId,
111
+ buyerNick: buyerNick,
112
+ buyerId: buyerId,
113
+ orderNo: orderNo
114
+ }
98
115
  }
99
116
  });
100
- initHandle();
101
- }, [propsValue]); // useEffect(() => {
102
- // initHandle();
103
- // }, []);
117
+ }, [platform, shopId, buyerNick, buyerId, orderNo]);
104
118
 
105
119
  var initHandle = function initHandle() {
106
120
  dispatch(fetchQueryGroupCustomTemplate());
107
121
  dispatch(fetchQueryCurrentCompanyUser());
108
- dispatch(fetchQueryPaymentWorkOrderList());
109
- dispatch(fetchQueryWorkOrder());
110
122
  express.initData();
111
123
  formatAddrData.initData();
112
124
  };
113
125
 
114
- return /*#__PURE__*/_jsxs(Wrapper, {
115
- children: [/*#__PURE__*/_jsx("header", {
116
- className: styles.order_header,
117
- children: /*#__PURE__*/_jsxs("div", {
118
- className: styles.order_header_tabs,
119
- children: [/*#__PURE__*/_jsx("div", {
120
- className: "".concat(styles.order_header_tabs_button, " ").concat(tabActive === 'custom' ? styles.active : ''),
121
- onClick: function onClick() {
122
- return setTabActive('custom');
123
- },
124
- children: "\u81EA\u5B9A\u4E49\u5DE5\u5355"
125
- }), /*#__PURE__*/_jsx("div", {
126
- className: "".concat(styles.order_header_tabs_button, " ").concat(styles.border_left, " ").concat(tabActive === 'payment' ? styles.active : ''),
127
- onClick: function onClick() {
128
- return setTabActive('payment');
129
- },
130
- children: "\u6253\u6B3E\u5DE5\u5355"
131
- })]
132
- })
133
- }), OrderList(tabActive), PayOrderList(tabActive)]
126
+ return /*#__PURE__*/_jsx(Spin, {
127
+ spinning: loading,
128
+ children: /*#__PURE__*/_jsxs(Wrapper, {
129
+ children: [/*#__PURE__*/_jsx("header", {
130
+ className: "order_header",
131
+ children: /*#__PURE__*/_jsxs("div", {
132
+ className: "order_header_tabs",
133
+ children: [/*#__PURE__*/_jsx("div", {
134
+ className: "order_header_tabs_button ".concat(tabActive === 'custom' ? 'active' : ''),
135
+ onClick: function onClick() {
136
+ return setTabActive('custom');
137
+ },
138
+ children: "\u81EA\u5B9A\u4E49\u5DE5\u5355"
139
+ }), /*#__PURE__*/_jsx("div", {
140
+ className: "order_header_tabs_button border_left ".concat(tabActive === 'payment' ? 'active' : ''),
141
+ onClick: function onClick() {
142
+ return setTabActive('payment');
143
+ },
144
+ children: "\u6253\u6B3E\u5DE5\u5355"
145
+ })]
146
+ })
147
+ }), OrderList(tabActive), PayOrderList(tabActive)]
148
+ })
134
149
  });
135
150
  }; //工单列表
136
151
 
@@ -155,27 +170,12 @@ var OrderList = function OrderList(tabActive) {
155
170
  var platformInfo = useAppSelector(function (state) {
156
171
  return state.global.platformInfo;
157
172
  });
173
+ var buyerNick = platformInfo.buyerNick,
174
+ buyerId = platformInfo.buyerId;
158
175
  var isFirst = useRef(false);
159
- var openCustomizeWOrkOrderModal = openCustomizeWOrkOrder({
160
- shopList: shopList,
161
- onSuccess: function onSuccess(_ref) {
162
- var type = _ref.type;
163
- onSearch();
164
-
165
- if (type === 'ADD') {
166
- dispatch({
167
- type: 'global/setState',
168
- payload: {
169
- platformInfo: _objectSpread(_objectSpread({}, platformInfo), {}, {
170
- orderNo: ''
171
- })
172
- }
173
- });
174
- }
175
- }
176
- });
177
176
  var recordLogRef = useRef();
178
177
  var transferRef = useRef();
178
+ var customizeFormRef = useRef();
179
179
  var dayList = [{
180
180
  name: '今日',
181
181
  value: 0
@@ -188,12 +188,12 @@ var OrderList = function OrderList(tabActive) {
188
188
  }, {
189
189
  name: '近30天',
190
190
  value: 29
191
- }]; // useEffect(() => {
192
- // if (customSearch.tempSelect.length > 1) {
193
- // onSearch();
194
- // }
195
- // }, [customSearch]);
196
- //搜索
191
+ }];
192
+ useEffect(function () {
193
+ if (customSearch.tempSelect.length > 1) {
194
+ onSearch();
195
+ }
196
+ }, [customSearch, buyerNick, buyerId]); //搜索
197
197
 
198
198
  var onSearch = function onSearch() {
199
199
  dispatch(fetchQueryWorkOrder());
@@ -201,10 +201,12 @@ var OrderList = function OrderList(tabActive) {
201
201
 
202
202
 
203
203
  var upDateState = function upDateState(type, val) {
204
+ var _objectSpread2;
205
+
204
206
  dispatch({
205
207
  type: 'workOrder/setState',
206
208
  payload: {
207
- customSearch: _objectSpread(_objectSpread({}, customSearch), {}, _defineProperty({}, type, val))
209
+ customSearch: _objectSpread(_objectSpread({}, customSearch), {}, (_objectSpread2 = {}, _defineProperty(_objectSpread2, type, val), _defineProperty(_objectSpread2, "pageNo", 1), _objectSpread2))
208
210
  }
209
211
  });
210
212
  }; //分页
@@ -231,26 +233,23 @@ var OrderList = function OrderList(tabActive) {
231
233
 
232
234
 
233
235
  var openCustomForm = function openCustomForm(id) {
234
- if (!platformInfo.buyerId) {
235
- message.error('请选择用户');
236
- return;
237
- }
238
-
239
- openCustomizeWOrkOrderModal({
236
+ customizeFormRef.current.openModal({
240
237
  templateId: id,
241
238
  shopId: platformInfo.shopId + '',
242
239
  orderNo: platformInfo.orderNo,
243
- buyerId: platformInfo.buyerId
240
+ buyerId: platformInfo.buyerId,
241
+ buyerNick: platformInfo.buyerNick
244
242
  });
245
243
  }; //编辑
246
244
 
247
245
 
248
246
  var onEdit = function onEdit(item) {
249
- openCustomizeWOrkOrderModal({
247
+ customizeFormRef.current.openModal({
250
248
  templateId: item.templateDetailDto.uniqueKey,
251
249
  record: item,
252
250
  shopId: item.shopId,
253
- workOrderId: item.id
251
+ workOrderId: item.id,
252
+ buyerNick: platformInfo.buyerNick
254
253
  });
255
254
  }; //记录
256
255
 
@@ -265,7 +264,7 @@ var OrderList = function OrderList(tabActive) {
265
264
 
266
265
 
267
266
  var transCustomer = /*#__PURE__*/function () {
268
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(record, currentCustomer) {
267
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(record, currentCustomer) {
269
268
  var id, jsonMap, _record$templateDetai, componentDtoList, uniqueKey, params, workOrderStatusKey;
270
269
 
271
270
  return _regeneratorRuntime().wrap(function _callee$(_context) {
@@ -307,19 +306,19 @@ var OrderList = function OrderList(tabActive) {
307
306
  }));
308
307
 
309
308
  return function transCustomer(_x, _x2) {
310
- return _ref2.apply(this, arguments);
309
+ return _ref.apply(this, arguments);
311
310
  };
312
311
  }();
313
312
 
314
313
  return /*#__PURE__*/_jsxs("div", {
315
- className: styles.custom_box,
314
+ className: "custom_box",
316
315
  style: {
317
316
  display: tabActive === 'custom' ? 'block' : 'none'
318
317
  },
319
318
  children: [/*#__PURE__*/_jsxs("div", {
320
- className: styles.custom_box_header,
319
+ className: "custom_box_header",
321
320
  children: [/*#__PURE__*/_jsx(Cascader, {
322
- className: styles.custom_box_header_cascader,
321
+ className: "custom_box_header_cascader",
323
322
  options: groupAllList,
324
323
  placeholder: "\u8BF7\u8F93\u5165\u6A21\u7248\u540D\u79F0",
325
324
  showSearch: true,
@@ -331,15 +330,15 @@ var OrderList = function OrderList(tabActive) {
331
330
  label: item.label,
332
331
  key: item.value + '',
333
332
  children: /*#__PURE__*/_jsx("div", {
334
- className: styles.custom_temp_box,
333
+ className: "custom_temp_box",
335
334
  children: /*#__PURE__*/_jsx("div", {
336
- className: styles.custom_temp_list,
335
+ className: "custom_temp_list",
337
336
  children: /*#__PURE__*/_jsx(Space, {
338
337
  size: [8, 8],
339
338
  wrap: true,
340
339
  children: item.children.map(function (t) {
341
340
  return /*#__PURE__*/_jsx("div", {
342
- className: styles.custom_temp_list_button,
341
+ className: "custom_temp_list_button",
343
342
  onClick: function onClick() {
344
343
  return openCustomForm(t.value);
345
344
  },
@@ -356,11 +355,11 @@ var OrderList = function OrderList(tabActive) {
356
355
  }
357
356
  })]
358
357
  }), /*#__PURE__*/_jsxs("div", {
359
- className: styles.custom_box_search,
358
+ className: "custom_box_search",
360
359
  children: [/*#__PURE__*/_jsxs("div", {
361
- className: styles.custom_box_search_box,
360
+ className: "custom_box_search_box",
362
361
  children: [/*#__PURE__*/_jsx(Select, {
363
- className: styles.custom_box_search_date,
362
+ className: "custom_box_search_date",
364
363
  value: customSearch.filterDay,
365
364
  onChange: function onChange(val) {
366
365
  return upDateState('filterDay', val);
@@ -372,7 +371,7 @@ var OrderList = function OrderList(tabActive) {
372
371
  }, item.name);
373
372
  })
374
373
  }), /*#__PURE__*/_jsx(Cascader, {
375
- className: styles.custom_box_search_cascader,
374
+ className: "custom_box_search_cascader",
376
375
  options: groupAllList,
377
376
  showSearch: true,
378
377
  onChange: function onChange(val) {
@@ -381,15 +380,19 @@ var OrderList = function OrderList(tabActive) {
381
380
  value: customSearch.tempSelect,
382
381
  allowClear: false
383
382
  }), /*#__PURE__*/_jsx(Checkbox, {
384
- className: styles.custom_box_search_buyer,
383
+ className: "custom_box_search_buyer",
385
384
  checked: customSearch.isBuyer,
386
385
  onChange: function onChange(e) {
387
- return upDateState('isBuyer', e.target.checked);
386
+ if (!platformInfo.buyerId) {
387
+ return message.warning('请先选择买家,再查询工单!');
388
+ }
389
+
390
+ upDateState('isBuyer', e.target.checked);
388
391
  },
389
392
  children: "\u5F53\u524D\u4E70\u5BB6"
390
393
  })]
391
394
  }), /*#__PURE__*/_jsx("div", {
392
- className: styles.custom_box_search_refresh,
395
+ className: "custom_box_search_refresh",
393
396
  onClick: onSearch,
394
397
  children: /*#__PURE__*/_jsx("img", {
395
398
  src: refreshImg,
@@ -397,7 +400,7 @@ var OrderList = function OrderList(tabActive) {
397
400
  })
398
401
  })]
399
402
  }), /*#__PURE__*/_jsx("main", {
400
- className: styles.custom_box_main,
403
+ className: "custom_box_main",
401
404
  children: orderList.length ? orderList.map(function (item) {
402
405
  return ListOrderItem({
403
406
  item: item,
@@ -407,7 +410,7 @@ var OrderList = function OrderList(tabActive) {
407
410
  onTransfer: onTransfer
408
411
  });
409
412
  }) : /*#__PURE__*/_jsx("div", {
410
- className: styles.custom_box_main_empty,
413
+ className: "custom_box_main_empty",
411
414
  children: /*#__PURE__*/_jsxs("div", {
412
415
  children: [/*#__PURE__*/_jsx("img", {
413
416
  src: emptyImg,
@@ -418,7 +421,7 @@ var OrderList = function OrderList(tabActive) {
418
421
  })
419
422
  })
420
423
  }), /*#__PURE__*/_jsx("div", {
421
- className: styles.custom_box_page,
424
+ className: "custom_box_page",
422
425
  children: /*#__PURE__*/_jsx(Pagination, {
423
426
  showSizeChanger: false,
424
427
  showQuickJumper: true,
@@ -435,6 +438,24 @@ var OrderList = function OrderList(tabActive) {
435
438
  }), /*#__PURE__*/_jsx(TransferOrderModal, {
436
439
  ref: transferRef,
437
440
  handleTransCustomer: transCustomer
441
+ }), /*#__PURE__*/_jsx(CustomizeFormModal, {
442
+ ref: customizeFormRef,
443
+ shopList: shopList,
444
+ onSuccess: function onSuccess(_ref2) {
445
+ var type = _ref2.type;
446
+ onSearch();
447
+
448
+ if (type === 'ADD') {
449
+ dispatch({
450
+ type: 'global/setState',
451
+ payload: {
452
+ platformInfo: _objectSpread(_objectSpread({}, platformInfo), {}, {
453
+ orderNo: ''
454
+ })
455
+ }
456
+ });
457
+ }
458
+ }
438
459
  })]
439
460
  });
440
461
  }; //打款工单列表
@@ -459,7 +480,10 @@ var PayOrderList = function PayOrderList(tabActive) {
459
480
  var shopList = useAppSelector(function (state) {
460
481
  return state.workOrder.userInfo.shopList;
461
482
  });
483
+ var buyerNick = platformInfo.buyerNick,
484
+ buyerId = platformInfo.buyerId;
462
485
  var logRef = useRef();
486
+ var payOrderRef = useRef();
463
487
  var PAY_STATUS = [{
464
488
  value: '',
465
489
  label: '全部'
@@ -491,9 +515,10 @@ var PayOrderList = function PayOrderList(tabActive) {
491
515
  value: 'ALI_PAY_CLOSE',
492
516
  label: '打款关闭',
493
517
  color: 'rgba(156,156,156)'
494
- }]; // useEffect(() => {
495
- // onSearch();
496
- // }, [paySearch]);
518
+ }];
519
+ useEffect(function () {
520
+ onSearch();
521
+ }, [paySearch, buyerNick, buyerId]);
497
522
 
498
523
  var onSearch = function onSearch() {
499
524
  dispatch(fetchQueryPaymentWorkOrderList());
@@ -513,7 +538,7 @@ var PayOrderList = function PayOrderList(tabActive) {
513
538
  };
514
539
 
515
540
  var handleOpenModify = function handleOpenModify(record, type) {
516
- openPaymentWOrkOrder(record, type, onSearch);
541
+ payOrderRef.current.openModal(record, type);
517
542
  }; //记录
518
543
 
519
544
 
@@ -523,33 +548,33 @@ var PayOrderList = function PayOrderList(tabActive) {
523
548
 
524
549
 
525
550
  var upDateState = function upDateState(type, value) {
526
- // if(type === 'time'){
527
- // value = value.length ? [value[0].valueOf(), value[1].valueOf()]:[]
528
- // }
551
+ var _objectSpread3;
552
+
529
553
  dispatch({
530
554
  type: 'workOrder/setState',
531
555
  payload: {
532
- paySearch: _objectSpread(_objectSpread({}, paySearch), {}, _defineProperty({}, type, value))
556
+ paySearch: _objectSpread(_objectSpread({}, paySearch), {}, (_objectSpread3 = {}, _defineProperty(_objectSpread3, type, value), _defineProperty(_objectSpread3, "pageNo", 1), _objectSpread3))
533
557
  }
534
558
  });
535
559
  };
536
560
 
537
561
  return /*#__PURE__*/_jsxs("div", {
538
- className: styles.custom_box,
562
+ className: "custom_box",
539
563
  style: {
540
564
  display: tabActive === 'payment' ? 'block' : 'none'
541
565
  },
542
566
  children: [/*#__PURE__*/_jsx("div", {
543
- className: styles.custom_box_header,
567
+ className: "custom_box_header",
544
568
  children: /*#__PURE__*/_jsx(Space, {
545
569
  size: [8, 8],
546
570
  wrap: true,
547
571
  children: /*#__PURE__*/_jsx("span", {
548
- className: styles.custom_temp_list_button,
572
+ className: "custom_temp_list_button",
549
573
  onClick: function onClick() {
550
574
  var _shopList$find;
551
575
 
552
576
  return handleOpenModify({
577
+ buyerNick: platformInfo.buyerNick,
553
578
  buyerOpenUid: platformInfo.buyerId,
554
579
  shopId: platformInfo.shopId,
555
580
  shopName: (_shopList$find = shopList.find(function (item) {
@@ -562,11 +587,11 @@ var PayOrderList = function PayOrderList(tabActive) {
562
587
  })
563
588
  })
564
589
  }), /*#__PURE__*/_jsxs("div", {
565
- className: "".concat(styles.custom_box_search, " ").concat(styles.pay_search),
590
+ className: "custom_box_search pay_search",
566
591
  children: [/*#__PURE__*/_jsxs("div", {
567
- className: "".concat(styles.custom_box_search_box, " ").concat(styles.pay_search_box),
592
+ className: "custom_box_search_box pay_search_box",
568
593
  children: [/*#__PURE__*/_jsxs(Select, {
569
- className: styles.custom_box_search_date,
594
+ className: "custom_box_search_date",
570
595
  value: paySearch.timeType,
571
596
  onChange: function onChange(val) {
572
597
  return upDateState('timeType', val);
@@ -582,7 +607,7 @@ var PayOrderList = function PayOrderList(tabActive) {
582
607
  children: "\u6253\u6B3E\u65F6\u95F4"
583
608
  })]
584
609
  }), /*#__PURE__*/_jsx(Select, {
585
- className: styles.custom_box_search_cascader,
610
+ className: "custom_box_search_cascader",
586
611
  value: paySearch.workPayStatus,
587
612
  onChange: function onChange(val) {
588
613
  return upDateState('workPayStatus', val);
@@ -594,10 +619,14 @@ var PayOrderList = function PayOrderList(tabActive) {
594
619
  }, item.value);
595
620
  })
596
621
  }), /*#__PURE__*/_jsx(Checkbox, {
597
- className: styles.custom_box_search_buyer,
622
+ className: "custom_box_search_buyer",
598
623
  checked: paySearch.isBuyer,
599
624
  onChange: function onChange(e) {
600
- return upDateState('isBuyer', e.target.checked);
625
+ if (!platformInfo.buyerId) {
626
+ return message.warning('请先选择买家,再查询工单!');
627
+ }
628
+
629
+ upDateState('isBuyer', e.target.checked);
601
630
  },
602
631
  children: "\u5F53\u524D\u4E70\u5BB6"
603
632
  }), /*#__PURE__*/_jsx(RangePicker, {
@@ -609,7 +638,7 @@ var PayOrderList = function PayOrderList(tabActive) {
609
638
  }
610
639
  })]
611
640
  }), /*#__PURE__*/_jsx("div", {
612
- className: styles.custom_box_search_refresh,
641
+ className: "custom_box_search_refresh",
613
642
  onClick: function onClick() {
614
643
  return onSearch();
615
644
  },
@@ -619,7 +648,7 @@ var PayOrderList = function PayOrderList(tabActive) {
619
648
  })
620
649
  })]
621
650
  }), /*#__PURE__*/_jsx("main", {
622
- className: styles.payment_box_main,
651
+ className: "payment_box_main",
623
652
  children: payOrderList.length ? payOrderList.map(function (item) {
624
653
  return PayListOrderItem({
625
654
  record: item,
@@ -634,7 +663,7 @@ var PayOrderList = function PayOrderList(tabActive) {
634
663
  onLog: handleOpenLog
635
664
  });
636
665
  }) : /*#__PURE__*/_jsx("div", {
637
- className: styles.custom_box_main_empty,
666
+ className: "custom_box_main_empty",
638
667
  children: /*#__PURE__*/_jsxs("div", {
639
668
  children: [/*#__PURE__*/_jsx("img", {
640
669
  src: emptyImg,
@@ -645,7 +674,7 @@ var PayOrderList = function PayOrderList(tabActive) {
645
674
  })
646
675
  })
647
676
  }), /*#__PURE__*/_jsx("div", {
648
- className: styles.custom_box_page,
677
+ className: "custom_box_page",
649
678
  children: /*#__PURE__*/_jsx(Pagination, {
650
679
  showQuickJumper: true,
651
680
  showSizeChanger: false,
@@ -659,6 +688,9 @@ var PayOrderList = function PayOrderList(tabActive) {
659
688
  })
660
689
  }), /*#__PURE__*/_jsx(RecordModal, {
661
690
  ref: logRef
691
+ }), /*#__PURE__*/_jsx(PayOrderModal, {
692
+ ref: payOrderRef,
693
+ afterSuccessUpdateWorkOrder: onSearch
662
694
  })]
663
695
  });
664
696
  };
@@ -56,11 +56,12 @@
56
56
  left: 0;
57
57
  z-index: 3;
58
58
  height: 70px;
59
+ padding: 4px;
59
60
  overflow: auto;
60
61
  background-color: #fff;
61
-
62
62
  &:hover {
63
63
  height: 200px;
64
+ box-shadow: 3px 3px 5px #eee;
64
65
  }
65
66
  }
66
67
 
@@ -10,6 +10,7 @@ export interface WorkOrderState {
10
10
  customSearch: any;
11
11
  paySearch: any;
12
12
  templateDetails: any;
13
+ loading: boolean;
13
14
  }
14
15
  export declare const fetchQueryCurrentCompanyUser: any;
15
16
  export declare const fetchQueryGroupCustomTemplate: any;
@@ -20,6 +21,10 @@ export declare const workOrderSlice: import("@reduxjs/toolkit").Slice<any, {
20
21
  payload: any;
21
22
  type: string;
22
23
  }) => any;
24
+ setIsBuyer: (state: import("immer/dist/internal").WritableDraft<WorkOrderState>, action: {
25
+ payload: any;
26
+ type: string;
27
+ }) => void;
23
28
  }, "workOrder">;
24
29
  export declare const setState: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, string>;
25
30
  declare const _default: import("redux").Reducer<any, import("redux").AnyAction>;