@kmkf-fe-packages/kmkf-work-order-service-component 0.12.0-alpha.2 → 0.12.0-alpha.4

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,8 @@ interface OrderRemarkProps {
10
10
  remark: string;
11
11
  flag: string;
12
12
  };
13
+ plat: any;
14
+ onJumpMemoPage?: () => void;
13
15
  }
14
16
  declare const OrderRemark: (props: OrderRemarkProps) => React.JSX.Element;
15
17
  export default OrderRemark;
@@ -1,16 +1,22 @@
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
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
3
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
+ 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); }); }; }
1
5
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
6
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
7
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
8
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
9
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
6
10
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
- import React from 'react';
11
+ import React, { useEffect, useState } from 'react';
8
12
  import { debounce } from 'lodash';
9
- import { Button, Modal, Form, Input, Radio, message } from 'antd';
13
+ import { Button, Modal, Form, Input, Radio, message, Space, Checkbox } from 'antd';
10
14
  import { DownOutlined, UpOutlined } from '@ant-design/icons';
15
+ import moment from 'moment';
11
16
  var TextArea = Input.TextArea;
12
- import { updatePlatformMemo } from "../../../model/servers/api";
17
+ import { updatePlatformMemo, getSellerRemark } from "../../../model/servers/api";
13
18
  import styles from "./index.module.less";
19
+ import { useAppSelector } from "../../../model/hooks";
14
20
 
15
21
  // import RemarkModal from './model.tsx';
16
22
 
@@ -20,40 +26,59 @@ import trade2 from "./flag/trade-icon-flag-2.png";
20
26
  import trade3 from "./flag/trade-icon-flag-3.png";
21
27
  import trade4 from "./flag/trade-icon-flag-4.png";
22
28
  import trade5 from "./flag/trade-icon-flag-5.png";
29
+ var timeMap = {
30
+ 'YYYY/MM/DD HH:mm:ss': '年/月/日/时/分/秒',
31
+ 'YYYY/MM/DD HH:mm': '年/月/日/时/分',
32
+ 'YYYY/MM/DD': '年/月/日',
33
+ 'MM/DD': '月/日'
34
+ };
23
35
  var flagList = [trade0, trade1, trade2, trade3, trade4, trade5];
24
36
  var OrderRemark = function OrderRemark(props) {
25
37
  var shopUniqueKey = props.shopUniqueKey,
26
38
  shopSourceStr = props.shopSourceStr,
27
39
  tid = props.tid,
28
40
  shopId = props.shopId,
29
- orderRemarkObj = props.orderRemarkObj;
30
- var _React$useState = React.useState({
41
+ orderRemarkObj = props.orderRemarkObj,
42
+ plat = props.plat,
43
+ onJumpMemoPage = props.onJumpMemoPage;
44
+ var _useState = useState({
31
45
  remark: '',
32
46
  flag: null
33
47
  }),
34
- _React$useState2 = _slicedToArray(_React$useState, 2),
35
- cache = _React$useState2[0],
36
- setCache = _React$useState2[1];
37
- var _React$useState3 = React.useState(''),
38
- _React$useState4 = _slicedToArray(_React$useState3, 2),
39
- remark = _React$useState4[0],
40
- setRemark = _React$useState4[1];
41
- var _React$useState5 = React.useState(null),
42
- _React$useState6 = _slicedToArray(_React$useState5, 2),
43
- flag = _React$useState6[0],
44
- setFlag = _React$useState6[1];
45
- var _React$useState7 = React.useState(false),
46
- _React$useState8 = _slicedToArray(_React$useState7, 2),
47
- loading = _React$useState8[0],
48
- setLoading = _React$useState8[1];
49
- var _React$useState9 = React.useState(false),
50
- _React$useState10 = _slicedToArray(_React$useState9, 2),
51
- isShowModel = _React$useState10[0],
52
- setIsShowModel = _React$useState10[1];
53
- var _React$useState11 = React.useState(false),
54
- _React$useState12 = _slicedToArray(_React$useState11, 2),
55
- isShowDetail = _React$useState12[0],
56
- setIsShowDetail = _React$useState12[1];
48
+ _useState2 = _slicedToArray(_useState, 2),
49
+ cache = _useState2[0],
50
+ setCache = _useState2[1];
51
+ var _useState3 = useState(''),
52
+ _useState4 = _slicedToArray(_useState3, 2),
53
+ remark = _useState4[0],
54
+ setRemark = _useState4[1];
55
+ var _useState5 = useState(null),
56
+ _useState6 = _slicedToArray(_useState5, 2),
57
+ flag = _useState6[0],
58
+ setFlag = _useState6[1];
59
+ var _useState7 = useState(false),
60
+ _useState8 = _slicedToArray(_useState7, 2),
61
+ loading = _useState8[0],
62
+ setLoading = _useState8[1];
63
+ var _useState9 = useState(false),
64
+ _useState10 = _slicedToArray(_useState9, 2),
65
+ isShowModel = _useState10[0],
66
+ setIsShowModel = _useState10[1];
67
+ var _useState11 = useState(false),
68
+ _useState12 = _slicedToArray(_useState11, 2),
69
+ isShowDetail = _useState12[0],
70
+ setIsShowDetail = _useState12[1];
71
+ var _useState13 = useState({
72
+ submitter: false,
73
+ submitTime: false,
74
+ submitTimeFormat: 'YYYY/MM/DD HH:mm:ss'
75
+ }),
76
+ _useState14 = _slicedToArray(_useState13, 2),
77
+ memoConfig = _useState14[0],
78
+ setMemoConfig = _useState14[1];
79
+ var accountName = useAppSelector(function (state) {
80
+ return state.workOrder.userInfo.account;
81
+ });
57
82
  var remarkMaxLen = shopSourceStr && {
58
83
  PDD: 500,
59
84
  TAOBAO: 1000,
@@ -67,6 +92,28 @@ var OrderRemark = function OrderRemark(props) {
67
92
 
68
93
  // PS: 超过 200 长度,显示收起、展开按钮
69
94
  var isShowDetailBtn = remark.length > 200;
95
+ var getRemark = /*#__PURE__*/function () {
96
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
97
+ var _yield$getSellerRemar, data;
98
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
99
+ while (1) switch (_context.prev = _context.next) {
100
+ case 0:
101
+ _context.next = 2;
102
+ return getSellerRemark();
103
+ case 2:
104
+ _yield$getSellerRemar = _context.sent;
105
+ data = _yield$getSellerRemar.data;
106
+ setMemoConfig(data);
107
+ case 5:
108
+ case "end":
109
+ return _context.stop();
110
+ }
111
+ }, _callee);
112
+ }));
113
+ return function getRemark() {
114
+ return _ref.apply(this, arguments);
115
+ };
116
+ }();
70
117
  var showOrderRemarkModel = function showOrderRemarkModel() {
71
118
  if (!shopId) return message.warn('请先选择店铺');
72
119
  if (!shopUniqueKey) return message.error('异常:店铺UniqueKey没有找到');
@@ -98,17 +145,26 @@ var OrderRemark = function OrderRemark(props) {
98
145
  if (loading) return;
99
146
  setLoading(true);
100
147
  var values = form.getFieldsValue();
101
- var remark = values.remark;
102
- var flag = values.flag || values.flag === 0 ? values.flag + '' : '';
148
+ var newRemark = values.remark;
149
+ var newFlag = values.flag || values.flag === 0 ? values.flag + '' : '';
150
+ if (newRemark.trim() !== remark.trim() || Number(newFlag) !== Number(flag)) {
151
+ if (memoConfig !== null && memoConfig !== void 0 && memoConfig.submitter) {
152
+ newRemark = "".concat(newRemark, " ").concat(accountName);
153
+ }
154
+ if (memoConfig !== null && memoConfig !== void 0 && memoConfig.submitTime) {
155
+ var submitTime = moment().format(memoConfig === null || memoConfig === void 0 ? void 0 : memoConfig.submitTimeFormat);
156
+ newRemark = "".concat(newRemark, " ").concat(submitTime);
157
+ }
158
+ }
103
159
  updatePlatformMemo({
104
160
  shopUniqueKey: shopUniqueKey,
105
161
  tid: tid,
106
- remark: remark,
107
- flag: flag
162
+ remark: newRemark,
163
+ flag: newFlag
108
164
  }).then(function (res) {
109
165
  if (!(res !== null && res !== void 0 && res.success)) return;
110
166
  // getRemarkDetail();
111
- resetData(remark, flag);
167
+ resetData(newRemark, newFlag);
112
168
  setIsShowModel(false);
113
169
  }).catch(function (e) {
114
170
  console.log('updatePlatformMemo error', e);
@@ -116,14 +172,20 @@ var OrderRemark = function OrderRemark(props) {
116
172
  setLoading(false);
117
173
  });
118
174
  };
119
- React.useEffect(function () {
175
+ useEffect(function () {
120
176
  if (!(shopId && shopUniqueKey && tid)) {
121
177
  resetData('', null);
122
178
  }
123
179
  }, [shopId, shopUniqueKey, tid]);
124
- React.useEffect(function () {
180
+ useEffect(function () {
125
181
  resetData((orderRemarkObj === null || orderRemarkObj === void 0 ? void 0 : orderRemarkObj.remark) || '', (orderRemarkObj === null || orderRemarkObj === void 0 ? void 0 : orderRemarkObj.flag) || '');
126
182
  }, [orderRemarkObj]);
183
+ useEffect(function () {
184
+ isShowModel && getRemark();
185
+ }, [isShowModel]);
186
+ var onClick = function onClick() {
187
+ onJumpMemoPage === null || onJumpMemoPage === void 0 ? void 0 : onJumpMemoPage();
188
+ };
127
189
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
128
190
  className: styles.wrap
129
191
  }, remark || flag || flag === 0 ? /*#__PURE__*/React.createElement(React.Fragment, null, isShowDetailBtn && /*#__PURE__*/React.createElement("div", {
@@ -161,7 +223,7 @@ var OrderRemark = function OrderRemark(props) {
161
223
  maxHeight: '500px',
162
224
  overflowY: 'auto'
163
225
  }
164
- }, /*#__PURE__*/React.createElement(Form, {
226
+ }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Form, {
165
227
  form: form
166
228
  }, /*#__PURE__*/React.createElement(Form.Item, {
167
229
  label: "\u6807\u8BB0",
@@ -185,6 +247,15 @@ var OrderRemark = function OrderRemark(props) {
185
247
  placeholder: "\u8BF7\u8F93\u5165\u5907\u6CE8\u5185\u5BB9",
186
248
  showCount: true,
187
249
  maxLength: remarkMaxLen
188
- })))));
250
+ }))), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Checkbox, {
251
+ disabled: true,
252
+ checked: !!(memoConfig !== null && memoConfig !== void 0 && memoConfig.submitter)
253
+ }, "\u63D0\u4EA4\u4EBA"), /*#__PURE__*/React.createElement(Checkbox, {
254
+ disabled: true,
255
+ checked: !!(memoConfig !== null && memoConfig !== void 0 && memoConfig.submitTime)
256
+ }, "\u63D0\u4EA4\u65F6\u95F4:", timeMap[memoConfig === null || memoConfig === void 0 ? void 0 : memoConfig.submitTimeFormat]), (plat === null || plat === void 0 ? void 0 : plat.platform) === 'pc' ? /*#__PURE__*/React.createElement(Button, {
257
+ type: "link",
258
+ onClick: onClick
259
+ }, "\u8BBE\u7F6E") : null))));
189
260
  };
190
261
  export default OrderRemark;
@@ -9,14 +9,13 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
9
9
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
10
10
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
11
11
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
- import React, { useEffect, useState } from 'react';
12
+ import React, { useState } from 'react';
13
13
  import { Modal, Timeline } from 'antd';
14
14
  import { useSelector, useDispatch } from 'react-redux';
15
15
  import { selectVisibleRemarkList, selectRemarkRecordList, selectCurrentNodeDetail } from "../../../model/flowTemplateDetail/selector";
16
16
  import { setVisibleRemarkList } from "../../../model/flowTemplateDetail";
17
17
  import { reportLogs } from "../../../model/servers/api";
18
18
  import { getFlowOperate } from "../../common";
19
- import { OperationLog } from '@kmkf-fe-packages/services-components';
20
19
  import styles from "./index.module.less";
21
20
  var Record = function Record(props) {
22
21
  var time = props.time,
@@ -37,11 +36,7 @@ var Record = function Record(props) {
37
36
  className: styles.tag
38
37
  }, getFlowOperate === null || getFlowOperate === void 0 ? void 0 : getFlowOperate[operatorType]))), /*#__PURE__*/React.createElement("div", {
39
38
  className: styles.context
40
- }, context), /*#__PURE__*/React.createElement(OperationLog, {
41
- content: content,
42
- operation: 'ADD',
43
- componentDtoList: componentDtoList
44
- }));
39
+ }, context));
45
40
  };
46
41
  var RemarkListModal = function RemarkListModal() {
47
42
  var _useState = useState(),
@@ -66,13 +61,13 @@ var RemarkListModal = function RemarkListModal() {
66
61
  return reportLogs({
67
62
  pageNo: 1,
68
63
  pageSize: 1000,
69
- rowId: '65378bdcdec9e2017fcc852d',
64
+ rowId: '653f20f7abafc50147eba747',
70
65
  shopId: '460026190'
71
66
  });
72
67
  case 2:
73
68
  _yield$reportLogs = _context.sent;
74
69
  result = _yield$reportLogs.data.result;
75
- setContent((_result$ = result[0]) === null || _result$ === void 0 ? void 0 : _result$.content);
70
+ setContent((_result$ = result[1]) === null || _result$ === void 0 ? void 0 : _result$.content);
76
71
  case 5:
77
72
  case "end":
78
73
  return _context.stop();
@@ -83,11 +78,12 @@ var RemarkListModal = function RemarkListModal() {
83
78
  return _ref.apply(this, arguments);
84
79
  };
85
80
  }();
86
- useEffect(function () {
87
- if (visible) {
88
- getLog();
89
- }
90
- }, [visible]);
81
+ // useEffect(() => {
82
+ // if (visible) {
83
+ // getLog();
84
+ // }
85
+ // }, [visible]);
86
+
91
87
  return /*#__PURE__*/React.createElement(Modal, {
92
88
  title: "\u8BB0\u5F55",
93
89
  visible: visible,
@@ -95,7 +91,7 @@ var RemarkListModal = function RemarkListModal() {
95
91
  footer: null,
96
92
  bodyStyle: {
97
93
  maxHeight: '500px',
98
- overflowY: 'auto'
94
+ overflow: 'auto'
99
95
  }
100
96
  }, /*#__PURE__*/React.createElement(Timeline, null, list === null || list === void 0 ? void 0 : list.map(function (flowRecord) {
101
97
  var _currentNodeDetail$wo;
@@ -8,6 +8,7 @@ declare type FlowTemplateDetailProps = {
8
8
  shopList: any[];
9
9
  onOpenWangWang?: (nick: string, id: string) => void;
10
10
  callbackDealWorkOrderSuccess?: (type: string, workOrderId?: string) => void;
11
+ onJumpMemoPage?: () => void;
11
12
  };
12
13
  declare const ProviderWrap: (props: FlowTemplateDetailProps) => React.JSX.Element;
13
14
  export default ProviderWrap;
@@ -49,7 +49,8 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
49
49
  flowWorkOrderId = props.flowWorkOrderId,
50
50
  plat = props.plat,
51
51
  onOpenWangWang = props.onOpenWangWang,
52
- callbackDealWorkOrderSuccess = props.callbackDealWorkOrderSuccess;
52
+ callbackDealWorkOrderSuccess = props.callbackDealWorkOrderSuccess,
53
+ onJumpMemoPage = props.onJumpMemoPage;
53
54
  var dispatch = useDispatch();
54
55
  var flowRecordList = useSelector(selectFlowRecordList);
55
56
  var remarkList = useSelector(selectRemarkRecordList);
@@ -823,7 +824,9 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
823
824
  shopId: shopId || formShopId,
824
825
  tid: tid,
825
826
  form: form,
826
- orderRemarkObj: orderRemarkObj
827
+ orderRemarkObj: orderRemarkObj,
828
+ plat: plat,
829
+ onJumpMemoPage: onJumpMemoPage
827
830
  }), /*#__PURE__*/React.createElement(RemarkListModal, null), /*#__PURE__*/React.createElement(ForWardModal, {
828
831
  flowTemplateId: flowTemplateId,
829
832
  nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no21 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no21 === void 0 ? void 0 : _currentNodeDetail$no21.id,
@@ -71,3 +71,4 @@ export declare const updatePlatformMemo: (data: {
71
71
  }) => Promise<any>;
72
72
  export declare const queryNodesByFlowTemplateKey: (data: string) => Promise<any>;
73
73
  export declare const wlnOrderDetail: (data: any) => Promise<any>;
74
+ export declare const getSellerRemark: (data?: any) => Promise<any>;
@@ -461,4 +461,11 @@ export var wlnOrderDetail = function wlnOrderDetail(data) {
461
461
  data: data,
462
462
  infoLevel: 'warning'
463
463
  });
464
+ };
465
+ export var getSellerRemark = function getSellerRemark(data) {
466
+ return request({
467
+ url: '/qy/userConfig/getSellerRemark',
468
+ method: 'get',
469
+ data: data
470
+ });
464
471
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/kmkf-work-order-service-component",
3
- "version": "0.12.0-alpha.2",
3
+ "version": "0.12.0-alpha.4",
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": "^0.12.0-alpha.2",
36
- "@kmkf-fe-packages/kmkf-utils": "^0.12.0-alpha.2",
37
- "@kmkf-fe-packages/services-components": "^0.12.0-alpha.2",
35
+ "@kmkf-fe-packages/basic-components": "^0.12.0-alpha.4",
36
+ "@kmkf-fe-packages/kmkf-utils": "^0.12.0-alpha.4",
37
+ "@kmkf-fe-packages/services-components": "^0.12.0-alpha.4",
38
38
  "@reduxjs/toolkit": "^1.8.5",
39
39
  "ahooks": "^3.7.4",
40
40
  "copy-to-clipboard": "^3.3.3",
@@ -72,7 +72,7 @@
72
72
  "publishConfig": {
73
73
  "access": "public"
74
74
  },
75
- "gitHead": "c5701df104256c82fd72607ed5e92d77ff2a717d",
75
+ "gitHead": "3591e470c205df0cfc3058b422616a79d03395e3",
76
76
  "gitHooks": {
77
77
  "pre-commit": "lint-staged"
78
78
  }