bm-admin-ui 1.0.92-alpha → 1.0.93-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.
Files changed (37) hide show
  1. package/es/components/cascader/index.js +2 -2
  2. package/es/components/form-create/index.js +389 -98
  3. package/es/components/form-designer/index.js +180 -122
  4. package/es/components/search-filter/index.d.ts +28 -0
  5. package/es/components/search-filter/index.js +70 -17
  6. package/es/components/search-filter/src/form-select-all.vue.d.ts +15 -0
  7. package/es/components/search-filter/src/search-filter.d.ts +16 -0
  8. package/es/components/search-filter/src/search-filter.vue.d.ts +28 -0
  9. package/es/components/search-filter/src/search-reset-btn.vue.d.ts +26 -0
  10. package/es/components/select-all/index.d.ts +2 -0
  11. package/es/components/select-all/index.js +33 -15
  12. package/es/components/select-all/src/selectAll.vue.d.ts +2 -0
  13. package/es/utils/uniqueId.js +2 -2
  14. package/lib/components/cascader/index.js +2 -2
  15. package/lib/components/form-create/index.js +389 -98
  16. package/lib/components/form-designer/index.js +174 -116
  17. package/lib/components/search-filter/index.d.ts +28 -0
  18. package/lib/components/search-filter/index.js +71 -17
  19. package/lib/components/search-filter/src/form-select-all.vue.d.ts +15 -0
  20. package/lib/components/search-filter/src/search-filter.d.ts +16 -0
  21. package/lib/components/search-filter/src/search-filter.vue.d.ts +28 -0
  22. package/lib/components/search-filter/src/search-reset-btn.vue.d.ts +26 -0
  23. package/lib/components/select-all/index.d.ts +2 -0
  24. package/lib/components/select-all/index.js +32 -14
  25. package/lib/components/select-all/src/selectAll.vue.d.ts +2 -0
  26. package/lib/utils/uniqueId.js +2 -2
  27. package/package.json +1 -1
  28. package/theme-chalk/form-designer.css +1 -1
  29. package/theme-chalk/index.css +1 -1
  30. package/theme-chalk/select-all.css +1 -1
  31. package/types/components/search-filter/index.d.ts +28 -0
  32. package/types/components/search-filter/src/form-select-all.vue.d.ts +15 -0
  33. package/types/components/search-filter/src/search-filter.d.ts +16 -0
  34. package/types/components/search-filter/src/search-filter.vue.d.ts +28 -0
  35. package/types/components/search-filter/src/search-reset-btn.vue.d.ts +26 -0
  36. package/types/components/select-all/index.d.ts +2 -0
  37. package/types/components/select-all/src/selectAll.vue.d.ts +2 -0
@@ -174,50 +174,36 @@ var textarea = {
174
174
  },
175
175
  };
176
176
 
177
+ function generateRowRule(data) {
178
+ return {
179
+ type: 'inputNumber',
180
+ field: data.field,
181
+ title: data.title.title,
182
+ props: {
183
+ type: 'number',
184
+ placeholder: data.props.placeholder,
185
+ },
186
+ value: data.value,
187
+ effect: {
188
+ required: data.effect.required && '请输入',
189
+ },
190
+ wrap: {
191
+ wrapperCol: {
192
+ span: fieldRatioMap[data.config.fieldRatio],
193
+ },
194
+ },
195
+ style: {
196
+ width: '100%',
197
+ },
198
+ };
199
+ }
177
200
  var numInput = {
178
201
  name: 'numInput',
179
202
  rule(data) {
180
- return {
181
- type: 'inputNumber',
182
- field: data.field,
183
- title: data.title.title,
184
- props: {
185
- type: 'number',
186
- placeholder: data.props.placeholder,
187
- },
188
- value: data.value,
189
- effect: {
190
- required: data.effect.required && '请输入',
191
- },
192
- wrap: {
193
- wrapperCol: {
194
- span: fieldRatioMap[data.config.fieldRatio],
195
- },
196
- },
197
- style: {
198
- width: '100%',
199
- },
200
- };
203
+ return generateRowRule(data);
201
204
  },
202
205
  rowRule(data) {
203
- return {
204
- type: 'inputNumber',
205
- field: data.field,
206
- title: data.title.title,
207
- props: {
208
- placeholder: data.props.placeholder,
209
- },
210
- value: data.value,
211
- effect: {
212
- required: data.effect.required && '请输入',
213
- },
214
- col: {
215
- span: fieldRatioMap[data.config.fieldRatio],
216
- },
217
- style: {
218
- width: '100%',
219
- },
220
- };
206
+ return generateRowRule(data);
221
207
  },
222
208
  tableRule(data) {
223
209
  const field = data.field;
@@ -255,7 +241,7 @@ var _export_sfc = (sfc, props) => {
255
241
  return target;
256
242
  };
257
243
 
258
- const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
244
+ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
259
245
  __name: "radio-widget",
260
246
  props: ["formCreateInject"],
261
247
  emits: ["change"],
@@ -294,7 +280,7 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
294
280
  };
295
281
  }
296
282
  });
297
- var RadioWidget = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__file", "radio-widget.vue"]]);
283
+ var RadioWidget = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__file", "radio-widget.vue"]]);
298
284
 
299
285
  function handleRadioRule(rule) {
300
286
  if (rule.type === 'radio') {
@@ -854,7 +840,7 @@ var file = {
854
840
  },
855
841
  };
856
842
 
857
- const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
843
+ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
858
844
  __name: "staff-selector",
859
845
  props: [
860
846
  "title",
@@ -920,7 +906,7 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
920
906
  };
921
907
  }
922
908
  });
923
- var StaffSelector = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__file", "staff-selector.vue"]]);
909
+ var StaffSelector = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__file", "staff-selector.vue"]]);
924
910
 
925
911
  var people = {
926
912
  name: 'people',
@@ -1038,10 +1024,10 @@ var people = {
1038
1024
  },
1039
1025
  };
1040
1026
 
1041
- const _hoisted_1$6 = ["onClick"];
1027
+ const _hoisted_1$7 = ["onClick"];
1042
1028
  const _hoisted_2$6 = ["onClick"];
1043
1029
  const _hoisted_3$5 = { class: "box" };
1044
- const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
1030
+ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
1045
1031
  __name: "temp-content",
1046
1032
  props: ["content", "preview"],
1047
1033
  setup(__props) {
@@ -1086,7 +1072,7 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
1086
1072
  vue.createVNode(vue.unref(iconsVue.EyeOutlined)),
1087
1073
  vue.createTextVNode("\xA0\u9884\u89C8")
1088
1074
  ])
1089
- ], 8, _hoisted_1$6)) : vue.createCommentVNode("v-if", true),
1075
+ ], 8, _hoisted_1$7)) : vue.createCommentVNode("v-if", true),
1090
1076
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(layers), (layer) => {
1091
1077
  return vue.openBlock(), vue.createElementBlock("div", {
1092
1078
  key: layer.uuid,
@@ -1120,9 +1106,9 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
1120
1106
  };
1121
1107
  }
1122
1108
  });
1123
- var TempContent = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__file", "temp-content.vue"]]);
1109
+ var TempContent = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__file", "temp-content.vue"]]);
1124
1110
 
1125
- const _hoisted_1$5 = { class: "bm-fc-select-material-temp__content__item-info" };
1111
+ const _hoisted_1$6 = { class: "bm-fc-select-material-temp__content__item-info" };
1126
1112
  const _hoisted_2$5 = { class: "bm-fc-select-material-temp__content__item-info__cover" };
1127
1113
  const _hoisted_3$4 = ["src"];
1128
1114
  const _hoisted_4$4 = ["onClick"];
@@ -1132,7 +1118,7 @@ const _hoisted_5$4 = {
1132
1118
  };
1133
1119
  const _hoisted_6$3 = ["title"];
1134
1120
  const _hoisted_7$3 = { class: "bm-fc-select-material-temp__content__item-time" };
1135
- const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
1121
+ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
1136
1122
  __name: "select-material-temp",
1137
1123
  props: [
1138
1124
  "visible",
@@ -1323,7 +1309,7 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
1323
1309
  span: 6
1324
1310
  }, {
1325
1311
  default: vue.withCtx(() => [
1326
- vue.createElementVNode("div", _hoisted_1$5, [
1312
+ vue.createElementVNode("div", _hoisted_1$6, [
1327
1313
  vue.createElementVNode("div", _hoisted_2$5, [
1328
1314
  item.coverPlanUrl ? (vue.openBlock(), vue.createElementBlock("img", {
1329
1315
  key: 0,
@@ -1378,7 +1364,7 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
1378
1364
  };
1379
1365
  }
1380
1366
  });
1381
- var SelectMaterialTemp = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__file", "select-material-temp.vue"]]);
1367
+ var SelectMaterialTemp = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__file", "select-material-temp.vue"]]);
1382
1368
 
1383
1369
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
1384
1370
 
@@ -18583,7 +18569,7 @@ var lodash = {exports: {}};
18583
18569
  }.call(commonjsGlobal));
18584
18570
  }(lodash, lodash.exports));
18585
18571
 
18586
- const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
18572
+ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
18587
18573
  __name: "product-input-in-table",
18588
18574
  props: ["value", "disabled", "shopValue"],
18589
18575
  emits: ["change"],
@@ -18620,9 +18606,127 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
18620
18606
  };
18621
18607
  }
18622
18608
  });
18623
- var ProductInput = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__file", "product-input-in-table.vue"]]);
18609
+ var ProductInput = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__file", "product-input-in-table.vue"]]);
18610
+
18611
+ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
18612
+ __name: "customer-input-in-table",
18613
+ props: ["value", "disabled", "shopValue"],
18614
+ emits: ["change"],
18615
+ setup(__props, { emit: emits }) {
18616
+ const props = __props;
18617
+ const debounceFn = lodash.exports.debounce(emitChange, 500);
18618
+ const inputValue = vue.ref();
18619
+ function emitChange(val) {
18620
+ emits("change", val);
18621
+ }
18622
+ vue.watch(
18623
+ () => props.value,
18624
+ (val) => {
18625
+ inputValue.value = val;
18626
+ },
18627
+ {
18628
+ immediate: true
18629
+ }
18630
+ );
18631
+ vue.watch(
18632
+ () => props.shopValue,
18633
+ () => {
18634
+ emitChange("");
18635
+ }
18636
+ );
18637
+ return (_ctx, _cache) => {
18638
+ return vue.openBlock(), vue.createBlock(vue.unref(antDesignVue.Input), {
18639
+ value: inputValue.value,
18640
+ "onUpdate:value": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
18641
+ placeholder: "\u8BF7\u8F93\u5165",
18642
+ disabled: __props.disabled,
18643
+ onChange: _cache[1] || (_cache[1] = ($event) => vue.unref(debounceFn)($event.target.value))
18644
+ }, null, 8, ["value", "disabled"]);
18645
+ };
18646
+ }
18647
+ });
18648
+ var CustomerInput = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__file", "customer-input-in-table.vue"]]);
18649
+
18650
+ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
18651
+ __name: "shop-input-in-table",
18652
+ props: ["value", "disabled", "fetch", "dataFiltering"],
18653
+ emits: ["change"],
18654
+ setup(__props, { emit: emits }) {
18655
+ const props = __props;
18656
+ const keyword = vue.ref("");
18657
+ const debounceFetch = lodash.exports.debounce((value) => {
18658
+ props.fetch.fetch(
18659
+ {
18660
+ keyword: keyword.value,
18661
+ filterByUser: props.dataFiltering
18662
+ }
18663
+ ).then((data) => {
18664
+ if (value === keyword.value)
18665
+ options.value = data;
18666
+ });
18667
+ }, 300);
18668
+ const options = vue.ref([]);
18669
+ const fieldNames = {
18670
+ label: "name",
18671
+ value: "code",
18672
+ channelName: "channelName",
18673
+ platformName: "platformName",
18674
+ channelTypeName: "channelTypeName"
18675
+ };
18676
+ const inputValue = vue.ref();
18677
+ function handleSearch(value) {
18678
+ keyword.value = value;
18679
+ debounceFetch(value);
18680
+ }
18681
+ function handleChangeConfirm(val, option) {
18682
+ handleChange(val, option);
18683
+ }
18684
+ function handleChange(val, option) {
18685
+ console.log("emit\u6570\u636E", option);
18686
+ emits(
18687
+ "change",
18688
+ option ? {
18689
+ [fieldNames.value]: option.value,
18690
+ [fieldNames.label]: option.label,
18691
+ ...option
18692
+ } : void 0
18693
+ );
18694
+ }
18695
+ vue.watch(
18696
+ () => props.value,
18697
+ (val) => {
18698
+ inputValue.value = val;
18699
+ },
18700
+ {
18701
+ immediate: true
18702
+ }
18703
+ );
18704
+ debounceFetch("");
18705
+ return (_ctx, _cache) => {
18706
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
18707
+ vue.createCommentVNode(' <Input\r\n v-model:value="inputValue"\r\n placeholder="\u8BF7\u8F93\u5165"\r\n :disabled="disabled"\r\n @change="debounceFn($event.target.value)"\r\n ></Input> '),
18708
+ vue.createVNode(vue.unref(antDesignVue.Select), {
18709
+ value: __props.value,
18710
+ placeholder: "\u8BF7\u9009\u62E9",
18711
+ "show-search": "",
18712
+ "show-arrow": false,
18713
+ "default-active-first-option": false,
18714
+ "filter-option": false,
18715
+ "not-found-content": null,
18716
+ options: options.value,
18717
+ "get-popup-container": vue.unref(getContainer),
18718
+ disabled: __props.disabled,
18719
+ "allow-clear": "",
18720
+ onChange: handleChangeConfirm,
18721
+ onSearch: handleSearch
18722
+ }, null, 8, ["value", "options", "get-popup-container", "disabled"])
18723
+ ], 2112);
18724
+ };
18725
+ }
18726
+ });
18727
+ var ShopInput = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__file", "shop-input-in-table.vue"]]);
18624
18728
 
18625
- const _hoisted_1$4 = { class: "bm-dc-table-widget" };
18729
+ const _hoisted_1$5 = { class: "bm-dc-table-widget" };
18626
18730
  const _hoisted_2$4 = { class: "bm-dc-table-widget__title" };
18627
18731
  const _hoisted_3$3 = { class: "bm-dc-table-widget__title-samll" };
18628
18732
  const _hoisted_4$3 = { class: "bm-dc-table-widget__top-bar" };
@@ -18641,18 +18745,32 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
18641
18745
  setup(__props, { emit: emits }) {
18642
18746
  const props = __props;
18643
18747
  dayjs__default["default"].extend(customParseFormat__default["default"]);
18644
- const productInfoKeyMap = {
18748
+ const accosiationParseKeyMap = {
18645
18749
  \u5546\u54C1\u540D\u79F0: "productName",
18646
18750
  \u5546\u54C1\u7B80\u79F0: "productShortName",
18647
18751
  \u5546\u54C1\u56FE\u7247: "picUrl",
18648
18752
  \u5EFA\u8BAE\u96F6\u552E\u4EF7: "retailPrice",
18649
18753
  \u5546\u54C1\u7BB1\u89C4: "carton",
18650
- \u5546\u54C1\u5355\u4F4D: "unit"
18754
+ \u5546\u54C1\u5355\u4F4D: "unit",
18755
+ \u5E97\u94FA\u6240\u5C5E\u5E73\u53F0: "platformName",
18756
+ \u6E20\u9053: "channelName",
18757
+ \u6E20\u9053\u7C7B\u522B: "channelTypeName",
18758
+ \u5BA2\u6237\u7B80\u79F0: "",
18759
+ \u5BA2\u6237\u7C7B\u578B: "",
18760
+ \u5BA2\u6237\u7B49\u7EA7: "",
18761
+ \u6240\u5C5E\u5E97\u94FA: "",
18762
+ \u5E97\u94FA\u7F16\u53F7: "",
18763
+ SAP\u5BA2\u6237\u7F16\u53F7: ""
18764
+ };
18765
+ let indexMap = {
18766
+ product: 0,
18767
+ shop: 0,
18768
+ customer: 0
18651
18769
  };
18652
- let productIndex = 0;
18653
18770
  const oper = "oper";
18654
18771
  const bmFloatTableRef = vue.ref();
18655
18772
  const importFeature = vue.computed(() => isShow("import"));
18773
+ const exportFeature = vue.computed(() => isShow("export"));
18656
18774
  const deleteFeature = vue.computed(() => isShow("delete"));
18657
18775
  const copyFeature = vue.computed(() => isShow("copy"));
18658
18776
  const columns = vue.reactive([]);
@@ -18702,6 +18820,8 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
18702
18820
  }, {}) || {}
18703
18821
  );
18704
18822
  const productInputSlots = vue.reactive([]);
18823
+ const shopInputSlots = vue.reactive([]);
18824
+ const customerInputSlots = vue.reactive([]);
18705
18825
  const formData = vue.computed(
18706
18826
  () => props.formData || props.formCreateInject.api.bind()
18707
18827
  );
@@ -18712,6 +18832,8 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
18712
18832
  columns.splice(0, columns.length);
18713
18833
  data.splice(0, data.length);
18714
18834
  productInputSlots.splice(0, productInputSlots.length);
18835
+ shopInputSlots.splice(0, shopInputSlots.length);
18836
+ customerInputSlots.splice(0, customerInputSlots.length);
18715
18837
  const childRules = lodashEs.cloneDeep(props.rule.config.childRules);
18716
18838
  const value = props.rule.value;
18717
18839
  if (deleteFeature.value && !props.hidden) {
@@ -18726,8 +18848,8 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
18726
18848
  return pre;
18727
18849
  }
18728
18850
  const name = cur.name;
18729
- if (name === "product") {
18730
- pre.push(...getProductColumn(cur));
18851
+ if (Object.keys(indexMap).includes(name)) {
18852
+ pre.push(...getExtraColumns(cur));
18731
18853
  } else {
18732
18854
  pre.push(ruleList[name].tableRule(cur, props.extraConfig));
18733
18855
  }
@@ -18759,15 +18881,26 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
18759
18881
  function productPicName(value, field) {
18760
18882
  return `${value}-${field}`;
18761
18883
  }
18762
- function getProductColumn(rule) {
18763
- const productName = `\u5546\u54C1${String(++productIndex).padStart(2, "0")}`;
18884
+ function getExtraColumns(rule) {
18885
+ const configObj = {
18886
+ shop: {
18887
+ prefix: "\u5E97\u94FA",
18888
+ slots: shopInputSlots
18889
+ },
18890
+ product: { prefix: "\u5546\u54C1", slots: productInputSlots },
18891
+ customer: { prefix: "\u5BA2\u6237", slots: customerInputSlots }
18892
+ }[rule.name];
18893
+ const mainName = `${configObj.prefix}${String(++indexMap[rule.name]).padStart(
18894
+ 2,
18895
+ "0"
18896
+ )}`;
18764
18897
  const field = rule.field;
18765
18898
  const associatedFields = rule.config.associatedFields;
18766
- productInputSlots.push(rule);
18899
+ configObj.slots.push(rule);
18767
18900
  const columns2 = [
18768
18901
  {
18769
18902
  field,
18770
- title: `\u5546\u54C1\u7F16\u7801-${productName}`,
18903
+ title: rule.name === "product" ? `\u5546\u54C1\u7F16\u7801-${mainName}` : `${mainName}`,
18771
18904
  headerClassName: rule.effect.required ? "is-required" : "",
18772
18905
  minWidth: "138px",
18773
18906
  slots: {
@@ -18780,7 +18913,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
18780
18913
  const childField = productPicName(item.value, field);
18781
18914
  columns2.push({
18782
18915
  field: childField,
18783
- title: `${item.label}-${productName}`,
18916
+ title: `${item.label}-${mainName}`,
18784
18917
  minWidth: "138px",
18785
18918
  slots: {
18786
18919
  default({ row }) {
@@ -18844,6 +18977,14 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
18844
18977
  inputRef.value.click();
18845
18978
  }
18846
18979
  }
18980
+ function handleExport() {
18981
+ xGrid.value.exportData({
18982
+ mode: "all",
18983
+ columnFilterMethod({ column }) {
18984
+ return isValidColumn(column);
18985
+ }
18986
+ });
18987
+ }
18847
18988
  function emitChange() {
18848
18989
  emits("change", data);
18849
18990
  }
@@ -18872,7 +19013,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
18872
19013
  function processAssociatedFields(field, associatedFields, row, result) {
18873
19014
  if (associatedFields.length)
18874
19015
  associatedFields.forEach((item) => {
18875
- row[productPicName(item.value, field)] = result ? result[productInfoKeyMap[item.value]] : void 0;
19016
+ row[productPicName(item.value, field)] = result ? result[accosiationParseKeyMap[item.value]] : void 0;
18876
19017
  });
18877
19018
  }
18878
19019
  function handleChange(e) {
@@ -18925,12 +19066,12 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
18925
19066
  const validColumns = columns.filter((c) => isValidColumn(c));
18926
19067
  for (const row of rowData) {
18927
19068
  for (const { field } of validColumns) {
18928
- const rule = childRulesMap.value[field];
19069
+ const rule = childRulesMap.value[`${field}`];
18929
19070
  const title = rule?.title?.title;
18930
19071
  if (!rule)
18931
19072
  continue;
18932
19073
  const fieldNames = props.extraConfig[rule.name]?.fieldNames;
18933
- let value = row[field] || "";
19074
+ let value = row[`${field}`] || "";
18934
19075
  const txtFormatFn = rule.config?.txtFormatFn;
18935
19076
  if (!value) {
18936
19077
  if (rule.effect.required && rule.name !== "materialType") {
@@ -19083,7 +19224,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
19083
19224
  break;
19084
19225
  }
19085
19226
  }
19086
- row[field] = value;
19227
+ row[`${field}`] = value;
19087
19228
  }
19088
19229
  if (error)
19089
19230
  break;
@@ -19106,6 +19247,15 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
19106
19247
  row[rule.field] = value;
19107
19248
  queryProductInfo(rule, row);
19108
19249
  }
19250
+ function handleShopOption(value, rule, row) {
19251
+ row[rule?.field] = value;
19252
+ processAssociatedFields(
19253
+ rule?.field,
19254
+ rule?.config?.associatedFields,
19255
+ row,
19256
+ value
19257
+ );
19258
+ }
19109
19259
  function importDisabled() {
19110
19260
  return productInputSlots.filter((item) => item.config?.dataFiltering).some((item) => !formData.value[item.config.dataFiltering]);
19111
19261
  }
@@ -19128,12 +19278,23 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
19128
19278
  }
19129
19279
  );
19130
19280
  return (_ctx, _cache) => {
19131
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$4, [
19281
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$5, [
19132
19282
  vue.createElementVNode("div", _hoisted_2$4, [
19133
19283
  vue.createTextVNode(vue.toDisplayString(__props.rule.title.title) + " ", 1),
19134
19284
  vue.createElementVNode("span", _hoisted_3$3, vue.toDisplayString(vue.unref(countText)), 1),
19135
19285
  vue.createElementVNode("div", _hoisted_4$3, [
19136
- vue.unref(importFeature) && !__props.hidden ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
19286
+ vue.unref(exportFeature) && !__props.hidden ? (vue.openBlock(), vue.createBlock(vue.unref(antDesignVue.Button), {
19287
+ key: 0,
19288
+ disabled: __props.disabled,
19289
+ onClick: handleExport
19290
+ }, {
19291
+ default: vue.withCtx(() => [
19292
+ vue.createTextVNode("\u5BFC\u51FA")
19293
+ ]),
19294
+ _: 1
19295
+ }, 8, ["disabled"])) : vue.createCommentVNode("v-if", true),
19296
+ vue.createTextVNode("\xA0 "),
19297
+ vue.unref(importFeature) && !__props.hidden ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
19137
19298
  vue.createElementVNode("input", {
19138
19299
  ref_key: "inputRef",
19139
19300
  ref: inputRef,
@@ -19163,7 +19324,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
19163
19324
  }, 8, ["disabled"])
19164
19325
  ], 64)) : vue.createCommentVNode("v-if", true),
19165
19326
  vue.unref(deleteFeature) && !__props.hidden ? (vue.openBlock(), vue.createBlock(vue.unref(antDesignVue.Button), {
19166
- key: 1,
19327
+ key: 2,
19167
19328
  disabled: __props.disabled,
19168
19329
  onClick: handleBatchDelete
19169
19330
  }, {
@@ -19173,7 +19334,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
19173
19334
  _: 1
19174
19335
  }, 8, ["disabled"])) : vue.createCommentVNode("v-if", true),
19175
19336
  !__props.hidden ? (vue.openBlock(), vue.createBlock(vue.unref(antDesignVue.Button), {
19176
- key: 2,
19337
+ key: 3,
19177
19338
  type: "primary",
19178
19339
  disabled: __props.disabled,
19179
19340
  onClick: handleAdd
@@ -19235,6 +19396,33 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
19235
19396
  }, null, 8, ["value", "disabled", "shop-value", "onChange"])
19236
19397
  ])
19237
19398
  };
19399
+ }),
19400
+ vue.renderList(shopInputSlots, (item) => {
19401
+ return {
19402
+ name: item.field,
19403
+ fn: vue.withCtx(({ row }) => [
19404
+ vue.createCommentVNode(" {{ item }} "),
19405
+ vue.createVNode(ShopInput, {
19406
+ value: row[item.field],
19407
+ fetch: __props.extraConfig?.shop,
19408
+ "data-filtering": item?.config?.dataFiltering,
19409
+ onChange: ($event) => handleShopOption($event, item, row)
19410
+ }, null, 8, ["value", "fetch", "data-filtering", "onChange"])
19411
+ ])
19412
+ };
19413
+ }),
19414
+ vue.renderList(customerInputSlots, (item) => {
19415
+ return {
19416
+ name: item.field,
19417
+ fn: vue.withCtx(({ row }) => [
19418
+ vue.createVNode(CustomerInput, {
19419
+ value: row[item.field],
19420
+ disabled: item.disabled || pruductInputDisabled(item.config?.dataFiltering),
19421
+ "shop-value": vue.unref(formData)[item.config.dataFiltering],
19422
+ onChange: ($event) => handlePressEnter($event, item, row)
19423
+ }, null, 8, ["value", "disabled", "shop-value", "onChange"])
19424
+ ])
19425
+ };
19238
19426
  })
19239
19427
  ]), 1032, ["config"])
19240
19428
  ]),
@@ -19247,7 +19435,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
19247
19435
  });
19248
19436
  var TableWidget = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__file", "table-widget.vue"]]);
19249
19437
 
19250
- const _hoisted_1$3 = /* @__PURE__ */ vue.createElementVNode("span", { class: "bm-fc-form-item-label is-required" }, "\u7D20\u6750\u6A21\u677F\uFF1A", -1);
19438
+ const _hoisted_1$4 = /* @__PURE__ */ vue.createElementVNode("span", { class: "bm-fc-form-item-label is-required" }, "\u7D20\u6750\u6A21\u677F\uFF1A", -1);
19251
19439
  const _hoisted_2$3 = { key: 0 };
19252
19440
  const _hoisted_3$2 = /* @__PURE__ */ vue.createElementVNode("span", { class: "bm-fc-form-item-label" }, "\u7D20\u6750\u7C7B\u578B\uFF1A", -1);
19253
19441
  const _hoisted_4$2 = /* @__PURE__ */ vue.createElementVNode("span", { class: "bm-fc-form-item-label" }, "\u5C3A\u5BF8\uFF1A", -1);
@@ -19583,7 +19771,7 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
19583
19771
  default: vue.withCtx(() => [
19584
19772
  vue.createVNode(vue.unref(antDesignVue.Col), null, {
19585
19773
  default: vue.withCtx(() => [
19586
- _hoisted_1$3
19774
+ _hoisted_1$4
19587
19775
  ]),
19588
19776
  _: 1
19589
19777
  }),
@@ -19875,7 +20063,7 @@ var materialTemp = {
19875
20063
  },
19876
20064
  };
19877
20065
 
19878
- const _hoisted_1$2 = { class: "bm-fc-form-item-label" };
20066
+ const _hoisted_1$3 = { class: "bm-fc-form-item-label" };
19879
20067
  const _hoisted_2$2 = ["src"];
19880
20068
  const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
19881
20069
  __name: "product-info",
@@ -20007,7 +20195,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
20007
20195
  default: vue.withCtx(() => [
20008
20196
  vue.createVNode(vue.unref(antDesignVue.Col), null, {
20009
20197
  default: vue.withCtx(() => [
20010
- vue.createElementVNode("span", _hoisted_1$2, vue.toDisplayString(field.label) + "\uFF1A", 1)
20198
+ vue.createElementVNode("span", _hoisted_1$3, vue.toDisplayString(field.label) + "\uFF1A", 1)
20011
20199
  ]),
20012
20200
  _: 2
20013
20201
  }, 1024),
@@ -20109,6 +20297,7 @@ var product = {
20109
20297
  },
20110
20298
  };
20111
20299
 
20300
+ const _hoisted_1$2 = { class: "bm-fc-form-item-label" };
20112
20301
  const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
20113
20302
  __name: "shop-widget",
20114
20303
  props: [
@@ -20117,14 +20306,20 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
20117
20306
  "dataFiltering",
20118
20307
  "disabled",
20119
20308
  "formCreateInject",
20120
- "fdRule"
20309
+ "fdRule",
20310
+ "required",
20311
+ "title",
20312
+ "associatedFields"
20121
20313
  ],
20122
20314
  emits: ["change"],
20123
20315
  setup(__props, { emit: emits }) {
20124
20316
  const props = __props;
20125
20317
  const fieldNames = props.extraConfig.fieldNames || {
20126
20318
  label: "name",
20127
- value: "code"
20319
+ value: "code",
20320
+ channelName: "channelName",
20321
+ platformName: "platformName",
20322
+ channelTypeName: "channelTypeName"
20128
20323
  };
20129
20324
  const options = vue.ref([]);
20130
20325
  const keyword = vue.ref("");
@@ -20190,23 +20385,99 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
20190
20385
  keyword.value = value;
20191
20386
  debounceFetch(value);
20192
20387
  }
20388
+ const shopInfoKeyMap = {
20389
+ \u5E97\u94FA\u6240\u5C5E\u5E73\u53F0: "platformName",
20390
+ \u6E20\u9053: "channelName",
20391
+ \u6E20\u9053\u7C7B\u522B: "channelTypeName"
20392
+ };
20393
+ function getValue(value) {
20394
+ const parse = shopInfoKeyMap[value];
20395
+ return props.formCreateInject?.rule?.value?.[parse];
20396
+ }
20193
20397
  initOptions();
20194
20398
  return (_ctx, _cache) => {
20195
- return vue.openBlock(), vue.createBlock(vue.unref(antDesignVue.Select), {
20196
- value: __props.formCreateInject?.rule?.value?.value || __props.value?.value,
20197
- placeholder: "\u8BF7\u9009\u62E9",
20198
- "show-search": "",
20199
- "show-arrow": false,
20200
- "default-active-first-option": false,
20201
- "filter-option": false,
20202
- "not-found-content": null,
20203
- options: options.value,
20204
- "get-popup-container": vue.unref(getContainer),
20205
- disabled: __props.disabled,
20206
- "allow-clear": "",
20207
- onChange: handleChangeConfirm,
20208
- onSearch: handleSearch
20209
- }, null, 8, ["value", "options", "get-popup-container", "disabled"]);
20399
+ return vue.openBlock(), vue.createBlock(vue.unref(antDesignVue.Row), { gutter: [0, 24] }, {
20400
+ default: vue.withCtx(() => [
20401
+ vue.createVNode(vue.unref(antDesignVue.Col), {
20402
+ span: __props.associatedFields?.length ? 8 : 24
20403
+ }, {
20404
+ default: vue.withCtx(() => [
20405
+ vue.createVNode(vue.unref(antDesignVue.Row), null, {
20406
+ default: vue.withCtx(() => [
20407
+ vue.createVNode(vue.unref(antDesignVue.Col), null, {
20408
+ default: vue.withCtx(() => [
20409
+ vue.createElementVNode("span", {
20410
+ class: vue.normalizeClass([
20411
+ "bm-fc-form-item-label",
20412
+ props.required ? "is-required" : ""
20413
+ ])
20414
+ }, vue.toDisplayString(__props.title) + "\uFF1A", 3)
20415
+ ]),
20416
+ _: 1
20417
+ }),
20418
+ vue.createVNode(vue.unref(antDesignVue.Col), { flex: 1 }, {
20419
+ default: vue.withCtx(() => [
20420
+ vue.createVNode(vue.unref(antDesignVue.Select), {
20421
+ value: __props.formCreateInject?.rule?.value?.value || __props.value?.value,
20422
+ placeholder: "\u8BF7\u9009\u62E9",
20423
+ "show-search": "",
20424
+ "show-arrow": false,
20425
+ "default-active-first-option": false,
20426
+ "filter-option": false,
20427
+ "not-found-content": null,
20428
+ options: options.value,
20429
+ "get-popup-container": vue.unref(getContainer),
20430
+ disabled: __props.disabled,
20431
+ "allow-clear": "",
20432
+ onChange: handleChangeConfirm,
20433
+ onSearch: handleSearch
20434
+ }, null, 8, ["value", "options", "get-popup-container", "disabled"])
20435
+ ]),
20436
+ _: 1
20437
+ })
20438
+ ]),
20439
+ _: 1
20440
+ })
20441
+ ]),
20442
+ _: 1
20443
+ }, 8, ["span"]),
20444
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.associatedFields, (field2) => {
20445
+ return vue.openBlock(), vue.createBlock(vue.unref(antDesignVue.Col), {
20446
+ key: field2.value,
20447
+ span: 8
20448
+ }, {
20449
+ default: vue.withCtx(() => [
20450
+ vue.createVNode(vue.unref(antDesignVue.Row), null, {
20451
+ default: vue.withCtx(() => [
20452
+ vue.createVNode(vue.unref(antDesignVue.Col), null, {
20453
+ default: vue.withCtx(() => [
20454
+ vue.createElementVNode("span", _hoisted_1$2, vue.toDisplayString(field2.label) + "\uFF1A", 1)
20455
+ ]),
20456
+ _: 2
20457
+ }, 1024),
20458
+ vue.createVNode(vue.unref(antDesignVue.Col), {
20459
+ class: "bm-fc-form-item",
20460
+ flex: 1
20461
+ }, {
20462
+ default: vue.withCtx(() => [
20463
+ getValue(field2.value) ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
20464
+ vue.createTextVNode(vue.toDisplayString(getValue(field2.value)), 1)
20465
+ ], 64)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
20466
+ vue.createTextVNode("\u7CFB\u7EDF\u81EA\u52A8\u5E26\u51FA")
20467
+ ], 64))
20468
+ ]),
20469
+ _: 2
20470
+ }, 1024)
20471
+ ]),
20472
+ _: 2
20473
+ }, 1024)
20474
+ ]),
20475
+ _: 2
20476
+ }, 1024);
20477
+ }), 128))
20478
+ ]),
20479
+ _: 1
20480
+ });
20210
20481
  };
20211
20482
  }
20212
20483
  });
@@ -20220,14 +20491,16 @@ var shop = {
20220
20491
  return {
20221
20492
  type: 'ShopWidget',
20222
20493
  component: ShopWidget,
20223
- title: `${data.title.title}${data.config.isMain ? '(主控件)' : ''}`,
20224
20494
  field: data.field,
20225
20495
  effect: {
20226
20496
  required: data.effect.required && '请选择店铺',
20227
20497
  },
20228
20498
  props: {
20229
20499
  dataFiltering: (_a = data.config) === null || _a === void 0 ? void 0 : _a.dataFiltering,
20500
+ associatedFields: data.config.associatedFields,
20230
20501
  extraConfig: shopExtraConfig,
20502
+ required: data.effect.required,
20503
+ title: `${data.title.title}${data.config.isMain ? '(主控件)' : ''}`,
20231
20504
  },
20232
20505
  inject: true,
20233
20506
  on: {
@@ -20877,11 +21150,22 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
20877
21150
  "extraConfig",
20878
21151
  "value",
20879
21152
  "info",
20880
- "formPermissions"
21153
+ "formPermissions",
21154
+ "resolveRulesConfig"
20881
21155
  ],
20882
21156
  emits: ["update:value"],
20883
21157
  setup(__props, { expose, emit: emits }) {
20884
21158
  const props = __props;
21159
+ const formRuleList = vue.computed(() => {
21160
+ if (typeof props.resolveRulesConfig === "function") {
21161
+ const rules = props.resolveRulesConfig(ruleList);
21162
+ if (!rules) {
21163
+ throw new Error("resolveRulesConfig\u9700\u8FD4\u56DErules\u89E3\u6790\u5BF9\u8C61");
21164
+ }
21165
+ return props.resolveRulesConfig(ruleList) || {};
21166
+ }
21167
+ return ruleList;
21168
+ });
20885
21169
  const option = vue.computed(() => ({
20886
21170
  wrap: {
20887
21171
  labelCol: {
@@ -20920,12 +21204,19 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
20920
21204
  function makeRule(fdRule) {
20921
21205
  return fdRule.map((data) => {
20922
21206
  const childRules = data?.config?.childRules;
20923
- const rule2 = ruleList[data.name].rule(data, props.extraConfig);
21207
+ const rule2 = formRuleList.value[data.name]?.rule(data, props.extraConfig);
21208
+ if (!rule2) {
21209
+ console.error(`\u672A\u914D\u7F6Erule \u3010${data.name}\u3011\u89E3\u6790\u5BF9\u8C61`);
21210
+ return null;
21211
+ }
20924
21212
  if (data.name === "row" && childRules?.length) {
20925
21213
  const rowRule = rule2.children.find((item) => item.type === "row");
20926
21214
  childRules.forEach((ruleItem) => {
20927
21215
  rowRule.children.push(
20928
- ruleList[ruleItem.name].rowRule(ruleItem, props.extraConfig)
21216
+ formRuleList.value[ruleItem.name]?.rowRule(
21217
+ ruleItem,
21218
+ props.extraConfig
21219
+ )
20929
21220
  );
20930
21221
  });
20931
21222
  }
@@ -20989,7 +21280,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
20989
21280
  }
20990
21281
  }
20991
21282
  function getFormFeildRule(rule2) {
20992
- if (rule2.native) {
21283
+ if (rule2?.native) {
20993
21284
  return rule2.children.find((item) => item.field);
20994
21285
  } else
20995
21286
  return rule2;