bm-admin-ui 1.1.12-alpha → 1.1.13-alpha
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/es/components/flow-designer/index.js +7 -0
- package/es/components/flow-designer/src/bm-nodes/BmHtmlNode.vue.d.ts +1 -0
- package/es/components/form-create/index.js +95 -11
- package/lib/components/flow-designer/index.js +7 -0
- package/lib/components/flow-designer/src/bm-nodes/BmHtmlNode.vue.d.ts +1 -0
- package/lib/components/form-create/index.js +95 -11
- package/package.json +1 -1
- package/types/components/flow-designer/src/bm-nodes/BmHtmlNode.vue.d.ts +1 -0
|
@@ -117,10 +117,14 @@ const _sfc_main$2 = defineComponent({
|
|
|
117
117
|
const isEditLabel = ref(false);
|
|
118
118
|
const tempLabel = ref("");
|
|
119
119
|
tempLabel.value = "";
|
|
120
|
+
const inputRef = ref();
|
|
120
121
|
const methods = {
|
|
121
122
|
toEditLabel() {
|
|
122
123
|
tempLabel.value = props["label"];
|
|
123
124
|
isEditLabel.value = true;
|
|
125
|
+
nextTick(() => {
|
|
126
|
+
inputRef.value?.focus();
|
|
127
|
+
});
|
|
124
128
|
},
|
|
125
129
|
updateLabel(_) {
|
|
126
130
|
nextTick(() => {
|
|
@@ -134,6 +138,7 @@ const _sfc_main$2 = defineComponent({
|
|
|
134
138
|
}
|
|
135
139
|
};
|
|
136
140
|
return {
|
|
141
|
+
inputRef,
|
|
137
142
|
isEditLabel,
|
|
138
143
|
tempLabel,
|
|
139
144
|
...methods
|
|
@@ -158,8 +163,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
158
163
|
onClick: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.toEditLabel && _ctx.toEditLabel(...args), ["stop"]))
|
|
159
164
|
}, toDisplayString(_ctx.label), 1)) : (openBlock(), createBlock(_component_AInput, {
|
|
160
165
|
key: 1,
|
|
166
|
+
ref: "inputRef",
|
|
161
167
|
value: _ctx.tempLabel,
|
|
162
168
|
"onUpdate:value": _cache[1] || (_cache[1] = ($event) => _ctx.tempLabel = $event),
|
|
169
|
+
maxlength: 10,
|
|
163
170
|
size: "small",
|
|
164
171
|
onBlur: _ctx.updateLabel,
|
|
165
172
|
onKeydown: withKeys(_ctx.updateLabel, ["enter"])
|
|
@@ -3,6 +3,7 @@ declare const _default: import("vue").DefineComponent<Readonly<import("vue").Com
|
|
|
3
3
|
}>>, {
|
|
4
4
|
toEditLabel(): void;
|
|
5
5
|
updateLabel(_: any): void;
|
|
6
|
+
inputRef: import("vue").Ref<any>;
|
|
6
7
|
isEditLabel: import("vue").Ref<boolean>;
|
|
7
8
|
tempLabel: any;
|
|
8
9
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:label"[], "update:label", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<readonly string[] | import("vue").ExtractPropTypes<Readonly<import("vue").ComponentObjectPropsOptions<{
|
|
@@ -18769,15 +18769,20 @@ const _sfc_main$7 = defineComponent({
|
|
|
18769
18769
|
\u5EFA\u8BAE\u96F6\u552E\u4EF7: "retailPrice",
|
|
18770
18770
|
\u5546\u54C1\u7BB1\u89C4: "carton",
|
|
18771
18771
|
\u5546\u54C1\u5355\u4F4D: "unit",
|
|
18772
|
+
\u4E00\u7EA7\u5206\u7C7B: "categoryFirst",
|
|
18773
|
+
\u4E8C\u7EA7\u5206\u7C7B: "categorySecond",
|
|
18774
|
+
\u4E09\u7EA7\u5206\u7C7B: "categoryThrid",
|
|
18775
|
+
\u5546\u54C1\u7C7B\u578B: "productType",
|
|
18776
|
+
\u5546\u54C1\u6807\u7B7E: "productTag",
|
|
18772
18777
|
\u5E97\u94FA\u6240\u5C5E\u5E73\u53F0: "platformName",
|
|
18773
18778
|
\u6E20\u9053: "channelName",
|
|
18774
18779
|
\u6E20\u9053\u7C7B\u522B: "channelTypeName",
|
|
18775
|
-
\u5BA2\u6237\u7B80\u79F0: "",
|
|
18776
|
-
\u5BA2\u6237\u7C7B\u578B: "",
|
|
18777
|
-
\u5BA2\u6237\u7B49\u7EA7: "",
|
|
18778
|
-
\u6240\u5C5E\u5E97\u94FA: "",
|
|
18779
|
-
\u5E97\u94FA\u7F16\u53F7: "",
|
|
18780
|
-
SAP\u5BA2\u6237\u7F16\u53F7: ""
|
|
18780
|
+
\u5BA2\u6237\u7B80\u79F0: "clientShortName",
|
|
18781
|
+
\u5BA2\u6237\u7C7B\u578B: "b2bType",
|
|
18782
|
+
\u5BA2\u6237\u7B49\u7EA7: "b2bLevel",
|
|
18783
|
+
\u6240\u5C5E\u5E97\u94FA: "shopName",
|
|
18784
|
+
\u5E97\u94FA\u7F16\u53F7: "shopCode",
|
|
18785
|
+
SAP\u5BA2\u6237\u7F16\u53F7: "sapCode"
|
|
18781
18786
|
};
|
|
18782
18787
|
let indexMap = {
|
|
18783
18788
|
product: 0,
|
|
@@ -18846,7 +18851,7 @@ const _sfc_main$7 = defineComponent({
|
|
|
18846
18851
|
const tableConfig = computed(() => props.rule?.config?.tableConfig || {});
|
|
18847
18852
|
const validColumns = computed(() => columns.filter((c) => isValidColumn(c)));
|
|
18848
18853
|
const isProductCenter = computed(
|
|
18849
|
-
() => tableConfig.value
|
|
18854
|
+
() => tableConfig.value.system === "productCenter"
|
|
18850
18855
|
);
|
|
18851
18856
|
const isProductCenterSuit = computed(
|
|
18852
18857
|
() => isProductCenter.value && [
|
|
@@ -18891,7 +18896,40 @@ const _sfc_main$7 = defineComponent({
|
|
|
18891
18896
|
if (Object.keys(indexMap).includes(name)) {
|
|
18892
18897
|
pre.push(...getExtraColumns(cur));
|
|
18893
18898
|
} else {
|
|
18894
|
-
|
|
18899
|
+
let childField = cur.field;
|
|
18900
|
+
let title = cur.title?.title;
|
|
18901
|
+
if (isProductCenter.value && cur.field === "picUrl") {
|
|
18902
|
+
pre.push({
|
|
18903
|
+
field: childField,
|
|
18904
|
+
title,
|
|
18905
|
+
minWidth: "138px",
|
|
18906
|
+
slots: {
|
|
18907
|
+
default({ row }) {
|
|
18908
|
+
if (row?.[childField]) {
|
|
18909
|
+
return h("img", {
|
|
18910
|
+
src: props.extraConfig.common.previewImg(row[childField]),
|
|
18911
|
+
style: {
|
|
18912
|
+
width: "86px",
|
|
18913
|
+
height: "86px",
|
|
18914
|
+
padding: "8px"
|
|
18915
|
+
}
|
|
18916
|
+
});
|
|
18917
|
+
}
|
|
18918
|
+
return h(
|
|
18919
|
+
"div",
|
|
18920
|
+
{
|
|
18921
|
+
style: {
|
|
18922
|
+
color: "#9393A3"
|
|
18923
|
+
}
|
|
18924
|
+
},
|
|
18925
|
+
["\u7CFB\u7EDF\u81EA\u52A8\u5E26\u51FA"]
|
|
18926
|
+
);
|
|
18927
|
+
}
|
|
18928
|
+
}
|
|
18929
|
+
});
|
|
18930
|
+
} else {
|
|
18931
|
+
pre.push(ruleList[name].tableRule(cur, props.extraConfig));
|
|
18932
|
+
}
|
|
18895
18933
|
}
|
|
18896
18934
|
return pre;
|
|
18897
18935
|
}, [])
|
|
@@ -19080,6 +19118,31 @@ const _sfc_main$7 = defineComponent({
|
|
|
19080
19118
|
return Promise.resolve(result);
|
|
19081
19119
|
}
|
|
19082
19120
|
}
|
|
19121
|
+
async function queryCustomerInfo(rule, row) {
|
|
19122
|
+
const field = rule.field;
|
|
19123
|
+
const associatedFields = rule?.config?.associatedFields;
|
|
19124
|
+
const otherAssociatedFields = rule?.config?.otherAssociatedFields;
|
|
19125
|
+
let result = void 0;
|
|
19126
|
+
try {
|
|
19127
|
+
if (row[field]) {
|
|
19128
|
+
result = await props.extraConfig.customer?.fetch({
|
|
19129
|
+
clientCode: row[field],
|
|
19130
|
+
filterByShopcode: rule?.config?.dataFiltering
|
|
19131
|
+
});
|
|
19132
|
+
if (!result) {
|
|
19133
|
+
row[field] = "";
|
|
19134
|
+
}
|
|
19135
|
+
}
|
|
19136
|
+
processAssociatedFields(field, associatedFields, row, result);
|
|
19137
|
+
processOtherAssociatedFields(field, otherAssociatedFields, row, result);
|
|
19138
|
+
return result;
|
|
19139
|
+
} catch (e) {
|
|
19140
|
+
row[field] = "";
|
|
19141
|
+
processAssociatedFields(field, associatedFields, row, result);
|
|
19142
|
+
processOtherAssociatedFields(field, otherAssociatedFields, row, result);
|
|
19143
|
+
return Promise.resolve(result);
|
|
19144
|
+
}
|
|
19145
|
+
}
|
|
19083
19146
|
function processAssociatedFields(field, associatedFields, row, result) {
|
|
19084
19147
|
if (associatedFields.length)
|
|
19085
19148
|
associatedFields.forEach((item) => {
|
|
@@ -19279,6 +19342,18 @@ const _sfc_main$7 = defineComponent({
|
|
|
19279
19342
|
break;
|
|
19280
19343
|
}
|
|
19281
19344
|
}
|
|
19345
|
+
if (rule.name === "customer") {
|
|
19346
|
+
try {
|
|
19347
|
+
const productInfo = await queryCustomerInfo(rule, row);
|
|
19348
|
+
if (!productInfo) {
|
|
19349
|
+
error = `${title}\u67E5\u8BE2\u7684\u5BA2\u6237\u4E0D\u5B58\u5728`;
|
|
19350
|
+
break;
|
|
19351
|
+
}
|
|
19352
|
+
} catch (e) {
|
|
19353
|
+
error = `${title}\u67E5\u8BE2\u7684\u5BA2\u6237\u4E0D\u5B58\u5728`;
|
|
19354
|
+
break;
|
|
19355
|
+
}
|
|
19356
|
+
}
|
|
19282
19357
|
if (rule.name === "shop") {
|
|
19283
19358
|
try {
|
|
19284
19359
|
const shopInfo = await props.extraConfig[rule.name].getShopInfo({
|
|
@@ -19331,6 +19406,10 @@ const _sfc_main$7 = defineComponent({
|
|
|
19331
19406
|
}
|
|
19332
19407
|
queryProductInfo(rule, row);
|
|
19333
19408
|
}
|
|
19409
|
+
function handleCustomerPressEnter(value, rule, row) {
|
|
19410
|
+
row[rule.field] = value;
|
|
19411
|
+
queryCustomerInfo(rule, row);
|
|
19412
|
+
}
|
|
19334
19413
|
function handleShopOption(value, rule, row) {
|
|
19335
19414
|
row[rule?.field] = value;
|
|
19336
19415
|
processAssociatedFields(
|
|
@@ -19485,7 +19564,7 @@ const _sfc_main$7 = defineComponent({
|
|
|
19485
19564
|
createTextVNode(toDisplayString(__props.rule.title.title) + " ", 1),
|
|
19486
19565
|
createElementVNode("span", _hoisted_3$3, toDisplayString(unref(countText)), 1),
|
|
19487
19566
|
createCommentVNode(" \u5546\u54C1\u4E2D\u5FC3\u5B9A\u5236 \u6309\u94AE "),
|
|
19488
|
-
unref(
|
|
19567
|
+
unref(isProductCenter) ? (openBlock(), createElementBlock("div", _hoisted_4$3, [
|
|
19489
19568
|
!__props.hidden ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
19490
19569
|
unref(tableConfig).buttons?.includes("import") ? (openBlock(), createElementBlock("input", {
|
|
19491
19570
|
key: 0,
|
|
@@ -19692,7 +19771,7 @@ const _sfc_main$7 = defineComponent({
|
|
|
19692
19771
|
value: row[item.field],
|
|
19693
19772
|
disabled: item.disabled || pruductInputDisabled(item.config?.dataFiltering),
|
|
19694
19773
|
"shop-value": unref(formData)[item.config.dataFiltering],
|
|
19695
|
-
onChange: ($event) =>
|
|
19774
|
+
onChange: ($event) => handleCustomerPressEnter($event, item, row)
|
|
19696
19775
|
}, null, 8, ["value", "disabled", "shop-value", "onChange"])
|
|
19697
19776
|
])
|
|
19698
19777
|
};
|
|
@@ -20360,7 +20439,12 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
20360
20439
|
\u5546\u54C1\u56FE\u7247: "picUrl",
|
|
20361
20440
|
\u5EFA\u8BAE\u96F6\u552E\u4EF7: "retailPrice",
|
|
20362
20441
|
\u5546\u54C1\u7BB1\u89C4: "carton",
|
|
20363
|
-
\u5546\u54C1\u5355\u4F4D: "unit"
|
|
20442
|
+
\u5546\u54C1\u5355\u4F4D: "unit",
|
|
20443
|
+
\u4E00\u7EA7\u5206\u7C7B: "categoryFirst",
|
|
20444
|
+
\u4E8C\u7EA7\u5206\u7C7B: "categorySecond",
|
|
20445
|
+
\u4E09\u7EA7\u5206\u7C7B: "categoryThrid",
|
|
20446
|
+
\u5546\u54C1\u7C7B\u578B: "productType",
|
|
20447
|
+
\u5546\u54C1\u6807\u7B7E: "productTag"
|
|
20364
20448
|
};
|
|
20365
20449
|
const unitMap = ["\u652F", "\u74F6", "\u5957", "\u7EC4", "\u7BB1", "\u4E2A", "\u5F20"];
|
|
20366
20450
|
const formData = computed(() => props.formCreateInject.api.bind());
|
|
@@ -128,10 +128,14 @@ const _sfc_main$2 = vue.defineComponent({
|
|
|
128
128
|
const isEditLabel = vue.ref(false);
|
|
129
129
|
const tempLabel = vue.ref("");
|
|
130
130
|
tempLabel.value = "";
|
|
131
|
+
const inputRef = vue.ref();
|
|
131
132
|
const methods = {
|
|
132
133
|
toEditLabel() {
|
|
133
134
|
tempLabel.value = props["label"];
|
|
134
135
|
isEditLabel.value = true;
|
|
136
|
+
vue.nextTick(() => {
|
|
137
|
+
inputRef.value?.focus();
|
|
138
|
+
});
|
|
135
139
|
},
|
|
136
140
|
updateLabel(_) {
|
|
137
141
|
vue.nextTick(() => {
|
|
@@ -145,6 +149,7 @@ const _sfc_main$2 = vue.defineComponent({
|
|
|
145
149
|
}
|
|
146
150
|
};
|
|
147
151
|
return {
|
|
152
|
+
inputRef,
|
|
148
153
|
isEditLabel,
|
|
149
154
|
tempLabel,
|
|
150
155
|
...methods
|
|
@@ -169,8 +174,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
169
174
|
onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => _ctx.toEditLabel && _ctx.toEditLabel(...args), ["stop"]))
|
|
170
175
|
}, vue.toDisplayString(_ctx.label), 1)) : (vue.openBlock(), vue.createBlock(_component_AInput, {
|
|
171
176
|
key: 1,
|
|
177
|
+
ref: "inputRef",
|
|
172
178
|
value: _ctx.tempLabel,
|
|
173
179
|
"onUpdate:value": _cache[1] || (_cache[1] = ($event) => _ctx.tempLabel = $event),
|
|
180
|
+
maxlength: 10,
|
|
174
181
|
size: "small",
|
|
175
182
|
onBlur: _ctx.updateLabel,
|
|
176
183
|
onKeydown: vue.withKeys(_ctx.updateLabel, ["enter"])
|
|
@@ -3,6 +3,7 @@ declare const _default: import("vue").DefineComponent<Readonly<import("vue").Com
|
|
|
3
3
|
}>>, {
|
|
4
4
|
toEditLabel(): void;
|
|
5
5
|
updateLabel(_: any): void;
|
|
6
|
+
inputRef: import("vue").Ref<any>;
|
|
6
7
|
isEditLabel: import("vue").Ref<boolean>;
|
|
7
8
|
tempLabel: any;
|
|
8
9
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:label"[], "update:label", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<readonly string[] | import("vue").ExtractPropTypes<Readonly<import("vue").ComponentObjectPropsOptions<{
|
|
@@ -18783,15 +18783,20 @@ const _sfc_main$7 = vue.defineComponent({
|
|
|
18783
18783
|
\u5EFA\u8BAE\u96F6\u552E\u4EF7: "retailPrice",
|
|
18784
18784
|
\u5546\u54C1\u7BB1\u89C4: "carton",
|
|
18785
18785
|
\u5546\u54C1\u5355\u4F4D: "unit",
|
|
18786
|
+
\u4E00\u7EA7\u5206\u7C7B: "categoryFirst",
|
|
18787
|
+
\u4E8C\u7EA7\u5206\u7C7B: "categorySecond",
|
|
18788
|
+
\u4E09\u7EA7\u5206\u7C7B: "categoryThrid",
|
|
18789
|
+
\u5546\u54C1\u7C7B\u578B: "productType",
|
|
18790
|
+
\u5546\u54C1\u6807\u7B7E: "productTag",
|
|
18786
18791
|
\u5E97\u94FA\u6240\u5C5E\u5E73\u53F0: "platformName",
|
|
18787
18792
|
\u6E20\u9053: "channelName",
|
|
18788
18793
|
\u6E20\u9053\u7C7B\u522B: "channelTypeName",
|
|
18789
|
-
\u5BA2\u6237\u7B80\u79F0: "",
|
|
18790
|
-
\u5BA2\u6237\u7C7B\u578B: "",
|
|
18791
|
-
\u5BA2\u6237\u7B49\u7EA7: "",
|
|
18792
|
-
\u6240\u5C5E\u5E97\u94FA: "",
|
|
18793
|
-
\u5E97\u94FA\u7F16\u53F7: "",
|
|
18794
|
-
SAP\u5BA2\u6237\u7F16\u53F7: ""
|
|
18794
|
+
\u5BA2\u6237\u7B80\u79F0: "clientShortName",
|
|
18795
|
+
\u5BA2\u6237\u7C7B\u578B: "b2bType",
|
|
18796
|
+
\u5BA2\u6237\u7B49\u7EA7: "b2bLevel",
|
|
18797
|
+
\u6240\u5C5E\u5E97\u94FA: "shopName",
|
|
18798
|
+
\u5E97\u94FA\u7F16\u53F7: "shopCode",
|
|
18799
|
+
SAP\u5BA2\u6237\u7F16\u53F7: "sapCode"
|
|
18795
18800
|
};
|
|
18796
18801
|
let indexMap = {
|
|
18797
18802
|
product: 0,
|
|
@@ -18860,7 +18865,7 @@ const _sfc_main$7 = vue.defineComponent({
|
|
|
18860
18865
|
const tableConfig = vue.computed(() => props.rule?.config?.tableConfig || {});
|
|
18861
18866
|
const validColumns = vue.computed(() => columns.filter((c) => isValidColumn(c)));
|
|
18862
18867
|
const isProductCenter = vue.computed(
|
|
18863
|
-
() => tableConfig.value
|
|
18868
|
+
() => tableConfig.value.system === "productCenter"
|
|
18864
18869
|
);
|
|
18865
18870
|
const isProductCenterSuit = vue.computed(
|
|
18866
18871
|
() => isProductCenter.value && [
|
|
@@ -18905,7 +18910,40 @@ const _sfc_main$7 = vue.defineComponent({
|
|
|
18905
18910
|
if (Object.keys(indexMap).includes(name)) {
|
|
18906
18911
|
pre.push(...getExtraColumns(cur));
|
|
18907
18912
|
} else {
|
|
18908
|
-
|
|
18913
|
+
let childField = cur.field;
|
|
18914
|
+
let title = cur.title?.title;
|
|
18915
|
+
if (isProductCenter.value && cur.field === "picUrl") {
|
|
18916
|
+
pre.push({
|
|
18917
|
+
field: childField,
|
|
18918
|
+
title,
|
|
18919
|
+
minWidth: "138px",
|
|
18920
|
+
slots: {
|
|
18921
|
+
default({ row }) {
|
|
18922
|
+
if (row?.[childField]) {
|
|
18923
|
+
return vue.h("img", {
|
|
18924
|
+
src: props.extraConfig.common.previewImg(row[childField]),
|
|
18925
|
+
style: {
|
|
18926
|
+
width: "86px",
|
|
18927
|
+
height: "86px",
|
|
18928
|
+
padding: "8px"
|
|
18929
|
+
}
|
|
18930
|
+
});
|
|
18931
|
+
}
|
|
18932
|
+
return vue.h(
|
|
18933
|
+
"div",
|
|
18934
|
+
{
|
|
18935
|
+
style: {
|
|
18936
|
+
color: "#9393A3"
|
|
18937
|
+
}
|
|
18938
|
+
},
|
|
18939
|
+
["\u7CFB\u7EDF\u81EA\u52A8\u5E26\u51FA"]
|
|
18940
|
+
);
|
|
18941
|
+
}
|
|
18942
|
+
}
|
|
18943
|
+
});
|
|
18944
|
+
} else {
|
|
18945
|
+
pre.push(ruleList[name].tableRule(cur, props.extraConfig));
|
|
18946
|
+
}
|
|
18909
18947
|
}
|
|
18910
18948
|
return pre;
|
|
18911
18949
|
}, [])
|
|
@@ -19094,6 +19132,31 @@ const _sfc_main$7 = vue.defineComponent({
|
|
|
19094
19132
|
return Promise.resolve(result);
|
|
19095
19133
|
}
|
|
19096
19134
|
}
|
|
19135
|
+
async function queryCustomerInfo(rule, row) {
|
|
19136
|
+
const field = rule.field;
|
|
19137
|
+
const associatedFields = rule?.config?.associatedFields;
|
|
19138
|
+
const otherAssociatedFields = rule?.config?.otherAssociatedFields;
|
|
19139
|
+
let result = void 0;
|
|
19140
|
+
try {
|
|
19141
|
+
if (row[field]) {
|
|
19142
|
+
result = await props.extraConfig.customer?.fetch({
|
|
19143
|
+
clientCode: row[field],
|
|
19144
|
+
filterByShopcode: rule?.config?.dataFiltering
|
|
19145
|
+
});
|
|
19146
|
+
if (!result) {
|
|
19147
|
+
row[field] = "";
|
|
19148
|
+
}
|
|
19149
|
+
}
|
|
19150
|
+
processAssociatedFields(field, associatedFields, row, result);
|
|
19151
|
+
processOtherAssociatedFields(field, otherAssociatedFields, row, result);
|
|
19152
|
+
return result;
|
|
19153
|
+
} catch (e) {
|
|
19154
|
+
row[field] = "";
|
|
19155
|
+
processAssociatedFields(field, associatedFields, row, result);
|
|
19156
|
+
processOtherAssociatedFields(field, otherAssociatedFields, row, result);
|
|
19157
|
+
return Promise.resolve(result);
|
|
19158
|
+
}
|
|
19159
|
+
}
|
|
19097
19160
|
function processAssociatedFields(field, associatedFields, row, result) {
|
|
19098
19161
|
if (associatedFields.length)
|
|
19099
19162
|
associatedFields.forEach((item) => {
|
|
@@ -19293,6 +19356,18 @@ const _sfc_main$7 = vue.defineComponent({
|
|
|
19293
19356
|
break;
|
|
19294
19357
|
}
|
|
19295
19358
|
}
|
|
19359
|
+
if (rule.name === "customer") {
|
|
19360
|
+
try {
|
|
19361
|
+
const productInfo = await queryCustomerInfo(rule, row);
|
|
19362
|
+
if (!productInfo) {
|
|
19363
|
+
error = `${title}\u67E5\u8BE2\u7684\u5BA2\u6237\u4E0D\u5B58\u5728`;
|
|
19364
|
+
break;
|
|
19365
|
+
}
|
|
19366
|
+
} catch (e) {
|
|
19367
|
+
error = `${title}\u67E5\u8BE2\u7684\u5BA2\u6237\u4E0D\u5B58\u5728`;
|
|
19368
|
+
break;
|
|
19369
|
+
}
|
|
19370
|
+
}
|
|
19296
19371
|
if (rule.name === "shop") {
|
|
19297
19372
|
try {
|
|
19298
19373
|
const shopInfo = await props.extraConfig[rule.name].getShopInfo({
|
|
@@ -19345,6 +19420,10 @@ const _sfc_main$7 = vue.defineComponent({
|
|
|
19345
19420
|
}
|
|
19346
19421
|
queryProductInfo(rule, row);
|
|
19347
19422
|
}
|
|
19423
|
+
function handleCustomerPressEnter(value, rule, row) {
|
|
19424
|
+
row[rule.field] = value;
|
|
19425
|
+
queryCustomerInfo(rule, row);
|
|
19426
|
+
}
|
|
19348
19427
|
function handleShopOption(value, rule, row) {
|
|
19349
19428
|
row[rule?.field] = value;
|
|
19350
19429
|
processAssociatedFields(
|
|
@@ -19499,7 +19578,7 @@ const _sfc_main$7 = vue.defineComponent({
|
|
|
19499
19578
|
vue.createTextVNode(vue.toDisplayString(__props.rule.title.title) + " ", 1),
|
|
19500
19579
|
vue.createElementVNode("span", _hoisted_3$3, vue.toDisplayString(vue.unref(countText)), 1),
|
|
19501
19580
|
vue.createCommentVNode(" \u5546\u54C1\u4E2D\u5FC3\u5B9A\u5236 \u6309\u94AE "),
|
|
19502
|
-
vue.unref(
|
|
19581
|
+
vue.unref(isProductCenter) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$3, [
|
|
19503
19582
|
!__props.hidden ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
19504
19583
|
vue.unref(tableConfig).buttons?.includes("import") ? (vue.openBlock(), vue.createElementBlock("input", {
|
|
19505
19584
|
key: 0,
|
|
@@ -19706,7 +19785,7 @@ const _sfc_main$7 = vue.defineComponent({
|
|
|
19706
19785
|
value: row[item.field],
|
|
19707
19786
|
disabled: item.disabled || pruductInputDisabled(item.config?.dataFiltering),
|
|
19708
19787
|
"shop-value": vue.unref(formData)[item.config.dataFiltering],
|
|
19709
|
-
onChange: ($event) =>
|
|
19788
|
+
onChange: ($event) => handleCustomerPressEnter($event, item, row)
|
|
19710
19789
|
}, null, 8, ["value", "disabled", "shop-value", "onChange"])
|
|
19711
19790
|
])
|
|
19712
19791
|
};
|
|
@@ -20374,7 +20453,12 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
20374
20453
|
\u5546\u54C1\u56FE\u7247: "picUrl",
|
|
20375
20454
|
\u5EFA\u8BAE\u96F6\u552E\u4EF7: "retailPrice",
|
|
20376
20455
|
\u5546\u54C1\u7BB1\u89C4: "carton",
|
|
20377
|
-
\u5546\u54C1\u5355\u4F4D: "unit"
|
|
20456
|
+
\u5546\u54C1\u5355\u4F4D: "unit",
|
|
20457
|
+
\u4E00\u7EA7\u5206\u7C7B: "categoryFirst",
|
|
20458
|
+
\u4E8C\u7EA7\u5206\u7C7B: "categorySecond",
|
|
20459
|
+
\u4E09\u7EA7\u5206\u7C7B: "categoryThrid",
|
|
20460
|
+
\u5546\u54C1\u7C7B\u578B: "productType",
|
|
20461
|
+
\u5546\u54C1\u6807\u7B7E: "productTag"
|
|
20378
20462
|
};
|
|
20379
20463
|
const unitMap = ["\u652F", "\u74F6", "\u5957", "\u7EC4", "\u7BB1", "\u4E2A", "\u5F20"];
|
|
20380
20464
|
const formData = vue.computed(() => props.formCreateInject.api.bind());
|
package/package.json
CHANGED
|
@@ -3,6 +3,7 @@ declare const _default: import("vue").DefineComponent<Readonly<import("vue").Com
|
|
|
3
3
|
}>>, {
|
|
4
4
|
toEditLabel(): void;
|
|
5
5
|
updateLabel(_: any): void;
|
|
6
|
+
inputRef: import("vue").Ref<any>;
|
|
6
7
|
isEditLabel: import("vue").Ref<boolean>;
|
|
7
8
|
tempLabel: any;
|
|
8
9
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:label"[], "update:label", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<readonly string[] | import("vue").ExtractPropTypes<Readonly<import("vue").ComponentObjectPropsOptions<{
|