kmkf-work-order-service-component 0.3.0-alpha.9 → 0.3.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.
@@ -0,0 +1,53 @@
|
|
1
|
+
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; }
|
2
|
+
|
3
|
+
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; }
|
4
|
+
|
5
|
+
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; }
|
6
|
+
|
7
|
+
/*
|
8
|
+
* @Author: wangzhenggui jianjia.wzg@raycloud.com
|
9
|
+
* @Date: 2022-09-13 14:30:28
|
10
|
+
* @LastEditors: litian
|
11
|
+
* @LastEditTime: 2022-12-01 16:30:15
|
12
|
+
* @FilePath: /kmkf-work-order-service-component/src/WorkOrder/components/CustomizeFormModal/wrap.tsx
|
13
|
+
* @Description:
|
14
|
+
*
|
15
|
+
* Copyright (c) 2022 by wangzhenggui jianjia.wzg@raycloud.com, All Rights Reserved.
|
16
|
+
*/
|
17
|
+
import React, { createRef } from 'react';
|
18
|
+
import { render as reactRender, unmount as reactUnmount } from 'rc-util/lib/React/render';
|
19
|
+
import CustomizeFormModal from "./index";
|
20
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
21
|
+
|
22
|
+
var openCustomizeWorkOrder = function openCustomizeWorkOrder(prefixParams) {
|
23
|
+
return function (params) {
|
24
|
+
var container = document.createDocumentFragment();
|
25
|
+
var ref = /*#__PURE__*/createRef();
|
26
|
+
|
27
|
+
function destroy() {
|
28
|
+
reactUnmount(container);
|
29
|
+
}
|
30
|
+
|
31
|
+
function render() {
|
32
|
+
reactRender( /*#__PURE__*/_jsx(CustomizeFormModal, {
|
33
|
+
ref: ref,
|
34
|
+
width: "100%",
|
35
|
+
onSuccess: function onSuccess(val) {
|
36
|
+
if (typeof (prefixParams === null || prefixParams === void 0 ? void 0 : prefixParams.onSuccess) === 'function') {
|
37
|
+
return prefixParams === null || prefixParams === void 0 ? void 0 : prefixParams.onSuccess(val);
|
38
|
+
}
|
39
|
+
|
40
|
+
destroy();
|
41
|
+
},
|
42
|
+
shopList: prefixParams === null || prefixParams === void 0 ? void 0 : prefixParams.shopList
|
43
|
+
}), container);
|
44
|
+
setTimeout(function () {
|
45
|
+
ref.current.openModal(_objectSpread({}, params));
|
46
|
+
});
|
47
|
+
}
|
48
|
+
|
49
|
+
render();
|
50
|
+
};
|
51
|
+
};
|
52
|
+
|
53
|
+
export default openCustomizeWorkOrder;
|
@@ -35,12 +35,13 @@ import express from "../common/utils/express";
|
|
35
35
|
import formatAddrData from "../common/utils/formatAddrData";
|
36
36
|
import store from "../model/store";
|
37
37
|
import OrderList from "./components/CustomizeWorkOrderList";
|
38
|
-
import PaymentWorkOrderList from "./components/PaymentWorkOrderList";
|
39
38
|
import Reminder from "./components/Reminder";
|
39
|
+
import PaymentWorkOrderList from "./components/PaymentWorkOrderList";
|
40
40
|
import { PlatForm } from "./types";
|
41
41
|
import "./index.less";
|
42
42
|
import { jsx as _jsx } from "react/jsx-runtime";
|
43
43
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
44
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
44
45
|
|
45
46
|
var WorkOrder = function WorkOrder(props) {
|
46
47
|
var platform = props.platform,
|
@@ -119,37 +120,39 @@ var WorkOrder = function WorkOrder(props) {
|
|
119
120
|
return item.shopId == shopId;
|
120
121
|
});
|
121
122
|
}, [shopList]);
|
122
|
-
return /*#__PURE__*/
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
})
|
152
|
-
})
|
123
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
124
|
+
children: [/*#__PURE__*/_jsx(Spin, {
|
125
|
+
spinning: loading,
|
126
|
+
children: /*#__PURE__*/_jsxs("div", {
|
127
|
+
id: "customize-work-order-component",
|
128
|
+
className: "order_container ".concat(platform === PlatForm.FXG ? '' : 'order_container_padding_bottom'),
|
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
|
+
}), /*#__PURE__*/_jsx(OrderList, {
|
148
|
+
tabActive: tabActive
|
149
|
+
}), /*#__PURE__*/_jsx(PaymentWorkOrderList, {
|
150
|
+
tabActive: tabActive
|
151
|
+
})]
|
152
|
+
})
|
153
|
+
}), !isEmpower && Reminder({
|
154
|
+
callback: onEmpowerCallback
|
155
|
+
})]
|
153
156
|
});
|
154
157
|
};
|
155
158
|
|