bm-admin-ui 1.1.11-alpha → 1.1.12-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.
|
@@ -18845,6 +18845,18 @@ const _sfc_main$7 = defineComponent({
|
|
|
18845
18845
|
);
|
|
18846
18846
|
const tableConfig = computed(() => props.rule?.config?.tableConfig || {});
|
|
18847
18847
|
const validColumns = computed(() => columns.filter((c) => isValidColumn(c)));
|
|
18848
|
+
const isProductCenter = computed(
|
|
18849
|
+
() => tableConfig.value?.system === "productCenter"
|
|
18850
|
+
);
|
|
18851
|
+
const isProductCenterSuit = computed(
|
|
18852
|
+
() => isProductCenter.value && [
|
|
18853
|
+
"F2CTemplate",
|
|
18854
|
+
"B2CTemplate",
|
|
18855
|
+
"DistributeTemp",
|
|
18856
|
+
"FreshTemplate",
|
|
18857
|
+
"activityApply"
|
|
18858
|
+
].includes(tableConfig.value.template)
|
|
18859
|
+
);
|
|
18848
18860
|
function isShow(key) {
|
|
18849
18861
|
return props.rule.config.tableAdvancedFeatures.includes(key);
|
|
18850
18862
|
}
|
|
@@ -18862,6 +18874,14 @@ const _sfc_main$7 = defineComponent({
|
|
|
18862
18874
|
width: "54px"
|
|
18863
18875
|
});
|
|
18864
18876
|
}
|
|
18877
|
+
if (isProductCenterSuit.value) {
|
|
18878
|
+
columns.push({
|
|
18879
|
+
type: "seq",
|
|
18880
|
+
title: "\u5E8F\u53F7",
|
|
18881
|
+
width: "62px",
|
|
18882
|
+
align: "center"
|
|
18883
|
+
});
|
|
18884
|
+
}
|
|
18865
18885
|
childRules?.length && columns.push(
|
|
18866
18886
|
...childRules.reduce((pre, cur) => {
|
|
18867
18887
|
if (cur.hidden) {
|
|
@@ -18928,13 +18948,7 @@ const _sfc_main$7 = defineComponent({
|
|
|
18928
18948
|
}
|
|
18929
18949
|
}
|
|
18930
18950
|
];
|
|
18931
|
-
if (
|
|
18932
|
-
"F2CTemplate",
|
|
18933
|
-
"B2CTemplate",
|
|
18934
|
-
"DistributeTemp",
|
|
18935
|
-
"FreshTemplate",
|
|
18936
|
-
"activityApply"
|
|
18937
|
-
].includes(tableConfig.value.template) && rule.name === "product") {
|
|
18951
|
+
if (isProductCenterSuit.value && rule.name === "product") {
|
|
18938
18952
|
columns2[0].title = "\u5546\u54C1\u7F16\u53F7";
|
|
18939
18953
|
}
|
|
18940
18954
|
if (associatedFields.length) {
|
|
@@ -18980,15 +18994,30 @@ const _sfc_main$7 = defineComponent({
|
|
|
18980
18994
|
delete newData._X_ROW_KEY;
|
|
18981
18995
|
data.push(newData);
|
|
18982
18996
|
}
|
|
18983
|
-
function handleDelete(index) {
|
|
18984
|
-
|
|
18997
|
+
async function handleDelete(index, needConfirm = true) {
|
|
18998
|
+
if (isProductCenter.value && needConfirm) {
|
|
18999
|
+
if (await utils.confirmModal("\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u9879\uFF1F")) {
|
|
19000
|
+
data.splice(index, 1);
|
|
19001
|
+
}
|
|
19002
|
+
} else {
|
|
19003
|
+
data.splice(index, 1);
|
|
19004
|
+
}
|
|
18985
19005
|
}
|
|
18986
|
-
function handleBatchDelete() {
|
|
19006
|
+
async function handleBatchDelete() {
|
|
18987
19007
|
const selected = xGrid.value.getCheckboxRecords();
|
|
18988
|
-
|
|
18989
|
-
|
|
18990
|
-
|
|
18991
|
-
|
|
19008
|
+
if (isProductCenter.value) {
|
|
19009
|
+
if (await utils.confirmModal(`\u786E\u5B9A\u8981\u5220\u9664\u6240\u9009\u7684${selected?.length}\u6761\u6570\u636E\u4E48\uFF1F`)) {
|
|
19010
|
+
selected.forEach((item) => {
|
|
19011
|
+
const index = data.indexOf(item);
|
|
19012
|
+
handleDelete(index, false);
|
|
19013
|
+
});
|
|
19014
|
+
}
|
|
19015
|
+
} else {
|
|
19016
|
+
selected.forEach((item) => {
|
|
19017
|
+
const index = data.indexOf(item);
|
|
19018
|
+
handleDelete(index, false);
|
|
19019
|
+
});
|
|
19020
|
+
}
|
|
18992
19021
|
}
|
|
18993
19022
|
function handleDownload() {
|
|
18994
19023
|
xGrid.value.exportData({
|
|
@@ -19002,13 +19031,7 @@ const _sfc_main$7 = defineComponent({
|
|
|
19002
19031
|
async function handleImport() {
|
|
19003
19032
|
if (importDisabled()) {
|
|
19004
19033
|
message.error("\u8BF7\u5148\u9009\u62E9\u5E97\u94FA\uFF01");
|
|
19005
|
-
} else if (
|
|
19006
|
-
"F2CTemplate",
|
|
19007
|
-
"B2CTemplate",
|
|
19008
|
-
"DistributeTemp",
|
|
19009
|
-
"FreshTemplate",
|
|
19010
|
-
"activityApply"
|
|
19011
|
-
].includes(tableConfig.value?.template)) {
|
|
19034
|
+
} else if (isProductCenterSuit.value) {
|
|
19012
19035
|
if (data.length > 0) {
|
|
19013
19036
|
if (await utils.confirmModal("\u518D\u6B21\u6279\u5BFC\u4F1A\u8986\u76D6\u5DF2\u6709\u6570\u636E")) {
|
|
19014
19037
|
data.splice(0, data.length);
|
|
@@ -19064,13 +19087,7 @@ const _sfc_main$7 = defineComponent({
|
|
|
19064
19087
|
});
|
|
19065
19088
|
}
|
|
19066
19089
|
function processOtherAssociatedFields(field, fields, row, result) {
|
|
19067
|
-
if (
|
|
19068
|
-
"F2CTemplate",
|
|
19069
|
-
"B2CTemplate",
|
|
19070
|
-
"DistributeTemp",
|
|
19071
|
-
"FreshTemplate",
|
|
19072
|
-
"activityApply"
|
|
19073
|
-
].includes(tableConfig.value.template)) {
|
|
19090
|
+
if (isProductCenterSuit.value) {
|
|
19074
19091
|
fields?.forEach?.((item) => {
|
|
19075
19092
|
row[item] = result ? result[item] : void 0;
|
|
19076
19093
|
});
|
|
@@ -19103,7 +19120,7 @@ const _sfc_main$7 = defineComponent({
|
|
|
19103
19120
|
file && reader.readAsText(file, "GB2312");
|
|
19104
19121
|
}
|
|
19105
19122
|
function isValidColumn(c) {
|
|
19106
|
-
return c.type !== "checkbox" && c.field !== oper;
|
|
19123
|
+
return c.type !== "checkbox" && c.type !== "seq" && c.field !== oper;
|
|
19107
19124
|
}
|
|
19108
19125
|
function parseCsv(result) {
|
|
19109
19126
|
let data2 = [];
|
|
@@ -19305,7 +19322,7 @@ const _sfc_main$7 = defineComponent({
|
|
|
19305
19322
|
}
|
|
19306
19323
|
function handlePressEnter(value, rule, row) {
|
|
19307
19324
|
row[rule.field] = value;
|
|
19308
|
-
if (
|
|
19325
|
+
if (isProductCenterSuit.value && rule.field === "productCode") {
|
|
19309
19326
|
Object.keys(row).forEach((key) => {
|
|
19310
19327
|
if (!["productCode", "_X_ROW_KEY"].includes(key)) {
|
|
19311
19328
|
row[key] = void 0;
|
|
@@ -18859,6 +18859,18 @@ const _sfc_main$7 = vue.defineComponent({
|
|
|
18859
18859
|
);
|
|
18860
18860
|
const tableConfig = vue.computed(() => props.rule?.config?.tableConfig || {});
|
|
18861
18861
|
const validColumns = vue.computed(() => columns.filter((c) => isValidColumn(c)));
|
|
18862
|
+
const isProductCenter = vue.computed(
|
|
18863
|
+
() => tableConfig.value?.system === "productCenter"
|
|
18864
|
+
);
|
|
18865
|
+
const isProductCenterSuit = vue.computed(
|
|
18866
|
+
() => isProductCenter.value && [
|
|
18867
|
+
"F2CTemplate",
|
|
18868
|
+
"B2CTemplate",
|
|
18869
|
+
"DistributeTemp",
|
|
18870
|
+
"FreshTemplate",
|
|
18871
|
+
"activityApply"
|
|
18872
|
+
].includes(tableConfig.value.template)
|
|
18873
|
+
);
|
|
18862
18874
|
function isShow(key) {
|
|
18863
18875
|
return props.rule.config.tableAdvancedFeatures.includes(key);
|
|
18864
18876
|
}
|
|
@@ -18876,6 +18888,14 @@ const _sfc_main$7 = vue.defineComponent({
|
|
|
18876
18888
|
width: "54px"
|
|
18877
18889
|
});
|
|
18878
18890
|
}
|
|
18891
|
+
if (isProductCenterSuit.value) {
|
|
18892
|
+
columns.push({
|
|
18893
|
+
type: "seq",
|
|
18894
|
+
title: "\u5E8F\u53F7",
|
|
18895
|
+
width: "62px",
|
|
18896
|
+
align: "center"
|
|
18897
|
+
});
|
|
18898
|
+
}
|
|
18879
18899
|
childRules?.length && columns.push(
|
|
18880
18900
|
...childRules.reduce((pre, cur) => {
|
|
18881
18901
|
if (cur.hidden) {
|
|
@@ -18942,13 +18962,7 @@ const _sfc_main$7 = vue.defineComponent({
|
|
|
18942
18962
|
}
|
|
18943
18963
|
}
|
|
18944
18964
|
];
|
|
18945
|
-
if (
|
|
18946
|
-
"F2CTemplate",
|
|
18947
|
-
"B2CTemplate",
|
|
18948
|
-
"DistributeTemp",
|
|
18949
|
-
"FreshTemplate",
|
|
18950
|
-
"activityApply"
|
|
18951
|
-
].includes(tableConfig.value.template) && rule.name === "product") {
|
|
18965
|
+
if (isProductCenterSuit.value && rule.name === "product") {
|
|
18952
18966
|
columns2[0].title = "\u5546\u54C1\u7F16\u53F7";
|
|
18953
18967
|
}
|
|
18954
18968
|
if (associatedFields.length) {
|
|
@@ -18994,15 +19008,30 @@ const _sfc_main$7 = vue.defineComponent({
|
|
|
18994
19008
|
delete newData._X_ROW_KEY;
|
|
18995
19009
|
data.push(newData);
|
|
18996
19010
|
}
|
|
18997
|
-
function handleDelete(index) {
|
|
18998
|
-
|
|
19011
|
+
async function handleDelete(index, needConfirm = true) {
|
|
19012
|
+
if (isProductCenter.value && needConfirm) {
|
|
19013
|
+
if (await utils__default["default"].confirmModal("\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u9879\uFF1F")) {
|
|
19014
|
+
data.splice(index, 1);
|
|
19015
|
+
}
|
|
19016
|
+
} else {
|
|
19017
|
+
data.splice(index, 1);
|
|
19018
|
+
}
|
|
18999
19019
|
}
|
|
19000
|
-
function handleBatchDelete() {
|
|
19020
|
+
async function handleBatchDelete() {
|
|
19001
19021
|
const selected = xGrid.value.getCheckboxRecords();
|
|
19002
|
-
|
|
19003
|
-
|
|
19004
|
-
|
|
19005
|
-
|
|
19022
|
+
if (isProductCenter.value) {
|
|
19023
|
+
if (await utils__default["default"].confirmModal(`\u786E\u5B9A\u8981\u5220\u9664\u6240\u9009\u7684${selected?.length}\u6761\u6570\u636E\u4E48\uFF1F`)) {
|
|
19024
|
+
selected.forEach((item) => {
|
|
19025
|
+
const index = data.indexOf(item);
|
|
19026
|
+
handleDelete(index, false);
|
|
19027
|
+
});
|
|
19028
|
+
}
|
|
19029
|
+
} else {
|
|
19030
|
+
selected.forEach((item) => {
|
|
19031
|
+
const index = data.indexOf(item);
|
|
19032
|
+
handleDelete(index, false);
|
|
19033
|
+
});
|
|
19034
|
+
}
|
|
19006
19035
|
}
|
|
19007
19036
|
function handleDownload() {
|
|
19008
19037
|
xGrid.value.exportData({
|
|
@@ -19016,13 +19045,7 @@ const _sfc_main$7 = vue.defineComponent({
|
|
|
19016
19045
|
async function handleImport() {
|
|
19017
19046
|
if (importDisabled()) {
|
|
19018
19047
|
antDesignVue.message.error("\u8BF7\u5148\u9009\u62E9\u5E97\u94FA\uFF01");
|
|
19019
|
-
} else if (
|
|
19020
|
-
"F2CTemplate",
|
|
19021
|
-
"B2CTemplate",
|
|
19022
|
-
"DistributeTemp",
|
|
19023
|
-
"FreshTemplate",
|
|
19024
|
-
"activityApply"
|
|
19025
|
-
].includes(tableConfig.value?.template)) {
|
|
19048
|
+
} else if (isProductCenterSuit.value) {
|
|
19026
19049
|
if (data.length > 0) {
|
|
19027
19050
|
if (await utils__default["default"].confirmModal("\u518D\u6B21\u6279\u5BFC\u4F1A\u8986\u76D6\u5DF2\u6709\u6570\u636E")) {
|
|
19028
19051
|
data.splice(0, data.length);
|
|
@@ -19078,13 +19101,7 @@ const _sfc_main$7 = vue.defineComponent({
|
|
|
19078
19101
|
});
|
|
19079
19102
|
}
|
|
19080
19103
|
function processOtherAssociatedFields(field, fields, row, result) {
|
|
19081
|
-
if (
|
|
19082
|
-
"F2CTemplate",
|
|
19083
|
-
"B2CTemplate",
|
|
19084
|
-
"DistributeTemp",
|
|
19085
|
-
"FreshTemplate",
|
|
19086
|
-
"activityApply"
|
|
19087
|
-
].includes(tableConfig.value.template)) {
|
|
19104
|
+
if (isProductCenterSuit.value) {
|
|
19088
19105
|
fields?.forEach?.((item) => {
|
|
19089
19106
|
row[item] = result ? result[item] : void 0;
|
|
19090
19107
|
});
|
|
@@ -19117,7 +19134,7 @@ const _sfc_main$7 = vue.defineComponent({
|
|
|
19117
19134
|
file && reader.readAsText(file, "GB2312");
|
|
19118
19135
|
}
|
|
19119
19136
|
function isValidColumn(c) {
|
|
19120
|
-
return c.type !== "checkbox" && c.field !== oper;
|
|
19137
|
+
return c.type !== "checkbox" && c.type !== "seq" && c.field !== oper;
|
|
19121
19138
|
}
|
|
19122
19139
|
function parseCsv(result) {
|
|
19123
19140
|
let data2 = [];
|
|
@@ -19319,7 +19336,7 @@ const _sfc_main$7 = vue.defineComponent({
|
|
|
19319
19336
|
}
|
|
19320
19337
|
function handlePressEnter(value, rule, row) {
|
|
19321
19338
|
row[rule.field] = value;
|
|
19322
|
-
if (
|
|
19339
|
+
if (isProductCenterSuit.value && rule.field === "productCode") {
|
|
19323
19340
|
Object.keys(row).forEach((key) => {
|
|
19324
19341
|
if (!["productCode", "_X_ROW_KEY"].includes(key)) {
|
|
19325
19342
|
row[key] = void 0;
|