@kengic/core.react 0.0.1-beta.48 → 0.0.1-beta.49
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.
package/kengic-core.react.js
CHANGED
|
@@ -66401,15 +66401,15 @@ function doKgWorkStation(e = "") {
|
|
|
66401
66401
|
store.dispatch(closeModal({ id: e }));
|
|
66402
66402
|
},
|
|
66403
66403
|
get(t) {
|
|
66404
|
-
const r = ref(store.getState()[e]), n = store.subscribe(() =>
|
|
66405
|
-
r.value = t(store.getState()[e]);
|
|
66406
|
-
});
|
|
66404
|
+
const r = ref(store.getState()[e]), n = store.subscribe(() => r.value = t(store.getState()[e]));
|
|
66407
66405
|
return [r, n];
|
|
66408
66406
|
},
|
|
66409
66407
|
getIsVisible() {
|
|
66410
|
-
const t = ref(getIsVisible(e)(store.getState())), r = store.subscribe(() =>
|
|
66411
|
-
|
|
66412
|
-
|
|
66408
|
+
const t = ref(getIsVisible(e)(store.getState())), r = store.subscribe(() => t.value = getIsVisible(e)(store.getState()));
|
|
66409
|
+
return [t, r];
|
|
66410
|
+
},
|
|
66411
|
+
getWorkStation() {
|
|
66412
|
+
const t = ref(getIsVisible(e)(store.getState())), r = store.subscribe(() => t.value = getWorkStation(e)(store.getState()));
|
|
66413
66413
|
return [t, r];
|
|
66414
66414
|
},
|
|
66415
66415
|
id: e,
|
|
@@ -66498,28 +66498,29 @@ class KgUtil {
|
|
|
66498
66498
|
}
|
|
66499
66499
|
}
|
|
66500
66500
|
function KgWorkStationModal() {
|
|
66501
|
-
|
|
66501
|
+
var ta;
|
|
66502
|
+
const e = useID(), t = doKgWorkStation(e), r = useReduxDispatch(), n = useReduxSelector(getIsVisible(e)), a = useReduxSelector(getIsOpen(e)), [s, u] = reactExports.useState([]), [g, C] = reactExports.useState([]), [w, D] = reactExports.useState([]), G = useReduxSelector(getWorkStation(e)), ne = useReduxSelector(getWorkStationArea(e)), oe = ((ta = s.find((oa) => oa.devcod === g[0])) == null ? void 0 : ta.workstationAreas) ?? [], se = {
|
|
66502
66503
|
hideSelectAll: !0,
|
|
66503
|
-
onChange(
|
|
66504
|
-
C(
|
|
66504
|
+
onChange(oa) {
|
|
66505
|
+
C(oa.length > 1 ? [oa[0]] : oa);
|
|
66505
66506
|
},
|
|
66506
66507
|
selectedRowKeys: g
|
|
66507
66508
|
}, ue = {
|
|
66508
66509
|
hideSelectAll: !0,
|
|
66509
|
-
onChange(
|
|
66510
|
-
D(
|
|
66510
|
+
onChange(oa) {
|
|
66511
|
+
D(oa.length > 1 ? [oa[0]] : oa);
|
|
66511
66512
|
},
|
|
66512
66513
|
selectedRowKeys: w
|
|
66513
66514
|
}, ae = [
|
|
66514
66515
|
{
|
|
66515
66516
|
dataIndex: "devcodDsc",
|
|
66516
|
-
render: (
|
|
66517
|
+
render: (oa) => oa,
|
|
66517
66518
|
title: /* @__PURE__ */ jsxRuntimeExports.jsx(MemoizedFormattedMessage, { id: "KgWorkStation.workStation" })
|
|
66518
66519
|
}
|
|
66519
66520
|
], ct = [
|
|
66520
66521
|
{
|
|
66521
66522
|
dataIndex: "wrkareDsc",
|
|
66522
|
-
render: (
|
|
66523
|
+
render: (oa) => oa,
|
|
66523
66524
|
title: /* @__PURE__ */ jsxRuntimeExports.jsx(MemoizedFormattedMessage, { id: "KgWorkStation.workStationArea" })
|
|
66524
66525
|
}
|
|
66525
66526
|
];
|
|
@@ -66530,23 +66531,23 @@ function KgWorkStationModal() {
|
|
|
66530
66531
|
t.closeModal();
|
|
66531
66532
|
}
|
|
66532
66533
|
function ut() {
|
|
66533
|
-
const
|
|
66534
|
-
r(setWorkStation({ id: e, workStation: s.find((
|
|
66534
|
+
const oa = () => {
|
|
66535
|
+
r(setWorkStation({ id: e, workStation: s.find((ia) => ia.devcod === g[0]) ?? null })), r(setWorkStationArea({ id: e, workStationArea: oe.find((ia) => ia.wrkare === w[0]) ?? null }));
|
|
66535
66536
|
};
|
|
66536
|
-
n ? (g[0] !== (G == null ? void 0 : G.devcod) || w[0] !== (ne == null ? void 0 : ne.wrkare)) && (
|
|
66537
|
+
console.log("0001"), n ? (console.log("0003"), (g[0] !== (G == null ? void 0 : G.devcod) || w[0] !== (ne == null ? void 0 : ne.wrkare)) && (console.log("0004"), oa(), KgUtil.confirm({
|
|
66537
66538
|
content: /* @__PURE__ */ jsxRuntimeExports.jsx(MemoizedFormattedMessage, { id: "KgWorkStation.reloadMessage" }),
|
|
66538
66539
|
kgHideCancelButton: !0,
|
|
66539
66540
|
okButtonProps: { danger: !1 },
|
|
66540
66541
|
okText: /* @__PURE__ */ jsxRuntimeExports.jsx(MemoizedFormattedMessage, { id: "kg.refresh" }),
|
|
66541
66542
|
onOk: () => {
|
|
66542
|
-
window.location.reload();
|
|
66543
|
+
console.log("0005"), window.location.reload();
|
|
66543
66544
|
}
|
|
66544
|
-
})) : (
|
|
66545
|
+
}))) : (console.log("0002"), oa(), emit({ event: "onOk", id: e, parameter: {} })), t.closeModal();
|
|
66545
66546
|
}
|
|
66546
66547
|
async function ra() {
|
|
66547
|
-
var
|
|
66548
|
-
const
|
|
66549
|
-
|
|
66548
|
+
var ia, ca;
|
|
66549
|
+
const oa = ((ia = await List({ params: { pageNo: 1, pageSize: 999 } })) == null ? void 0 : ia.records) ?? [];
|
|
66550
|
+
oa.find((sa) => sa.devcod === (G == null ? void 0 : G.devcod)) ? (C([G == null ? void 0 : G.devcod]), (ca = G == null ? void 0 : G.workstationAreas) != null && ca.find((sa) => sa.wrkare === (ne == null ? void 0 : ne.wrkare)) ? D([ne == null ? void 0 : ne.wrkare]) : D([])) : (C([]), D([])), u(oa);
|
|
66550
66551
|
}
|
|
66551
66552
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: a && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
66552
66553
|
KgModal,
|
|
@@ -66569,10 +66570,10 @@ function KgWorkStationModal() {
|
|
|
66569
66570
|
size: "small",
|
|
66570
66571
|
pagination: !1,
|
|
66571
66572
|
rowSelection: se,
|
|
66572
|
-
rowKey: (
|
|
66573
|
-
onRow: (
|
|
66573
|
+
rowKey: (oa) => oa.devcod,
|
|
66574
|
+
onRow: (oa) => ({
|
|
66574
66575
|
onClick() {
|
|
66575
|
-
g.includes(
|
|
66576
|
+
g.includes(oa.devcod) ? C([]) : C([oa.devcod]);
|
|
66576
66577
|
}
|
|
66577
66578
|
})
|
|
66578
66579
|
}
|
|
@@ -66586,10 +66587,10 @@ function KgWorkStationModal() {
|
|
|
66586
66587
|
size: "small",
|
|
66587
66588
|
pagination: !1,
|
|
66588
66589
|
rowSelection: ue,
|
|
66589
|
-
rowKey: (
|
|
66590
|
-
onRow: (
|
|
66590
|
+
rowKey: (oa) => oa.wrkare,
|
|
66591
|
+
onRow: (oa) => ({
|
|
66591
66592
|
onClick() {
|
|
66592
|
-
w.includes(
|
|
66593
|
+
w.includes(oa.wrkare) ? D([]) : D([oa.wrkare]);
|
|
66593
66594
|
}
|
|
66594
66595
|
})
|
|
66595
66596
|
}
|
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IRemoveEventListener } from '@kengic/core.core';
|
|
2
|
+
import { WorkstationDTO } from '../../api/WMS/models.ts';
|
|
2
3
|
import { IKgWorkStationOnMountEventListener, IKgWorkStationOnOkEventListener } from './index.event';
|
|
3
4
|
import { IKgWorkStationState, store } from './index.store';
|
|
4
5
|
export interface IDoKgWorkStation {
|
|
@@ -18,9 +19,15 @@ export interface IDoKgWorkStation {
|
|
|
18
19
|
/**
|
|
19
20
|
* <p>获取「是否显示」. 在 vue 项目中使用.</p>
|
|
20
21
|
*/
|
|
21
|
-
getIsVisible
|
|
22
|
+
getIsVisible(): [{
|
|
22
23
|
value: boolean;
|
|
23
|
-
}
|
|
24
|
+
}, () => void];
|
|
25
|
+
/**
|
|
26
|
+
* <p>获取「当前选择的工作站」. 在 vue 项目中使用.</p>
|
|
27
|
+
*/
|
|
28
|
+
getWorkStation(): [{
|
|
29
|
+
value: WorkstationDTO | null;
|
|
30
|
+
}, () => void];
|
|
24
31
|
id: string;
|
|
25
32
|
/**
|
|
26
33
|
* 监听事件: 挂载.
|