bm-admin-ui 1.2.32-alpha → 1.2.34-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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { withInstall } from 'bm-admin-ui/es/utils/with-install';
|
|
2
|
-
import { h, defineComponent, computed, openBlock, createBlock, unref, withCtx, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, nextTick, ref, createVNode, normalizeStyle, withModifiers, createElementVNode, createCommentVNode, normalizeClass, reactive, watch, createSlots, inject, createStaticVNode, provide, resolveComponent } from 'vue';
|
|
3
|
-
import { Input, InputNumber, RadioGroup, Radio, Select, DatePicker, RangePicker, message, Modal, Layout, LayoutSider, Tree, LayoutContent, Button, Row, Col, Pagination, FormItemRest, Divider, Tabs, TabPane, Cascader } from 'ant-design-vue';
|
|
2
|
+
import { h, defineComponent, computed, openBlock, createBlock, unref, withCtx, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, nextTick, ref, createVNode, normalizeStyle, withModifiers, createElementVNode, createCommentVNode, normalizeClass, reactive, watch, createSlots, inject, onUnmounted, createStaticVNode, provide, resolveComponent } from 'vue';
|
|
3
|
+
import { Input, InputNumber, RadioGroup, Radio, Select, DatePicker, RangePicker, message, Modal, Layout, LayoutSider, Tree, LayoutContent, Button, Row, Col, Pagination, FormItemRest, Divider, Image, Tabs, TabPane, Cascader } from 'ant-design-vue';
|
|
4
4
|
import dayjs from 'dayjs';
|
|
5
5
|
import Picture from 'bm-admin-ui/es/components/upload';
|
|
6
6
|
import BmStaffsSelector from 'bm-admin-ui/es/components/staffs-selector';
|
|
@@ -8,7 +8,7 @@ import { BmTagsDisplay, BmFloatTable } from 'bm-admin-ui/es/components';
|
|
|
8
8
|
import { EyeOutlined, SearchOutlined, CheckCircleFilled, PlusOutlined } from '@ant-design/icons-vue';
|
|
9
9
|
import { cloneDeep, floor, debounce } from 'lodash-es';
|
|
10
10
|
import customParseFormat from 'dayjs/plugin/customParseFormat';
|
|
11
|
-
import utils from 'bm-admin-ui/es/utils';
|
|
11
|
+
import utils from 'bm-admin-ui/es/utils/index';
|
|
12
12
|
import { isNull } from 'bm-admin-ui/es/utils/isNull';
|
|
13
13
|
import FC from '@form-create/ant-design-vue';
|
|
14
14
|
import BmOverTooltips from 'bm-admin-ui/es/components/over-tooltips';
|
|
@@ -18868,7 +18868,8 @@ const _sfc_main$7 = defineComponent({
|
|
|
18868
18868
|
trigger: "cell",
|
|
18869
18869
|
checkMethod() {
|
|
18870
18870
|
return !props.disabled;
|
|
18871
|
-
}
|
|
18871
|
+
},
|
|
18872
|
+
...props.rule?.config?.checkboxConfig
|
|
18872
18873
|
}
|
|
18873
18874
|
}));
|
|
18874
18875
|
const xGrid = computed(() => bmFloatTableRef.value.xGrid || {});
|
|
@@ -18951,15 +18952,19 @@ const _sfc_main$7 = defineComponent({
|
|
|
18951
18952
|
if (deleteFeature.value && !props.hidden) {
|
|
18952
18953
|
columns.push({
|
|
18953
18954
|
type: "checkbox",
|
|
18954
|
-
width: "54px"
|
|
18955
|
+
width: isProductCenter.value ? "50px" : "54px",
|
|
18956
|
+
showOverflow: false,
|
|
18957
|
+
showHeaderOverflow: false
|
|
18955
18958
|
});
|
|
18956
18959
|
}
|
|
18957
|
-
if (
|
|
18960
|
+
if (isProductCenter.value) {
|
|
18958
18961
|
columns.push({
|
|
18959
18962
|
type: "seq",
|
|
18960
18963
|
title: "\u5E8F\u53F7",
|
|
18961
|
-
width: "
|
|
18962
|
-
align: "center"
|
|
18964
|
+
width: "60px",
|
|
18965
|
+
align: "center",
|
|
18966
|
+
showOverflow: false,
|
|
18967
|
+
showHeaderOverflow: false
|
|
18963
18968
|
});
|
|
18964
18969
|
}
|
|
18965
18970
|
childRules?.length && columns.push(
|
|
@@ -18977,18 +18982,30 @@ const _sfc_main$7 = defineComponent({
|
|
|
18977
18982
|
pre.push({
|
|
18978
18983
|
field: childField,
|
|
18979
18984
|
title,
|
|
18980
|
-
minWidth: "
|
|
18985
|
+
minWidth: "140px",
|
|
18981
18986
|
slots: {
|
|
18982
18987
|
default({ row }) {
|
|
18983
18988
|
if (row?.[childField]) {
|
|
18984
|
-
return h(
|
|
18985
|
-
|
|
18986
|
-
|
|
18987
|
-
|
|
18988
|
-
|
|
18989
|
-
|
|
18990
|
-
}
|
|
18991
|
-
|
|
18989
|
+
return h(
|
|
18990
|
+
"div",
|
|
18991
|
+
{
|
|
18992
|
+
class: {
|
|
18993
|
+
"bm-fc-table-img": true
|
|
18994
|
+
}
|
|
18995
|
+
},
|
|
18996
|
+
[
|
|
18997
|
+
h(Image, {
|
|
18998
|
+
src: props.extraConfig.common.previewImg(
|
|
18999
|
+
row[childField]
|
|
19000
|
+
),
|
|
19001
|
+
style: {
|
|
19002
|
+
width: "86px",
|
|
19003
|
+
height: "86px",
|
|
19004
|
+
padding: "8px"
|
|
19005
|
+
}
|
|
19006
|
+
})
|
|
19007
|
+
]
|
|
19008
|
+
);
|
|
18992
19009
|
}
|
|
18993
19010
|
return h(
|
|
18994
19011
|
"div",
|
|
@@ -19016,11 +19033,13 @@ const _sfc_main$7 = defineComponent({
|
|
|
19016
19033
|
columns.push({
|
|
19017
19034
|
field: oper,
|
|
19018
19035
|
title: "\u64CD\u4F5C",
|
|
19019
|
-
minWidth: "140px",
|
|
19036
|
+
minWidth: isProductCenter.value ? "110px" : "140px",
|
|
19020
19037
|
fixed: "right",
|
|
19021
19038
|
slots: {
|
|
19022
19039
|
default: "floatHandle"
|
|
19023
|
-
}
|
|
19040
|
+
},
|
|
19041
|
+
showOverflow: false,
|
|
19042
|
+
showHeaderOverflow: false
|
|
19024
19043
|
});
|
|
19025
19044
|
handleAdd(value);
|
|
19026
19045
|
}
|
|
@@ -19073,7 +19092,7 @@ const _sfc_main$7 = defineComponent({
|
|
|
19073
19092
|
field,
|
|
19074
19093
|
title: getBaseTitle(),
|
|
19075
19094
|
headerClassName: rule.effect.required ? "is-required" : "",
|
|
19076
|
-
minWidth: "
|
|
19095
|
+
minWidth: "140px",
|
|
19077
19096
|
slots: {
|
|
19078
19097
|
default: rule.field
|
|
19079
19098
|
}
|
|
@@ -19085,18 +19104,31 @@ const _sfc_main$7 = defineComponent({
|
|
|
19085
19104
|
columns2.push({
|
|
19086
19105
|
field: childField,
|
|
19087
19106
|
title: `${item.label}-${mainName}`,
|
|
19088
|
-
minWidth: "
|
|
19107
|
+
minWidth: "140px",
|
|
19089
19108
|
slots: {
|
|
19090
19109
|
default({ row }) {
|
|
19091
19110
|
if (item.value === "\u5546\u54C1\u56FE\u7247" && row[childField]) {
|
|
19092
|
-
return h(
|
|
19093
|
-
|
|
19094
|
-
|
|
19095
|
-
|
|
19096
|
-
|
|
19097
|
-
|
|
19098
|
-
|
|
19099
|
-
|
|
19111
|
+
return h(
|
|
19112
|
+
"div",
|
|
19113
|
+
{
|
|
19114
|
+
style: {
|
|
19115
|
+
color: "#9393A3"
|
|
19116
|
+
},
|
|
19117
|
+
class: {
|
|
19118
|
+
"bm-fc-table-img": true
|
|
19119
|
+
}
|
|
19120
|
+
},
|
|
19121
|
+
[
|
|
19122
|
+
h(Image, {
|
|
19123
|
+
src: props.extraConfig.common.previewImg(row[childField]),
|
|
19124
|
+
style: {
|
|
19125
|
+
width: "86px",
|
|
19126
|
+
height: "86px",
|
|
19127
|
+
padding: "8px"
|
|
19128
|
+
}
|
|
19129
|
+
})
|
|
19130
|
+
]
|
|
19131
|
+
);
|
|
19100
19132
|
}
|
|
19101
19133
|
return h(
|
|
19102
19134
|
"div",
|
|
@@ -19137,7 +19169,7 @@ const _sfc_main$7 = defineComponent({
|
|
|
19137
19169
|
}
|
|
19138
19170
|
async function handleDelete(index, needConfirm = true) {
|
|
19139
19171
|
if (isProductCenter.value && needConfirm) {
|
|
19140
|
-
if (await utils.confirmModal("\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u9879\uFF1F")) {
|
|
19172
|
+
if (await utils.confirmModal("\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u9879\uFF1F", "\u5220\u9664")) {
|
|
19141
19173
|
data.splice(index, 1);
|
|
19142
19174
|
}
|
|
19143
19175
|
} else {
|
|
@@ -19150,7 +19182,10 @@ const _sfc_main$7 = defineComponent({
|
|
|
19150
19182
|
return;
|
|
19151
19183
|
}
|
|
19152
19184
|
if (isProductCenter.value) {
|
|
19153
|
-
if (await utils.confirmModal(
|
|
19185
|
+
if (await utils.confirmModal(
|
|
19186
|
+
`\u786E\u5B9A\u8981\u5220\u9664\u6240\u9009\u7684${selected?.length}\u6761\u6570\u636E\u4E48\uFF1F`,
|
|
19187
|
+
"\u6279\u91CF\u5220\u9664"
|
|
19188
|
+
)) {
|
|
19154
19189
|
selected.forEach((item) => {
|
|
19155
19190
|
const index = data.indexOf(item);
|
|
19156
19191
|
handleDelete(index, false);
|
|
@@ -19181,11 +19216,12 @@ const _sfc_main$7 = defineComponent({
|
|
|
19181
19216
|
(item) => fields.some((field) => ![null, void 0, ""].includes(item[field]))
|
|
19182
19217
|
);
|
|
19183
19218
|
if (isNotEmpty) {
|
|
19184
|
-
if (await utils.confirmModal("\u518D\u6B21\u6279\u5BFC\u4F1A\u8986\u76D6\u5DF2\u6709\u6570\u636E")) {
|
|
19219
|
+
if (await utils.confirmModal("\u518D\u6B21\u6279\u5BFC\u4F1A\u8986\u76D6\u5DF2\u6709\u6570\u636E", "\u6279\u91CF\u5BFC\u5165")) {
|
|
19185
19220
|
data.splice(0, data.length);
|
|
19186
19221
|
inputRef.value.click();
|
|
19187
19222
|
}
|
|
19188
19223
|
} else {
|
|
19224
|
+
data.splice(0, data.length);
|
|
19189
19225
|
inputRef.value.click();
|
|
19190
19226
|
}
|
|
19191
19227
|
} else {
|
|
@@ -20595,7 +20631,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
20595
20631
|
"formCreateInject",
|
|
20596
20632
|
"fetchMode"
|
|
20597
20633
|
],
|
|
20598
|
-
emits: ["change"],
|
|
20634
|
+
emits: ["change", "change:value"],
|
|
20599
20635
|
setup(__props, { emit: emits }) {
|
|
20600
20636
|
const props = __props;
|
|
20601
20637
|
const productInfo = ref({});
|
|
@@ -20616,7 +20652,15 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
20616
20652
|
const formData = computed(() => props.formCreateInject.api.bind());
|
|
20617
20653
|
const debounceFn = debounce(handleBlur, 500);
|
|
20618
20654
|
const inputValue = ref(props.defalutValue);
|
|
20655
|
+
const debounceFetch = debounce(fetch, 500);
|
|
20656
|
+
let isExist = true;
|
|
20657
|
+
onUnmounted(() => {
|
|
20658
|
+
isExist = false;
|
|
20659
|
+
});
|
|
20619
20660
|
async function fetch(value) {
|
|
20661
|
+
if (!isExist) {
|
|
20662
|
+
return;
|
|
20663
|
+
}
|
|
20620
20664
|
return productInfo.value = await props.extraConfig.product.fetch({
|
|
20621
20665
|
productCode: value,
|
|
20622
20666
|
filterByShopcode: props.dataFiltering
|
|
@@ -20641,6 +20685,10 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
20641
20685
|
function handleChange(evt) {
|
|
20642
20686
|
debounceFn(evt);
|
|
20643
20687
|
}
|
|
20688
|
+
function handleChangeValue(evt) {
|
|
20689
|
+
const value = evt.target.value;
|
|
20690
|
+
emits("change:value", value);
|
|
20691
|
+
}
|
|
20644
20692
|
function getValue(value) {
|
|
20645
20693
|
return productInfo.value[productInfoKeyMap[value]];
|
|
20646
20694
|
}
|
|
@@ -20658,7 +20706,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
20658
20706
|
watch(
|
|
20659
20707
|
() => props.defalutValue,
|
|
20660
20708
|
(val) => {
|
|
20661
|
-
val &&
|
|
20709
|
+
val && debounceFetch(val);
|
|
20662
20710
|
},
|
|
20663
20711
|
{
|
|
20664
20712
|
immediate: true
|
|
@@ -20697,8 +20745,10 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
20697
20745
|
value: inputValue.value,
|
|
20698
20746
|
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
|
|
20699
20747
|
placeholder: "\u8BF7\u8F93\u5165",
|
|
20748
|
+
allowClear: "",
|
|
20700
20749
|
disabled: __props.disabled || inputDisbale(__props.dataFiltering),
|
|
20701
20750
|
onPressEnter: unref(debounceFn),
|
|
20751
|
+
onChange: handleChangeValue,
|
|
20702
20752
|
onBlur: handleBlur
|
|
20703
20753
|
}, null, 8, ["value", "disabled", "onPressEnter"])) : (openBlock(), createBlock(unref(Input), {
|
|
20704
20754
|
key: 1,
|
|
@@ -20798,6 +20848,16 @@ var product = {
|
|
|
20798
20848
|
});
|
|
20799
20849
|
});
|
|
20800
20850
|
},
|
|
20851
|
+
'change:value': (inject, value) => {
|
|
20852
|
+
nextTick(() => {
|
|
20853
|
+
if (value) {
|
|
20854
|
+
inject.api.clearValidateState(inject.self.field);
|
|
20855
|
+
}
|
|
20856
|
+
else {
|
|
20857
|
+
inject.api.validateField(inject.self.field);
|
|
20858
|
+
}
|
|
20859
|
+
});
|
|
20860
|
+
},
|
|
20801
20861
|
},
|
|
20802
20862
|
};
|
|
20803
20863
|
},
|
|
@@ -20831,6 +20891,16 @@ var product = {
|
|
|
20831
20891
|
});
|
|
20832
20892
|
});
|
|
20833
20893
|
},
|
|
20894
|
+
'change:value': (inject, value) => {
|
|
20895
|
+
nextTick(() => {
|
|
20896
|
+
if (value) {
|
|
20897
|
+
inject.api.clearValidateState(inject.self.field);
|
|
20898
|
+
}
|
|
20899
|
+
else {
|
|
20900
|
+
inject.api.validateField(inject.self.field);
|
|
20901
|
+
}
|
|
20902
|
+
});
|
|
20903
|
+
},
|
|
20834
20904
|
},
|
|
20835
20905
|
};
|
|
20836
20906
|
},
|
|
@@ -12,7 +12,7 @@ var components = require('bm-admin-ui/lib/components');
|
|
|
12
12
|
var iconsVue = require('@ant-design/icons-vue');
|
|
13
13
|
var lodashEs = require('lodash-es');
|
|
14
14
|
var customParseFormat = require('dayjs/plugin/customParseFormat');
|
|
15
|
-
var utils = require('bm-admin-ui/lib/utils');
|
|
15
|
+
var utils = require('bm-admin-ui/lib/utils/index');
|
|
16
16
|
var isNull = require('bm-admin-ui/lib/utils/isNull');
|
|
17
17
|
var FC = require('@form-create/ant-design-vue');
|
|
18
18
|
var BmOverTooltips = require('bm-admin-ui/lib/components/over-tooltips');
|
|
@@ -18882,7 +18882,8 @@ const _sfc_main$7 = vue.defineComponent({
|
|
|
18882
18882
|
trigger: "cell",
|
|
18883
18883
|
checkMethod() {
|
|
18884
18884
|
return !props.disabled;
|
|
18885
|
-
}
|
|
18885
|
+
},
|
|
18886
|
+
...props.rule?.config?.checkboxConfig
|
|
18886
18887
|
}
|
|
18887
18888
|
}));
|
|
18888
18889
|
const xGrid = vue.computed(() => bmFloatTableRef.value.xGrid || {});
|
|
@@ -18965,15 +18966,19 @@ const _sfc_main$7 = vue.defineComponent({
|
|
|
18965
18966
|
if (deleteFeature.value && !props.hidden) {
|
|
18966
18967
|
columns.push({
|
|
18967
18968
|
type: "checkbox",
|
|
18968
|
-
width: "54px"
|
|
18969
|
+
width: isProductCenter.value ? "50px" : "54px",
|
|
18970
|
+
showOverflow: false,
|
|
18971
|
+
showHeaderOverflow: false
|
|
18969
18972
|
});
|
|
18970
18973
|
}
|
|
18971
|
-
if (
|
|
18974
|
+
if (isProductCenter.value) {
|
|
18972
18975
|
columns.push({
|
|
18973
18976
|
type: "seq",
|
|
18974
18977
|
title: "\u5E8F\u53F7",
|
|
18975
|
-
width: "
|
|
18976
|
-
align: "center"
|
|
18978
|
+
width: "60px",
|
|
18979
|
+
align: "center",
|
|
18980
|
+
showOverflow: false,
|
|
18981
|
+
showHeaderOverflow: false
|
|
18977
18982
|
});
|
|
18978
18983
|
}
|
|
18979
18984
|
childRules?.length && columns.push(
|
|
@@ -18991,18 +18996,30 @@ const _sfc_main$7 = vue.defineComponent({
|
|
|
18991
18996
|
pre.push({
|
|
18992
18997
|
field: childField,
|
|
18993
18998
|
title,
|
|
18994
|
-
minWidth: "
|
|
18999
|
+
minWidth: "140px",
|
|
18995
19000
|
slots: {
|
|
18996
19001
|
default({ row }) {
|
|
18997
19002
|
if (row?.[childField]) {
|
|
18998
|
-
return vue.h(
|
|
18999
|
-
|
|
19000
|
-
|
|
19001
|
-
|
|
19002
|
-
|
|
19003
|
-
|
|
19004
|
-
}
|
|
19005
|
-
|
|
19003
|
+
return vue.h(
|
|
19004
|
+
"div",
|
|
19005
|
+
{
|
|
19006
|
+
class: {
|
|
19007
|
+
"bm-fc-table-img": true
|
|
19008
|
+
}
|
|
19009
|
+
},
|
|
19010
|
+
[
|
|
19011
|
+
vue.h(antDesignVue.Image, {
|
|
19012
|
+
src: props.extraConfig.common.previewImg(
|
|
19013
|
+
row[childField]
|
|
19014
|
+
),
|
|
19015
|
+
style: {
|
|
19016
|
+
width: "86px",
|
|
19017
|
+
height: "86px",
|
|
19018
|
+
padding: "8px"
|
|
19019
|
+
}
|
|
19020
|
+
})
|
|
19021
|
+
]
|
|
19022
|
+
);
|
|
19006
19023
|
}
|
|
19007
19024
|
return vue.h(
|
|
19008
19025
|
"div",
|
|
@@ -19030,11 +19047,13 @@ const _sfc_main$7 = vue.defineComponent({
|
|
|
19030
19047
|
columns.push({
|
|
19031
19048
|
field: oper,
|
|
19032
19049
|
title: "\u64CD\u4F5C",
|
|
19033
|
-
minWidth: "140px",
|
|
19050
|
+
minWidth: isProductCenter.value ? "110px" : "140px",
|
|
19034
19051
|
fixed: "right",
|
|
19035
19052
|
slots: {
|
|
19036
19053
|
default: "floatHandle"
|
|
19037
|
-
}
|
|
19054
|
+
},
|
|
19055
|
+
showOverflow: false,
|
|
19056
|
+
showHeaderOverflow: false
|
|
19038
19057
|
});
|
|
19039
19058
|
handleAdd(value);
|
|
19040
19059
|
}
|
|
@@ -19087,7 +19106,7 @@ const _sfc_main$7 = vue.defineComponent({
|
|
|
19087
19106
|
field,
|
|
19088
19107
|
title: getBaseTitle(),
|
|
19089
19108
|
headerClassName: rule.effect.required ? "is-required" : "",
|
|
19090
|
-
minWidth: "
|
|
19109
|
+
minWidth: "140px",
|
|
19091
19110
|
slots: {
|
|
19092
19111
|
default: rule.field
|
|
19093
19112
|
}
|
|
@@ -19099,18 +19118,31 @@ const _sfc_main$7 = vue.defineComponent({
|
|
|
19099
19118
|
columns2.push({
|
|
19100
19119
|
field: childField,
|
|
19101
19120
|
title: `${item.label}-${mainName}`,
|
|
19102
|
-
minWidth: "
|
|
19121
|
+
minWidth: "140px",
|
|
19103
19122
|
slots: {
|
|
19104
19123
|
default({ row }) {
|
|
19105
19124
|
if (item.value === "\u5546\u54C1\u56FE\u7247" && row[childField]) {
|
|
19106
|
-
return vue.h(
|
|
19107
|
-
|
|
19108
|
-
|
|
19109
|
-
|
|
19110
|
-
|
|
19111
|
-
|
|
19112
|
-
|
|
19113
|
-
|
|
19125
|
+
return vue.h(
|
|
19126
|
+
"div",
|
|
19127
|
+
{
|
|
19128
|
+
style: {
|
|
19129
|
+
color: "#9393A3"
|
|
19130
|
+
},
|
|
19131
|
+
class: {
|
|
19132
|
+
"bm-fc-table-img": true
|
|
19133
|
+
}
|
|
19134
|
+
},
|
|
19135
|
+
[
|
|
19136
|
+
vue.h(antDesignVue.Image, {
|
|
19137
|
+
src: props.extraConfig.common.previewImg(row[childField]),
|
|
19138
|
+
style: {
|
|
19139
|
+
width: "86px",
|
|
19140
|
+
height: "86px",
|
|
19141
|
+
padding: "8px"
|
|
19142
|
+
}
|
|
19143
|
+
})
|
|
19144
|
+
]
|
|
19145
|
+
);
|
|
19114
19146
|
}
|
|
19115
19147
|
return vue.h(
|
|
19116
19148
|
"div",
|
|
@@ -19151,7 +19183,7 @@ const _sfc_main$7 = vue.defineComponent({
|
|
|
19151
19183
|
}
|
|
19152
19184
|
async function handleDelete(index, needConfirm = true) {
|
|
19153
19185
|
if (isProductCenter.value && needConfirm) {
|
|
19154
|
-
if (await utils__default["default"].confirmModal("\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u9879\uFF1F")) {
|
|
19186
|
+
if (await utils__default["default"].confirmModal("\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u9879\uFF1F", "\u5220\u9664")) {
|
|
19155
19187
|
data.splice(index, 1);
|
|
19156
19188
|
}
|
|
19157
19189
|
} else {
|
|
@@ -19164,7 +19196,10 @@ const _sfc_main$7 = vue.defineComponent({
|
|
|
19164
19196
|
return;
|
|
19165
19197
|
}
|
|
19166
19198
|
if (isProductCenter.value) {
|
|
19167
|
-
if (await utils__default["default"].confirmModal(
|
|
19199
|
+
if (await utils__default["default"].confirmModal(
|
|
19200
|
+
`\u786E\u5B9A\u8981\u5220\u9664\u6240\u9009\u7684${selected?.length}\u6761\u6570\u636E\u4E48\uFF1F`,
|
|
19201
|
+
"\u6279\u91CF\u5220\u9664"
|
|
19202
|
+
)) {
|
|
19168
19203
|
selected.forEach((item) => {
|
|
19169
19204
|
const index = data.indexOf(item);
|
|
19170
19205
|
handleDelete(index, false);
|
|
@@ -19195,11 +19230,12 @@ const _sfc_main$7 = vue.defineComponent({
|
|
|
19195
19230
|
(item) => fields.some((field) => ![null, void 0, ""].includes(item[field]))
|
|
19196
19231
|
);
|
|
19197
19232
|
if (isNotEmpty) {
|
|
19198
|
-
if (await utils__default["default"].confirmModal("\u518D\u6B21\u6279\u5BFC\u4F1A\u8986\u76D6\u5DF2\u6709\u6570\u636E")) {
|
|
19233
|
+
if (await utils__default["default"].confirmModal("\u518D\u6B21\u6279\u5BFC\u4F1A\u8986\u76D6\u5DF2\u6709\u6570\u636E", "\u6279\u91CF\u5BFC\u5165")) {
|
|
19199
19234
|
data.splice(0, data.length);
|
|
19200
19235
|
inputRef.value.click();
|
|
19201
19236
|
}
|
|
19202
19237
|
} else {
|
|
19238
|
+
data.splice(0, data.length);
|
|
19203
19239
|
inputRef.value.click();
|
|
19204
19240
|
}
|
|
19205
19241
|
} else {
|
|
@@ -20609,7 +20645,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
20609
20645
|
"formCreateInject",
|
|
20610
20646
|
"fetchMode"
|
|
20611
20647
|
],
|
|
20612
|
-
emits: ["change"],
|
|
20648
|
+
emits: ["change", "change:value"],
|
|
20613
20649
|
setup(__props, { emit: emits }) {
|
|
20614
20650
|
const props = __props;
|
|
20615
20651
|
const productInfo = vue.ref({});
|
|
@@ -20630,7 +20666,15 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
20630
20666
|
const formData = vue.computed(() => props.formCreateInject.api.bind());
|
|
20631
20667
|
const debounceFn = lodashEs.debounce(handleBlur, 500);
|
|
20632
20668
|
const inputValue = vue.ref(props.defalutValue);
|
|
20669
|
+
const debounceFetch = lodashEs.debounce(fetch, 500);
|
|
20670
|
+
let isExist = true;
|
|
20671
|
+
vue.onUnmounted(() => {
|
|
20672
|
+
isExist = false;
|
|
20673
|
+
});
|
|
20633
20674
|
async function fetch(value) {
|
|
20675
|
+
if (!isExist) {
|
|
20676
|
+
return;
|
|
20677
|
+
}
|
|
20634
20678
|
return productInfo.value = await props.extraConfig.product.fetch({
|
|
20635
20679
|
productCode: value,
|
|
20636
20680
|
filterByShopcode: props.dataFiltering
|
|
@@ -20655,6 +20699,10 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
20655
20699
|
function handleChange(evt) {
|
|
20656
20700
|
debounceFn(evt);
|
|
20657
20701
|
}
|
|
20702
|
+
function handleChangeValue(evt) {
|
|
20703
|
+
const value = evt.target.value;
|
|
20704
|
+
emits("change:value", value);
|
|
20705
|
+
}
|
|
20658
20706
|
function getValue(value) {
|
|
20659
20707
|
return productInfo.value[productInfoKeyMap[value]];
|
|
20660
20708
|
}
|
|
@@ -20672,7 +20720,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
20672
20720
|
vue.watch(
|
|
20673
20721
|
() => props.defalutValue,
|
|
20674
20722
|
(val) => {
|
|
20675
|
-
val &&
|
|
20723
|
+
val && debounceFetch(val);
|
|
20676
20724
|
},
|
|
20677
20725
|
{
|
|
20678
20726
|
immediate: true
|
|
@@ -20711,8 +20759,10 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
20711
20759
|
value: inputValue.value,
|
|
20712
20760
|
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
|
|
20713
20761
|
placeholder: "\u8BF7\u8F93\u5165",
|
|
20762
|
+
allowClear: "",
|
|
20714
20763
|
disabled: __props.disabled || inputDisbale(__props.dataFiltering),
|
|
20715
20764
|
onPressEnter: vue.unref(debounceFn),
|
|
20765
|
+
onChange: handleChangeValue,
|
|
20716
20766
|
onBlur: handleBlur
|
|
20717
20767
|
}, null, 8, ["value", "disabled", "onPressEnter"])) : (vue.openBlock(), vue.createBlock(vue.unref(antDesignVue.Input), {
|
|
20718
20768
|
key: 1,
|
|
@@ -20812,6 +20862,16 @@ var product = {
|
|
|
20812
20862
|
});
|
|
20813
20863
|
});
|
|
20814
20864
|
},
|
|
20865
|
+
'change:value': (inject, value) => {
|
|
20866
|
+
vue.nextTick(() => {
|
|
20867
|
+
if (value) {
|
|
20868
|
+
inject.api.clearValidateState(inject.self.field);
|
|
20869
|
+
}
|
|
20870
|
+
else {
|
|
20871
|
+
inject.api.validateField(inject.self.field);
|
|
20872
|
+
}
|
|
20873
|
+
});
|
|
20874
|
+
},
|
|
20815
20875
|
},
|
|
20816
20876
|
};
|
|
20817
20877
|
},
|
|
@@ -20845,6 +20905,16 @@ var product = {
|
|
|
20845
20905
|
});
|
|
20846
20906
|
});
|
|
20847
20907
|
},
|
|
20908
|
+
'change:value': (inject, value) => {
|
|
20909
|
+
vue.nextTick(() => {
|
|
20910
|
+
if (value) {
|
|
20911
|
+
inject.api.clearValidateState(inject.self.field);
|
|
20912
|
+
}
|
|
20913
|
+
else {
|
|
20914
|
+
inject.api.validateField(inject.self.field);
|
|
20915
|
+
}
|
|
20916
|
+
});
|
|
20917
|
+
},
|
|
20848
20918
|
},
|
|
20849
20919
|
};
|
|
20850
20920
|
},
|