cloud-business 0.1.124-1 → 0.1.124-3

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/cloud-business.js CHANGED
@@ -3717,638 +3717,6 @@
3717
3717
  showPage: true
3718
3718
  };
3719
3719
 
3720
- var Store = /*#__PURE__*/function () {
3721
- function Store() {
3722
- _classCallCheck(this, Store);
3723
- this.queryCondition = [];
3724
- this.originCondition = [];
3725
- this.settingQuery = [];
3726
- }
3727
- _createClass(Store, [{
3728
- key: "getGoodsCategory",
3729
- value:
3730
- /**
3731
- * 查询标准类目
3732
- */
3733
- function () {
3734
- var _getGoodsCategory = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(server, extraQuery, platCode) {
3735
- var url;
3736
- return _regeneratorRuntime().wrap(function _callee$(_context) {
3737
- while (1) switch (_context.prev = _context.next) {
3738
- case 0:
3739
- url = "".concat(server, "/product-selector/2.0/cate/std_cate?tenant=").concat(extraQuery);
3740
- return _context.abrupt("return", http.post(url, platCode));
3741
- case 2:
3742
- case "end":
3743
- return _context.stop();
3744
- }
3745
- }, _callee);
3746
- }));
3747
- function getGoodsCategory(_x, _x2, _x3) {
3748
- return _getGoodsCategory.apply(this, arguments);
3749
- }
3750
- return getGoodsCategory;
3751
- }()
3752
- /**
3753
- * 埋点
3754
- */
3755
- }, {
3756
- key: "bury",
3757
- value: function bury(server, param) {
3758
- var url = "".concat(server, "/product-selector/2.0/statistic/tenant/use");
3759
- return http.post(url, param);
3760
- }
3761
-
3762
- /**
3763
- * 查询店铺自定义类目
3764
- */
3765
- }, {
3766
- key: "getGoodsDefaultCategory",
3767
- value: function () {
3768
- var _getGoodsDefaultCategory = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(server, extraQuery, platCode) {
3769
- var url;
3770
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
3771
- while (1) switch (_context2.prev = _context2.next) {
3772
- case 0:
3773
- url = "".concat(server, "/product-selector/2.0/cate/user_defined_cate?tenant=").concat(extraQuery);
3774
- return _context2.abrupt("return", http.post(url, platCode));
3775
- case 2:
3776
- case "end":
3777
- return _context2.stop();
3778
- }
3779
- }, _callee2);
3780
- }));
3781
- function getGoodsDefaultCategory(_x4, _x5, _x6) {
3782
- return _getGoodsDefaultCategory.apply(this, arguments);
3783
- }
3784
- return getGoodsDefaultCategory;
3785
- }()
3786
- }, {
3787
- key: "configBizzKey",
3788
- value: function configBizzKey(bizzKey, supportSku, _url) {
3789
- if (bizzKey) {
3790
- return "".concat(_url, "&bizzKey=").concat(bizzKey);
3791
- }
3792
- return supportSku ? "".concat(_url, "&bizzKey=10001") : _url;
3793
- }
3794
-
3795
- /**
3796
- * 全部商品条件保存
3797
- * @param {*} server
3798
- * @param {*} extraQuery
3799
- * @returns
3800
- */
3801
- }, {
3802
- key: "saveQueryCondition",
3803
- value: function () {
3804
- var _saveQueryCondition = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(server, extraQuery, params, bizzKey, supportSku) {
3805
- var _url, url;
3806
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
3807
- while (1) switch (_context3.prev = _context3.next) {
3808
- case 0:
3809
- _url = "".concat(server, "/product-selector/2.0/custom/saveUserCustom?tenant=").concat(extraQuery);
3810
- url = this.configBizzKey(bizzKey, supportSku, _url);
3811
- return _context3.abrupt("return", http.post(url, params));
3812
- case 3:
3813
- case "end":
3814
- return _context3.stop();
3815
- }
3816
- }, _callee3, this);
3817
- }));
3818
- function saveQueryCondition(_x7, _x8, _x9, _x10, _x11) {
3819
- return _saveQueryCondition.apply(this, arguments);
3820
- }
3821
- return saveQueryCondition;
3822
- }()
3823
- /**
3824
- * 全部商品条件查询
3825
- */
3826
- }, {
3827
- key: "fetchAllquery",
3828
- value: function () {
3829
- var _fetchAllquery = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(supportSku, server, extraQuery, supportTags, bizzKey) {
3830
- var _url, url, list, _queryCondition;
3831
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
3832
- while (1) switch (_context4.prev = _context4.next) {
3833
- case 0:
3834
- _url = "".concat(server, "/product-selector/2.0/custom/getCustom?tenant=").concat(extraQuery);
3835
- url = this.configBizzKey(bizzKey, supportSku, _url);
3836
- _context4.next = 4;
3837
- return http.get(url);
3838
- case 4:
3839
- list = _context4.sent;
3840
- _queryCondition = list.data.data;
3841
- this.originCondition = list.data.data;
3842
- if (!supportSku) {
3843
- _queryCondition = _queryCondition.filter(function (item) {
3844
- return ['sku_sku_id', 'sku_specification', 'sku_outer_id', 'sku_flag'].includes(item.itemId) === false;
3845
- });
3846
- }
3847
- if (!supportTags) {
3848
- _queryCondition = _queryCondition.filter(function (item) {
3849
- return !item.groupName;
3850
- });
3851
- }
3852
- this.queryCondition = _queryCondition.map(function (el) {
3853
- return _objectSpread2(_objectSpread2({}, el), {}, {
3854
- value: el.itemId,
3855
- label: el.itemName,
3856
- status: el.status === 3 ? 4 : el.status
3857
- });
3858
- });
3859
- return _context4.abrupt("return", this.queryCondition);
3860
- case 11:
3861
- case "end":
3862
- return _context4.stop();
3863
- }
3864
- }, _callee4, this);
3865
- }));
3866
- function fetchAllquery(_x12, _x13, _x14, _x15, _x16) {
3867
- return _fetchAllquery.apply(this, arguments);
3868
- }
3869
- return fetchAllquery;
3870
- }()
3871
- /**
3872
- * 设置查询条件查询
3873
- * @returns
3874
- */
3875
- }, {
3876
- key: "fetchSettingQuery",
3877
- value: function () {
3878
- var _fetchSettingQuery = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(supportSku, server, extraQuery, supportTags) {
3879
- var url, list, settingList;
3880
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
3881
- while (1) switch (_context5.prev = _context5.next) {
3882
- case 0:
3883
- url = "".concat(server, "/product-selector/2.0/condition/setting?tenant=").concat(extraQuery);
3884
- _context5.next = 3;
3885
- return http.get(url);
3886
- case 3:
3887
- list = _context5.sent;
3888
- settingList = list.data.data;
3889
- if (!supportTags) {
3890
- settingList = list.data.data.filter(function (item) {
3891
- return !item.groupName;
3892
- });
3893
- }
3894
- this.settingQuery = settingList;
3895
- return _context5.abrupt("return", this.settingQuery || []);
3896
- case 8:
3897
- case "end":
3898
- return _context5.stop();
3899
- }
3900
- }, _callee5, this);
3901
- }));
3902
- function fetchSettingQuery(_x17, _x18, _x19, _x20) {
3903
- return _fetchSettingQuery.apply(this, arguments);
3904
- }
3905
- return fetchSettingQuery;
3906
- }()
3907
- /**
3908
- * 根据条件查询商品
3909
- * @param {*} server 服务地址
3910
- * @param {*} extraQuery 租户信息
3911
- * @param {*} query 查询条件
3912
- * @param {*} platShopList 平台&店铺列表
3913
- * @param {*} history 需要标记为默认选中状态的商品数组(空对象)
3914
- */
3915
- }, {
3916
- key: "getGoods",
3917
- value: function () {
3918
- var _getGoods = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(server, extraQuery, query, platShopList) {
3919
- var history,
3920
- url,
3921
- result,
3922
- mapList,
3923
- _args6 = arguments;
3924
- return _regeneratorRuntime().wrap(function _callee6$(_context6) {
3925
- while (1) switch (_context6.prev = _context6.next) {
3926
- case 0:
3927
- history = _args6.length > 4 && _args6[4] !== undefined ? _args6[4] : {};
3928
- url = "".concat(server, "/product-selector/2.0/items/base?tenant=").concat(extraQuery, "&pageNo=").concat(query.page.pageNo, "&pageSize=").concat(query.page.pageSize);
3929
- _context6.next = 4;
3930
- return http.post(url, query.parameter);
3931
- case 4:
3932
- result = _context6.sent;
3933
- if (result.data.success) {
3934
- _context6.next = 8;
3935
- break;
3936
- }
3937
- cloudReact.Message.error('服务出错');
3938
- return _context6.abrupt("return", {
3939
- data: {},
3940
- pageNum: query.page.pageNo,
3941
- pageSize: query.page.pageSize,
3942
- total: 0
3943
- });
3944
- case 8:
3945
- mapList = {};
3946
- result.data.data.data.forEach(function (item) {
3947
- Object.assign(item, {
3948
- rowExpandable: false
3949
- }); // 默认添加一个收起状态
3950
- platShopList.forEach(function (shop) {
3951
- if (item.shopId === shop.shopId) {
3952
- Object.assign(item, {
3953
- shopName: shop.shopName
3954
- });
3955
- }
3956
- });
3957
- if (history[item.uniProductId]) {
3958
- // 假如已选中有该商品信息
3959
- if (history[item.uniProductId].skus.length) {
3960
- // 假如该商品下已经有被选中的sku时,则默认展开
3961
- Object.assign(item, {
3962
- rowExpandable: true
3963
- });
3964
- }
3965
- // item.skus.forEach((sku) => {
3966
- // history[item.uniProductId].skus.forEach((selectSku) => {
3967
- // if(sku.skuId === selectSku.skuId) {
3968
- // Object.assign(item, { rowExpandable: true })
3969
- // }
3970
- // })
3971
- // })
3972
- }
3973
-
3974
- mapList[item.uniProductId] = item;
3975
- });
3976
- result.data.data.data = mapList;
3977
- return _context6.abrupt("return", result.data.data);
3978
- case 12:
3979
- case "end":
3980
- return _context6.stop();
3981
- }
3982
- }, _callee6);
3983
- }));
3984
- function getGoods(_x21, _x22, _x23, _x24) {
3985
- return _getGoods.apply(this, arguments);
3986
- }
3987
- return getGoods;
3988
- }()
3989
- /**
3990
- * 批量导入
3991
- */
3992
- }, {
3993
- key: "batchImport",
3994
- value: function () {
3995
- var _batchImport = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(server, extraQuery, data, platShopList) {
3996
- var url, result;
3997
- return _regeneratorRuntime().wrap(function _callee7$(_context7) {
3998
- while (1) switch (_context7.prev = _context7.next) {
3999
- case 0:
4000
- url = "".concat(server, "/product-selector/2.0/batch/import?tenant=").concat(extraQuery);
4001
- _context7.next = 3;
4002
- return http.post(url, data);
4003
- case 3:
4004
- result = _context7.sent;
4005
- if (result.data.success) {
4006
- result.data.data.data.forEach(function (item) {
4007
- Object.assign(item, {
4008
- rowExpandable: Boolean(data['sku.outer_ids']),
4009
- checked: !data['sku.outer_ids']
4010
- });
4011
- item.skus.forEach(function (sku) {
4012
- Object.assign(sku, {
4013
- checked: Boolean(data['sku.outer_ids'])
4014
- });
4015
- });
4016
- platShopList.forEach(function (shop) {
4017
- if (item.shopId === shop.shopId) {
4018
- Object.assign(item, {
4019
- shopName: shop.shopName
4020
- });
4021
- }
4022
- });
4023
- });
4024
- }
4025
- return _context7.abrupt("return", result.data);
4026
- case 6:
4027
- case "end":
4028
- return _context7.stop();
4029
- }
4030
- }, _callee7);
4031
- }));
4032
- function batchImport(_x25, _x26, _x27, _x28) {
4033
- return _batchImport.apply(this, arguments);
4034
- }
4035
- return batchImport;
4036
- }()
4037
- /**
4038
- * 根据条件查询全部商品数据
4039
- */
4040
- }, {
4041
- key: "queryAllGoods",
4042
- value: function () {
4043
- var _queryAllGoods = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(server, extraQuery, data, limit, type, platShopList) {
4044
- var url, result, arr;
4045
- return _regeneratorRuntime().wrap(function _callee8$(_context8) {
4046
- while (1) switch (_context8.prev = _context8.next) {
4047
- case 0:
4048
- url = "".concat(server, "/product-selector/2.0/items/all?tenant=").concat(extraQuery, "&limit=").concat(limit);
4049
- _context8.next = 3;
4050
- return http.post(url, data);
4051
- case 3:
4052
- result = _context8.sent;
4053
- if (result.data.success) {
4054
- _context8.next = 7;
4055
- break;
4056
- }
4057
- result.data.data = [];
4058
- return _context8.abrupt("return", result.data);
4059
- case 7:
4060
- arr = [];
4061
- if (result.data.data.length) {
4062
- if (type === 'goods') {
4063
- result.data.data.forEach(function (item) {
4064
- platShopList.forEach(function (shop) {
4065
- if (item.shopId === shop.shopId) {
4066
- Object.assign(item, {
4067
- shopName: shop.shopName
4068
- });
4069
- }
4070
- });
4071
- Object.assign(item, {
4072
- rowExpandable: false
4073
- });
4074
- arr.push(item);
4075
- });
4076
- } else if (type === 'skus') {
4077
- result.data.data.forEach(function (item) {
4078
- if (item.skus.length) {
4079
- Object.assign(item, {
4080
- rowExpandable: true
4081
- });
4082
- arr.push(item);
4083
- }
4084
- });
4085
- }
4086
- }
4087
- result.data.data = arr;
4088
- return _context8.abrupt("return", result.data);
4089
- case 11:
4090
- case "end":
4091
- return _context8.stop();
4092
- }
4093
- }, _callee8);
4094
- }));
4095
- function queryAllGoods(_x29, _x30, _x31, _x32, _x33, _x34) {
4096
- return _queryAllGoods.apply(this, arguments);
4097
- }
4098
- return queryAllGoods;
4099
- }()
4100
- /**
4101
- * 查询用户已保存的查询条件
4102
- * @param {*} server 服务地址
4103
- * @param {*} extraQuery 租户信息
4104
- */
4105
- }, {
4106
- key: "conditionFindAll",
4107
- value: function () {
4108
- var _conditionFindAll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(server, extraQuery) {
4109
- var url, result;
4110
- return _regeneratorRuntime().wrap(function _callee9$(_context9) {
4111
- while (1) switch (_context9.prev = _context9.next) {
4112
- case 0:
4113
- url = "".concat(server, "/product-selector/2.0/condition/findAll?tenant=").concat(extraQuery);
4114
- _context9.next = 3;
4115
- return http.post(url, {});
4116
- case 3:
4117
- result = _context9.sent;
4118
- return _context9.abrupt("return", result.data);
4119
- case 5:
4120
- case "end":
4121
- return _context9.stop();
4122
- }
4123
- }, _callee9);
4124
- }));
4125
- function conditionFindAll(_x35, _x36) {
4126
- return _conditionFindAll.apply(this, arguments);
4127
- }
4128
- return conditionFindAll;
4129
- }()
4130
- /**
4131
- * 验证条件名称是否存在
4132
- * @param {*} server 服务地址
4133
- * @param {*} extraQuery 租户信息
4134
- * @param {*} name 条件名称
4135
- */
4136
- }, {
4137
- key: "validationConditionName",
4138
- value: function () {
4139
- var _validationConditionName = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(server, extraQuery, name) {
4140
- var url, result;
4141
- return _regeneratorRuntime().wrap(function _callee10$(_context10) {
4142
- while (1) switch (_context10.prev = _context10.next) {
4143
- case 0:
4144
- url = "".concat(server, "/product-selector/2.0/condition/name/check?tenant=").concat(extraQuery);
4145
- _context10.next = 3;
4146
- return http.post(url, {
4147
- conditionName: name
4148
- });
4149
- case 3:
4150
- result = _context10.sent;
4151
- return _context10.abrupt("return", result.data);
4152
- case 5:
4153
- case "end":
4154
- return _context10.stop();
4155
- }
4156
- }, _callee10);
4157
- }));
4158
- function validationConditionName(_x37, _x38, _x39) {
4159
- return _validationConditionName.apply(this, arguments);
4160
- }
4161
- return validationConditionName;
4162
- }()
4163
- /**
4164
- * 手动创建新的查询条件
4165
- * @param {*} server 服务地址
4166
- * @param {*} extraQuery 租户信息
4167
- * @param {*} data
4168
- */
4169
- }, {
4170
- key: "saveCondition",
4171
- value: function () {
4172
- var _saveCondition = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(server, extraQuery, data) {
4173
- var url, result;
4174
- return _regeneratorRuntime().wrap(function _callee11$(_context11) {
4175
- while (1) switch (_context11.prev = _context11.next) {
4176
- case 0:
4177
- url = "".concat(server, "/product-selector/2.0/condition/save/manual?tenant=").concat(extraQuery);
4178
- _context11.next = 3;
4179
- return http.post(url, data);
4180
- case 3:
4181
- result = _context11.sent;
4182
- return _context11.abrupt("return", result.data);
4183
- case 5:
4184
- case "end":
4185
- return _context11.stop();
4186
- }
4187
- }, _callee11);
4188
- }));
4189
- function saveCondition(_x40, _x41, _x42) {
4190
- return _saveCondition.apply(this, arguments);
4191
- }
4192
- return saveCondition;
4193
- }()
4194
- /**
4195
- * 删除已经保存的查询条件
4196
- * @param {*} server 服务地址
4197
- * @param {*} extraQuery 租户信息
4198
- * @param {*} id 条件id
4199
- * @returns
4200
- */
4201
- }, {
4202
- key: "deleteCondition",
4203
- value: function () {
4204
- var _deleteCondition = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(server, extraQuery, id) {
4205
- var url, result;
4206
- return _regeneratorRuntime().wrap(function _callee12$(_context12) {
4207
- while (1) switch (_context12.prev = _context12.next) {
4208
- case 0:
4209
- url = "".concat(server, "/product-selector/2.0/condition/delete?tenant=").concat(extraQuery);
4210
- _context12.next = 3;
4211
- return http.post(url, {
4212
- id: id
4213
- });
4214
- case 3:
4215
- result = _context12.sent;
4216
- return _context12.abrupt("return", result.data);
4217
- case 5:
4218
- case "end":
4219
- return _context12.stop();
4220
- }
4221
- }, _callee12);
4222
- }));
4223
- function deleteCondition(_x43, _x44, _x45) {
4224
- return _deleteCondition.apply(this, arguments);
4225
- }
4226
- return deleteCondition;
4227
- }()
4228
- /**
4229
- * 重命名条件名称
4230
- * @param {*} server 服务地址
4231
- * @param {*} extraQuery 租户信息
4232
- * @param {*} data
4233
- */
4234
- }, {
4235
- key: "renameCondition",
4236
- value: function () {
4237
- var _renameCondition = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(server, extraQuery, data) {
4238
- var url, result;
4239
- return _regeneratorRuntime().wrap(function _callee13$(_context13) {
4240
- while (1) switch (_context13.prev = _context13.next) {
4241
- case 0:
4242
- url = "".concat(server, "/product-selector/2.0/condition/rename?tenant=").concat(extraQuery);
4243
- _context13.next = 3;
4244
- return http.post(url, data);
4245
- case 3:
4246
- result = _context13.sent;
4247
- return _context13.abrupt("return", result.data);
4248
- case 5:
4249
- case "end":
4250
- return _context13.stop();
4251
- }
4252
- }, _callee13);
4253
- }));
4254
- function renameCondition(_x46, _x47, _x48) {
4255
- return _renameCondition.apply(this, arguments);
4256
- }
4257
- return renameCondition;
4258
- }()
4259
- /**
4260
- * 自动保存查用查询条件
4261
- * @param {*} server 服务地址
4262
- * @param {*} extraQuery 租户信息
4263
- * @param {*} data
4264
- */
4265
- }, {
4266
- key: "autoSaveCondition",
4267
- value: function () {
4268
- var _autoSaveCondition = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(server, extraQuery, data) {
4269
- var url, result;
4270
- return _regeneratorRuntime().wrap(function _callee14$(_context14) {
4271
- while (1) switch (_context14.prev = _context14.next) {
4272
- case 0:
4273
- url = "".concat(server, "/product-selector/2.0/condition/save/auto?tenant=").concat(extraQuery);
4274
- _context14.next = 3;
4275
- return http.post(url, data);
4276
- case 3:
4277
- result = _context14.sent;
4278
- return _context14.abrupt("return", result.data);
4279
- case 5:
4280
- case "end":
4281
- return _context14.stop();
4282
- }
4283
- }, _callee14);
4284
- }));
4285
- function autoSaveCondition(_x49, _x50, _x51) {
4286
- return _autoSaveCondition.apply(this, arguments);
4287
- }
4288
- return autoSaveCondition;
4289
- }()
4290
- /**
4291
- * 用户已存储条件总条数
4292
- * @param {*} server
4293
- * @param {*} extraQuery
4294
- */
4295
- }, {
4296
- key: "findConditionCount",
4297
- value: function () {
4298
- var _findConditionCount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(server, extraQuery) {
4299
- var url, result;
4300
- return _regeneratorRuntime().wrap(function _callee15$(_context15) {
4301
- while (1) switch (_context15.prev = _context15.next) {
4302
- case 0:
4303
- url = "".concat(server, "/product-selector/2.0/condition/count?tenant=").concat(extraQuery);
4304
- _context15.next = 3;
4305
- return http.post(url, {});
4306
- case 3:
4307
- result = _context15.sent;
4308
- return _context15.abrupt("return", result.data);
4309
- case 5:
4310
- case "end":
4311
- return _context15.stop();
4312
- }
4313
- }, _callee15);
4314
- }));
4315
- function findConditionCount(_x52, _x53) {
4316
- return _findConditionCount.apply(this, arguments);
4317
- }
4318
- return findConditionCount;
4319
- }()
4320
- /**
4321
- * 根据平台code,店铺ID获取购物金类目ID
4322
- * @param {*} server
4323
- * @param {*} extraQuery
4324
- * @param {*} data
4325
- */
4326
- }, {
4327
- key: "getShoppingGold",
4328
- value: function () {
4329
- var _getShoppingGold = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(server, extraQuery, data) {
4330
- var url;
4331
- return _regeneratorRuntime().wrap(function _callee16$(_context16) {
4332
- while (1) switch (_context16.prev = _context16.next) {
4333
- case 0:
4334
- url = "".concat(server, "/product-selector/2.0/cate/std_cate_card?tenant=").concat(extraQuery);
4335
- return _context16.abrupt("return", http.post(url, data));
4336
- case 2:
4337
- case "end":
4338
- return _context16.stop();
4339
- }
4340
- }, _callee16);
4341
- }));
4342
- function getShoppingGold(_x54, _x55, _x56) {
4343
- return _getShoppingGold.apply(this, arguments);
4344
- }
4345
- return getShoppingGold;
4346
- }()
4347
- }]);
4348
- return Store;
4349
- }();
4350
- var Store$1 = new Store();
4351
-
4352
3720
  var shuyunUtils = createCommonjsModule(function (module, exports) {
4353
3721
  (function () {var b={};function p(o){return (p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(o)}var c=function(o,t){return JSON.stringify(o)===JSON.stringify(t)};var q=function(o,t){var e=-1;return o.some(function(o,r){return c(o,t)&&(e=r),c(o,t)}),e};var u=function(o){return JSON.parse(JSON.stringify(o))};var v=function(o){var t=!0;for(var e in o)o.hasOwnProperty(e)&&(t=!1);return t};var d=function(o){return {"[object String]":"string","[object Boolean]":"boolean","[object Undefined]":"undefined","[object Number]":"number","[object Object]":"object","[object Error]":"error","[object Function]":"function","[object Date]":"date","[object Array]":"array","[object RegExp]":"regexp","[object Null]":"null","[object NodeList]":"nodeList","[object Arguments]":"arguments","[object Window]":"window","[object HTMLDocument]":"document"}[Object.prototype.toString.call(o)]||(o instanceof Element?"element":"")};var w=function(o){return "string"==typeof o?o.trim():Object.keys(o).reduce(function(t,e){var r=o[e];return "undefined"===d(r)||"null"===d(r)?t:(t[e]=r,t)},{})};var x=function(o){var t="";for(var e in o){var r=o[e];r="object"===p(r)?JSON.stringify(r):r,t="".concat(t,"&").concat(e,"=").concat(r);}return t.replace("&","")};function f(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})),t.push.apply(t,o);}return t}function g(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?f(Object(t),!0).forEach(function(e){h(r,e,t[e]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e));});}return r}function h(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function y(r,e){return C(r)||B(r,e)||A(r,e)||z()}function z(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function A(r,e){if(r){if("string"==typeof r)return j(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);return "Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?j(r,e):void 0}}function j(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,o=new Array(e);t<e;t++)o[t]=r[t];return o}function B(r,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(r)){var t=[],o=!0,n=!1,a=void 0;try{for(var $,s=r[Symbol.iterator]();!(o=($=s.next()).done)&&(t.push($.value),!e||t.length!==e);o=!0);}catch(i){n=!0,a=i;}finally{try{o||null==s.return||s.return();}finally{if(n)throw a}}return t}}function C(r){if(Array.isArray(r))return r}var D=function(r){return r.replace(/-\w/g,function(r){return r.split("-")[1].toUpperCase()})};var E=function(r){return r.replace(/([A-Z])/g,"-$1").toLowerCase()};var F=function(r){return r.replace(/^\?/,"").split("&").reduce(function(r,e){var t=y(e.split("="),2),o=t[0],n=t[1],a=void 0===n?"":n;return g(g({},r),{},h({},o,a))},{})};var k=function(e,t,r,n){var o={percentile:{digits:100,sign:"%"},thousands:{digits:1e3,sign:"\u2030"}}[e],s=Math.pow(10,r),$=parseInt(t*o.digits*s,10)/s;return n?Number($).toFixed(r)+o.sign:$+o.sign},G=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return k("percentile",e,t,r)};var H=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return k("thousands",e,t,r)};var I=function(e){var t=document.createElement("input");t.style.cssText="position:absolute;top:0;z-index: -999;",t.value=e,document.body.appendChild(t),t.select();var o=document.execCommand("copy");return t.remove(),o};var J=function(e){var t=document.createElement("div");t.style.display="inline-block",t.style.opacity="0",t.innerText=e,document.body.appendChild(t);var o=window.getComputedStyle(t).width;return document.body.removeChild(t),parseInt(o,10)};var K=function(t,e){var o=Blob.prototype,n=null;if(Object.getPrototypeOf(t)===o&&(n=t),t.data&&Object.getPrototypeOf(t.data)===o&&(n=t.data),!n||Object.getPrototypeOf(n)!==o)return !1;var r=document.createElement("a");r.addEventListener("click",function(){r.download=e,r.href=Window.URL.createObjectURL(n);});var a=document.createEvent("MouseEvents");return a.initEvent("click",!1,!1),r.dispatchEvent(a),!0};function L(t){return (L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function M(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var r=0;r<e.length;r++){var a=e[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a);}}function N(t,e,r){return e&&l(t.prototype,e),r&&l(t,r),t}var O=function(){function t(e){switch(M(this,t),L(e)){case"number":if(13===e.toString().length)return void this.parseDate(new Date(e));this.parseStr(e.toString());break;case"string":this.parseStr(e);break;case"object":this.parseDate(e.constructor===Date?e:new Date);break;default:this.parseDate(new Date);}}return N(t,[{key:"parseStr",value:function(t){var e=t.replace(/\D/g,""),r={fullYear_str:e.substr(0,4),year_str:e.substr(2,4),month_str:e.substr(4,2),date_str:e.substr(6,2),hour_str:e.substr(8,2),minute_str:e.substr(10,2),second_str:e.substr(12,2)};if(r.fullYear_str&&r.month_str&&r.date_str){var a="".concat(r.fullYear_str,"/").concat(r.month_str,"/").concat(r.date_str," ").concat(r.hour_str||"00",":").concat(r.minute_str||"00",":").concat(r.second_str||"00");this.parseDate(new Date(a));}else this.parseDate(new Date);}},{key:"parseDate",value:function(t){this.fullYear=t.getFullYear(),this.year=parseInt(t.getFullYear().toString().substr(2,2)),this.month=t.getMonth()+1,this.date=t.getDate(),this.hour=t.getHours(),this.minute=t.getMinutes(),this.second=t.getSeconds(),this.day=t.getDay();}},{key:"format",value:function(t){return t.replace(/YYYY/i,this.fullYear).replace(/YY/i,this.year<10?"0".concat(this.year):this.year).replace(/MM/,this.month<10?"0".concat(this.month):this.month).replace(/DD/i,this.date<10?"0".concat(this.date):this.date).replace(/HH/i,this.hour<10?"0".concat(this.hour):this.hour).replace(/mm/,this.minute<10?"0".concat(this.minute):this.minute).replace(/ss/i,this.second<10?"0".concat(this.second):this.second)}}]),t}(),P=function(t){return new O(t)};var m={copyText:I,getTextWidth:J,moment:P,equal:c,index:q,clone:u,isEmpty:v,type:d,trim:w,toQueryString:x,toHump:D,toHyphen:E,toFormData:F,toPercentile:G,toThousands:H,download:K};b.default=m,b=m;{module.exports=b;}})();
4354
3722
  });
@@ -4451,6 +3819,20 @@
4451
3819
  return obj;
4452
3820
  }
4453
3821
 
3822
+ /**
3823
+ * 过滤对象中空属性
3824
+ * @param {*} obj
3825
+ * @returns
3826
+ */
3827
+ function filterNullValueObject(obj) {
3828
+ for (var i in obj) {
3829
+ if (obj[i] === '' || obj[i] === null || obj[i] === 'null') {
3830
+ delete obj[i];
3831
+ }
3832
+ }
3833
+ return obj;
3834
+ }
3835
+
4454
3836
  /**
4455
3837
  * 数组去重
4456
3838
  */
@@ -4894,7 +4276,6 @@
4894
4276
  value: array
4895
4277
  };
4896
4278
  array.forEach(function (item) {
4897
- var _semantic$value, _semantic$value2;
4898
4279
  var operator = item.operator,
4899
4280
  fieldName = item.fieldName,
4900
4281
  field = item.field,
@@ -4926,8 +4307,14 @@
4926
4307
  OR: '或',
4927
4308
  AND: '和'
4928
4309
  }[item.multiText] || ',';
4929
- obj.str.push("".concat(fieldName, "\uFF1A").concat(operatorName).concat((_semantic$value = semantic.value) === null || _semantic$value === void 0 ? void 0 : _semantic$value.join(connectSymbol)));
4930
- obj.title.push("".concat(fieldName, "\uFF1A").concat(operatorName).concat((_semantic$value2 = semantic.value) === null || _semantic$value2 === void 0 ? void 0 : _semantic$value2.join(connectSymbol)));
4310
+ if (item.multiText) {
4311
+ var _semantic$value, _semantic$value2;
4312
+ obj.str.push("".concat(fieldName, "\uFF1A").concat(operatorName).concat(semantic === null || semantic === void 0 ? void 0 : (_semantic$value = semantic.value) === null || _semantic$value === void 0 ? void 0 : _semantic$value.join(connectSymbol)));
4313
+ obj.title.push("".concat(fieldName, "\uFF1A").concat(operatorName).concat(semantic === null || semantic === void 0 ? void 0 : (_semantic$value2 = semantic.value) === null || _semantic$value2 === void 0 ? void 0 : _semantic$value2.join(connectSymbol)));
4314
+ } else {
4315
+ obj.str.push("".concat(fieldName, "\uFF1A").concat(operatorName).concat(semantic === null || semantic === void 0 ? void 0 : semantic.join(connectSymbol)));
4316
+ obj.title.push("".concat(fieldName, "\uFF1A").concat(operatorName).concat(semantic === null || semantic === void 0 ? void 0 : semantic.join(connectSymbol)));
4317
+ }
4931
4318
  break;
4932
4319
  default:
4933
4320
  if ([PROD_PRODUCT_ID, PROD_OUTER_ID, SKU_SKU_ID, SKU_OUTER_ID].includes(field) && operator === OPERATOR_STACKS.EQ) {
@@ -4983,6 +4370,638 @@
4983
4370
  return len;
4984
4371
  }
4985
4372
 
4373
+ var Store = /*#__PURE__*/function () {
4374
+ function Store() {
4375
+ _classCallCheck(this, Store);
4376
+ this.queryCondition = [];
4377
+ this.originCondition = [];
4378
+ this.settingQuery = [];
4379
+ }
4380
+ _createClass(Store, [{
4381
+ key: "getGoodsCategory",
4382
+ value:
4383
+ /**
4384
+ * 查询标准类目
4385
+ */
4386
+ function () {
4387
+ var _getGoodsCategory = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(server, extraQuery, platCode) {
4388
+ var url;
4389
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
4390
+ while (1) switch (_context.prev = _context.next) {
4391
+ case 0:
4392
+ url = "".concat(server, "/product-selector/2.0/cate/std_cate?tenant=").concat(extraQuery);
4393
+ return _context.abrupt("return", http.post(url, platCode));
4394
+ case 2:
4395
+ case "end":
4396
+ return _context.stop();
4397
+ }
4398
+ }, _callee);
4399
+ }));
4400
+ function getGoodsCategory(_x, _x2, _x3) {
4401
+ return _getGoodsCategory.apply(this, arguments);
4402
+ }
4403
+ return getGoodsCategory;
4404
+ }()
4405
+ /**
4406
+ * 埋点
4407
+ */
4408
+ }, {
4409
+ key: "bury",
4410
+ value: function bury(server, param) {
4411
+ var url = "".concat(server, "/product-selector/2.0/statistic/tenant/use");
4412
+ return http.post(url, param);
4413
+ }
4414
+
4415
+ /**
4416
+ * 查询店铺自定义类目
4417
+ */
4418
+ }, {
4419
+ key: "getGoodsDefaultCategory",
4420
+ value: function () {
4421
+ var _getGoodsDefaultCategory = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(server, extraQuery, platCode) {
4422
+ var url;
4423
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
4424
+ while (1) switch (_context2.prev = _context2.next) {
4425
+ case 0:
4426
+ url = "".concat(server, "/product-selector/2.0/cate/user_defined_cate?tenant=").concat(extraQuery);
4427
+ return _context2.abrupt("return", http.post(url, platCode));
4428
+ case 2:
4429
+ case "end":
4430
+ return _context2.stop();
4431
+ }
4432
+ }, _callee2);
4433
+ }));
4434
+ function getGoodsDefaultCategory(_x4, _x5, _x6) {
4435
+ return _getGoodsDefaultCategory.apply(this, arguments);
4436
+ }
4437
+ return getGoodsDefaultCategory;
4438
+ }()
4439
+ }, {
4440
+ key: "configBizzKey",
4441
+ value: function configBizzKey(bizzKey, supportSku, _url) {
4442
+ if (bizzKey) {
4443
+ return "".concat(_url, "&bizzKey=").concat(bizzKey);
4444
+ }
4445
+ return supportSku ? "".concat(_url, "&bizzKey=10001") : _url;
4446
+ }
4447
+
4448
+ /**
4449
+ * 全部商品条件保存
4450
+ * @param {*} server
4451
+ * @param {*} extraQuery
4452
+ * @returns
4453
+ */
4454
+ }, {
4455
+ key: "saveQueryCondition",
4456
+ value: function () {
4457
+ var _saveQueryCondition = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(server, extraQuery, params, bizzKey, supportSku) {
4458
+ var _url, url;
4459
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
4460
+ while (1) switch (_context3.prev = _context3.next) {
4461
+ case 0:
4462
+ _url = "".concat(server, "/product-selector/2.0/custom/saveUserCustom?tenant=").concat(extraQuery);
4463
+ url = this.configBizzKey(bizzKey, supportSku, _url);
4464
+ return _context3.abrupt("return", http.post(url, params));
4465
+ case 3:
4466
+ case "end":
4467
+ return _context3.stop();
4468
+ }
4469
+ }, _callee3, this);
4470
+ }));
4471
+ function saveQueryCondition(_x7, _x8, _x9, _x10, _x11) {
4472
+ return _saveQueryCondition.apply(this, arguments);
4473
+ }
4474
+ return saveQueryCondition;
4475
+ }()
4476
+ /**
4477
+ * 全部商品条件查询
4478
+ */
4479
+ }, {
4480
+ key: "fetchAllquery",
4481
+ value: function () {
4482
+ var _fetchAllquery = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(supportSku, server, extraQuery, supportTags, bizzKey) {
4483
+ var _url, url, list, _queryCondition;
4484
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
4485
+ while (1) switch (_context4.prev = _context4.next) {
4486
+ case 0:
4487
+ _url = "".concat(server, "/product-selector/2.0/custom/getCustom?tenant=").concat(extraQuery);
4488
+ url = this.configBizzKey(bizzKey, supportSku, _url);
4489
+ _context4.next = 4;
4490
+ return http.get(url);
4491
+ case 4:
4492
+ list = _context4.sent;
4493
+ _queryCondition = list.data.data;
4494
+ this.originCondition = list.data.data;
4495
+ if (!supportSku) {
4496
+ _queryCondition = _queryCondition.filter(function (item) {
4497
+ return ['sku_sku_id', 'sku_specification', 'sku_outer_id', 'sku_flag'].includes(item.itemId) === false;
4498
+ });
4499
+ }
4500
+ if (!supportTags) {
4501
+ _queryCondition = _queryCondition.filter(function (item) {
4502
+ return !item.groupName;
4503
+ });
4504
+ }
4505
+ this.queryCondition = _queryCondition.map(function (el) {
4506
+ return _objectSpread2(_objectSpread2({}, el), {}, {
4507
+ value: el.itemId,
4508
+ label: el.itemName,
4509
+ status: el.status === 3 ? 4 : el.status
4510
+ });
4511
+ });
4512
+ return _context4.abrupt("return", this.queryCondition);
4513
+ case 11:
4514
+ case "end":
4515
+ return _context4.stop();
4516
+ }
4517
+ }, _callee4, this);
4518
+ }));
4519
+ function fetchAllquery(_x12, _x13, _x14, _x15, _x16) {
4520
+ return _fetchAllquery.apply(this, arguments);
4521
+ }
4522
+ return fetchAllquery;
4523
+ }()
4524
+ /**
4525
+ * 设置查询条件查询
4526
+ * @returns
4527
+ */
4528
+ }, {
4529
+ key: "fetchSettingQuery",
4530
+ value: function () {
4531
+ var _fetchSettingQuery = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(supportSku, server, extraQuery, supportTags) {
4532
+ var url, list, settingList;
4533
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
4534
+ while (1) switch (_context5.prev = _context5.next) {
4535
+ case 0:
4536
+ url = "".concat(server, "/product-selector/2.0/condition/setting?tenant=").concat(extraQuery);
4537
+ _context5.next = 3;
4538
+ return http.get(url);
4539
+ case 3:
4540
+ list = _context5.sent;
4541
+ settingList = list.data.data;
4542
+ if (!supportTags) {
4543
+ settingList = list.data.data.filter(function (item) {
4544
+ return !item.groupName;
4545
+ });
4546
+ }
4547
+ this.settingQuery = settingList;
4548
+ return _context5.abrupt("return", this.settingQuery || []);
4549
+ case 8:
4550
+ case "end":
4551
+ return _context5.stop();
4552
+ }
4553
+ }, _callee5, this);
4554
+ }));
4555
+ function fetchSettingQuery(_x17, _x18, _x19, _x20) {
4556
+ return _fetchSettingQuery.apply(this, arguments);
4557
+ }
4558
+ return fetchSettingQuery;
4559
+ }()
4560
+ /**
4561
+ * 根据条件查询商品
4562
+ * @param {*} server 服务地址
4563
+ * @param {*} extraQuery 租户信息
4564
+ * @param {*} query 查询条件
4565
+ * @param {*} platShopList 平台&店铺列表
4566
+ * @param {*} history 需要标记为默认选中状态的商品数组(空对象)
4567
+ */
4568
+ }, {
4569
+ key: "getGoods",
4570
+ value: function () {
4571
+ var _getGoods = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(server, extraQuery, query, platShopList) {
4572
+ var history,
4573
+ url,
4574
+ result,
4575
+ mapList,
4576
+ _args6 = arguments;
4577
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
4578
+ while (1) switch (_context6.prev = _context6.next) {
4579
+ case 0:
4580
+ history = _args6.length > 4 && _args6[4] !== undefined ? _args6[4] : {};
4581
+ url = "".concat(server, "/product-selector/2.0/items/base?tenant=").concat(extraQuery, "&pageNo=").concat(query.page.pageNo, "&pageSize=").concat(query.page.pageSize);
4582
+ _context6.next = 4;
4583
+ return http.post(url, query.parameter);
4584
+ case 4:
4585
+ result = _context6.sent;
4586
+ if (result.data.success) {
4587
+ _context6.next = 8;
4588
+ break;
4589
+ }
4590
+ cloudReact.Message.error('服务出错');
4591
+ return _context6.abrupt("return", {
4592
+ data: {},
4593
+ pageNum: query.page.pageNo,
4594
+ pageSize: query.page.pageSize,
4595
+ total: 0
4596
+ });
4597
+ case 8:
4598
+ mapList = {};
4599
+ result.data.data.data.forEach(function (item) {
4600
+ Object.assign(item, {
4601
+ rowExpandable: false
4602
+ }); // 默认添加一个收起状态
4603
+ platShopList.forEach(function (shop) {
4604
+ if (item.shopId === shop.shopId) {
4605
+ Object.assign(item, {
4606
+ shopName: shop.shopName
4607
+ });
4608
+ }
4609
+ });
4610
+ if (history[item.uniProductId]) {
4611
+ // 假如已选中有该商品信息
4612
+ if (history[item.uniProductId].skus.length) {
4613
+ // 假如该商品下已经有被选中的sku时,则默认展开
4614
+ Object.assign(item, {
4615
+ rowExpandable: true
4616
+ });
4617
+ }
4618
+ // item.skus.forEach((sku) => {
4619
+ // history[item.uniProductId].skus.forEach((selectSku) => {
4620
+ // if(sku.skuId === selectSku.skuId) {
4621
+ // Object.assign(item, { rowExpandable: true })
4622
+ // }
4623
+ // })
4624
+ // })
4625
+ }
4626
+
4627
+ mapList[item.uniProductId] = item;
4628
+ });
4629
+ result.data.data.data = mapList;
4630
+ return _context6.abrupt("return", result.data.data);
4631
+ case 12:
4632
+ case "end":
4633
+ return _context6.stop();
4634
+ }
4635
+ }, _callee6);
4636
+ }));
4637
+ function getGoods(_x21, _x22, _x23, _x24) {
4638
+ return _getGoods.apply(this, arguments);
4639
+ }
4640
+ return getGoods;
4641
+ }()
4642
+ /**
4643
+ * 批量导入
4644
+ */
4645
+ }, {
4646
+ key: "batchImport",
4647
+ value: function () {
4648
+ var _batchImport = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(server, extraQuery, data, platShopList) {
4649
+ var url, result;
4650
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
4651
+ while (1) switch (_context7.prev = _context7.next) {
4652
+ case 0:
4653
+ url = "".concat(server, "/product-selector/2.0/batch/import?tenant=").concat(extraQuery);
4654
+ _context7.next = 3;
4655
+ return http.post(url, filterNullValueObject(data));
4656
+ case 3:
4657
+ result = _context7.sent;
4658
+ if (result.data.success) {
4659
+ result.data.data.data.forEach(function (item) {
4660
+ Object.assign(item, {
4661
+ rowExpandable: Boolean(data['sku.outer_ids']),
4662
+ checked: !data['sku.outer_ids']
4663
+ });
4664
+ item.skus.forEach(function (sku) {
4665
+ Object.assign(sku, {
4666
+ checked: Boolean(data['sku.outer_ids'])
4667
+ });
4668
+ });
4669
+ platShopList.forEach(function (shop) {
4670
+ if (item.shopId === shop.shopId) {
4671
+ Object.assign(item, {
4672
+ shopName: shop.shopName
4673
+ });
4674
+ }
4675
+ });
4676
+ });
4677
+ }
4678
+ return _context7.abrupt("return", result.data);
4679
+ case 6:
4680
+ case "end":
4681
+ return _context7.stop();
4682
+ }
4683
+ }, _callee7);
4684
+ }));
4685
+ function batchImport(_x25, _x26, _x27, _x28) {
4686
+ return _batchImport.apply(this, arguments);
4687
+ }
4688
+ return batchImport;
4689
+ }()
4690
+ /**
4691
+ * 根据条件查询全部商品数据
4692
+ */
4693
+ }, {
4694
+ key: "queryAllGoods",
4695
+ value: function () {
4696
+ var _queryAllGoods = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(server, extraQuery, data, limit, type, platShopList) {
4697
+ var url, result, arr;
4698
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
4699
+ while (1) switch (_context8.prev = _context8.next) {
4700
+ case 0:
4701
+ url = "".concat(server, "/product-selector/2.0/items/all?tenant=").concat(extraQuery, "&limit=").concat(limit);
4702
+ _context8.next = 3;
4703
+ return http.post(url, data);
4704
+ case 3:
4705
+ result = _context8.sent;
4706
+ if (result.data.success) {
4707
+ _context8.next = 7;
4708
+ break;
4709
+ }
4710
+ result.data.data = [];
4711
+ return _context8.abrupt("return", result.data);
4712
+ case 7:
4713
+ arr = [];
4714
+ if (result.data.data.length) {
4715
+ if (type === 'goods') {
4716
+ result.data.data.forEach(function (item) {
4717
+ platShopList.forEach(function (shop) {
4718
+ if (item.shopId === shop.shopId) {
4719
+ Object.assign(item, {
4720
+ shopName: shop.shopName
4721
+ });
4722
+ }
4723
+ });
4724
+ Object.assign(item, {
4725
+ rowExpandable: false
4726
+ });
4727
+ arr.push(item);
4728
+ });
4729
+ } else if (type === 'skus') {
4730
+ result.data.data.forEach(function (item) {
4731
+ if (item.skus.length) {
4732
+ Object.assign(item, {
4733
+ rowExpandable: true
4734
+ });
4735
+ arr.push(item);
4736
+ }
4737
+ });
4738
+ }
4739
+ }
4740
+ result.data.data = arr;
4741
+ return _context8.abrupt("return", result.data);
4742
+ case 11:
4743
+ case "end":
4744
+ return _context8.stop();
4745
+ }
4746
+ }, _callee8);
4747
+ }));
4748
+ function queryAllGoods(_x29, _x30, _x31, _x32, _x33, _x34) {
4749
+ return _queryAllGoods.apply(this, arguments);
4750
+ }
4751
+ return queryAllGoods;
4752
+ }()
4753
+ /**
4754
+ * 查询用户已保存的查询条件
4755
+ * @param {*} server 服务地址
4756
+ * @param {*} extraQuery 租户信息
4757
+ */
4758
+ }, {
4759
+ key: "conditionFindAll",
4760
+ value: function () {
4761
+ var _conditionFindAll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(server, extraQuery) {
4762
+ var url, result;
4763
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
4764
+ while (1) switch (_context9.prev = _context9.next) {
4765
+ case 0:
4766
+ url = "".concat(server, "/product-selector/2.0/condition/findAll?tenant=").concat(extraQuery);
4767
+ _context9.next = 3;
4768
+ return http.post(url, {});
4769
+ case 3:
4770
+ result = _context9.sent;
4771
+ return _context9.abrupt("return", result.data);
4772
+ case 5:
4773
+ case "end":
4774
+ return _context9.stop();
4775
+ }
4776
+ }, _callee9);
4777
+ }));
4778
+ function conditionFindAll(_x35, _x36) {
4779
+ return _conditionFindAll.apply(this, arguments);
4780
+ }
4781
+ return conditionFindAll;
4782
+ }()
4783
+ /**
4784
+ * 验证条件名称是否存在
4785
+ * @param {*} server 服务地址
4786
+ * @param {*} extraQuery 租户信息
4787
+ * @param {*} name 条件名称
4788
+ */
4789
+ }, {
4790
+ key: "validationConditionName",
4791
+ value: function () {
4792
+ var _validationConditionName = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(server, extraQuery, name) {
4793
+ var url, result;
4794
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
4795
+ while (1) switch (_context10.prev = _context10.next) {
4796
+ case 0:
4797
+ url = "".concat(server, "/product-selector/2.0/condition/name/check?tenant=").concat(extraQuery);
4798
+ _context10.next = 3;
4799
+ return http.post(url, {
4800
+ conditionName: name
4801
+ });
4802
+ case 3:
4803
+ result = _context10.sent;
4804
+ return _context10.abrupt("return", result.data);
4805
+ case 5:
4806
+ case "end":
4807
+ return _context10.stop();
4808
+ }
4809
+ }, _callee10);
4810
+ }));
4811
+ function validationConditionName(_x37, _x38, _x39) {
4812
+ return _validationConditionName.apply(this, arguments);
4813
+ }
4814
+ return validationConditionName;
4815
+ }()
4816
+ /**
4817
+ * 手动创建新的查询条件
4818
+ * @param {*} server 服务地址
4819
+ * @param {*} extraQuery 租户信息
4820
+ * @param {*} data
4821
+ */
4822
+ }, {
4823
+ key: "saveCondition",
4824
+ value: function () {
4825
+ var _saveCondition = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(server, extraQuery, data) {
4826
+ var url, result;
4827
+ return _regeneratorRuntime().wrap(function _callee11$(_context11) {
4828
+ while (1) switch (_context11.prev = _context11.next) {
4829
+ case 0:
4830
+ url = "".concat(server, "/product-selector/2.0/condition/save/manual?tenant=").concat(extraQuery);
4831
+ _context11.next = 3;
4832
+ return http.post(url, data);
4833
+ case 3:
4834
+ result = _context11.sent;
4835
+ return _context11.abrupt("return", result.data);
4836
+ case 5:
4837
+ case "end":
4838
+ return _context11.stop();
4839
+ }
4840
+ }, _callee11);
4841
+ }));
4842
+ function saveCondition(_x40, _x41, _x42) {
4843
+ return _saveCondition.apply(this, arguments);
4844
+ }
4845
+ return saveCondition;
4846
+ }()
4847
+ /**
4848
+ * 删除已经保存的查询条件
4849
+ * @param {*} server 服务地址
4850
+ * @param {*} extraQuery 租户信息
4851
+ * @param {*} id 条件id
4852
+ * @returns
4853
+ */
4854
+ }, {
4855
+ key: "deleteCondition",
4856
+ value: function () {
4857
+ var _deleteCondition = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(server, extraQuery, id) {
4858
+ var url, result;
4859
+ return _regeneratorRuntime().wrap(function _callee12$(_context12) {
4860
+ while (1) switch (_context12.prev = _context12.next) {
4861
+ case 0:
4862
+ url = "".concat(server, "/product-selector/2.0/condition/delete?tenant=").concat(extraQuery);
4863
+ _context12.next = 3;
4864
+ return http.post(url, {
4865
+ id: id
4866
+ });
4867
+ case 3:
4868
+ result = _context12.sent;
4869
+ return _context12.abrupt("return", result.data);
4870
+ case 5:
4871
+ case "end":
4872
+ return _context12.stop();
4873
+ }
4874
+ }, _callee12);
4875
+ }));
4876
+ function deleteCondition(_x43, _x44, _x45) {
4877
+ return _deleteCondition.apply(this, arguments);
4878
+ }
4879
+ return deleteCondition;
4880
+ }()
4881
+ /**
4882
+ * 重命名条件名称
4883
+ * @param {*} server 服务地址
4884
+ * @param {*} extraQuery 租户信息
4885
+ * @param {*} data
4886
+ */
4887
+ }, {
4888
+ key: "renameCondition",
4889
+ value: function () {
4890
+ var _renameCondition = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(server, extraQuery, data) {
4891
+ var url, result;
4892
+ return _regeneratorRuntime().wrap(function _callee13$(_context13) {
4893
+ while (1) switch (_context13.prev = _context13.next) {
4894
+ case 0:
4895
+ url = "".concat(server, "/product-selector/2.0/condition/rename?tenant=").concat(extraQuery);
4896
+ _context13.next = 3;
4897
+ return http.post(url, data);
4898
+ case 3:
4899
+ result = _context13.sent;
4900
+ return _context13.abrupt("return", result.data);
4901
+ case 5:
4902
+ case "end":
4903
+ return _context13.stop();
4904
+ }
4905
+ }, _callee13);
4906
+ }));
4907
+ function renameCondition(_x46, _x47, _x48) {
4908
+ return _renameCondition.apply(this, arguments);
4909
+ }
4910
+ return renameCondition;
4911
+ }()
4912
+ /**
4913
+ * 自动保存查用查询条件
4914
+ * @param {*} server 服务地址
4915
+ * @param {*} extraQuery 租户信息
4916
+ * @param {*} data
4917
+ */
4918
+ }, {
4919
+ key: "autoSaveCondition",
4920
+ value: function () {
4921
+ var _autoSaveCondition = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(server, extraQuery, data) {
4922
+ var url, result;
4923
+ return _regeneratorRuntime().wrap(function _callee14$(_context14) {
4924
+ while (1) switch (_context14.prev = _context14.next) {
4925
+ case 0:
4926
+ url = "".concat(server, "/product-selector/2.0/condition/save/auto?tenant=").concat(extraQuery);
4927
+ _context14.next = 3;
4928
+ return http.post(url, data);
4929
+ case 3:
4930
+ result = _context14.sent;
4931
+ return _context14.abrupt("return", result.data);
4932
+ case 5:
4933
+ case "end":
4934
+ return _context14.stop();
4935
+ }
4936
+ }, _callee14);
4937
+ }));
4938
+ function autoSaveCondition(_x49, _x50, _x51) {
4939
+ return _autoSaveCondition.apply(this, arguments);
4940
+ }
4941
+ return autoSaveCondition;
4942
+ }()
4943
+ /**
4944
+ * 用户已存储条件总条数
4945
+ * @param {*} server
4946
+ * @param {*} extraQuery
4947
+ */
4948
+ }, {
4949
+ key: "findConditionCount",
4950
+ value: function () {
4951
+ var _findConditionCount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(server, extraQuery) {
4952
+ var url, result;
4953
+ return _regeneratorRuntime().wrap(function _callee15$(_context15) {
4954
+ while (1) switch (_context15.prev = _context15.next) {
4955
+ case 0:
4956
+ url = "".concat(server, "/product-selector/2.0/condition/count?tenant=").concat(extraQuery);
4957
+ _context15.next = 3;
4958
+ return http.post(url, {});
4959
+ case 3:
4960
+ result = _context15.sent;
4961
+ return _context15.abrupt("return", result.data);
4962
+ case 5:
4963
+ case "end":
4964
+ return _context15.stop();
4965
+ }
4966
+ }, _callee15);
4967
+ }));
4968
+ function findConditionCount(_x52, _x53) {
4969
+ return _findConditionCount.apply(this, arguments);
4970
+ }
4971
+ return findConditionCount;
4972
+ }()
4973
+ /**
4974
+ * 根据平台code,店铺ID获取购物金类目ID
4975
+ * @param {*} server
4976
+ * @param {*} extraQuery
4977
+ * @param {*} data
4978
+ */
4979
+ }, {
4980
+ key: "getShoppingGold",
4981
+ value: function () {
4982
+ var _getShoppingGold = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(server, extraQuery, data) {
4983
+ var url;
4984
+ return _regeneratorRuntime().wrap(function _callee16$(_context16) {
4985
+ while (1) switch (_context16.prev = _context16.next) {
4986
+ case 0:
4987
+ url = "".concat(server, "/product-selector/2.0/cate/std_cate_card?tenant=").concat(extraQuery);
4988
+ return _context16.abrupt("return", http.post(url, data));
4989
+ case 2:
4990
+ case "end":
4991
+ return _context16.stop();
4992
+ }
4993
+ }, _callee16);
4994
+ }));
4995
+ function getShoppingGold(_x54, _x55, _x56) {
4996
+ return _getShoppingGold.apply(this, arguments);
4997
+ }
4998
+ return getShoppingGold;
4999
+ }()
5000
+ }]);
5001
+ return Store;
5002
+ }();
5003
+ var Store$1 = new Store();
5004
+
4986
5005
  /**
4987
5006
  * 全部商品查询条件
4988
5007
  * @param {*} platShopList 平台&店铺列表
@@ -43665,6 +43684,824 @@
43665
43684
  visible: false
43666
43685
  };
43667
43686
 
43687
+ /**
43688
+ * 此文件记录一些通用 & 默认配置项
43689
+ */
43690
+ var DEFAULT_TABLE_SKU_ROW = ['productName', 'productId', 'outerId', 'price', 'stock', 'onlineTime', 'status', 'platName', 'shopName', 'showCategoryName', 'showSellerCategoryName', 'skuTotal', 'sku'];
43691
+ var DEFAULT_TABLE_ROW$1 = ['productName', 'productId', 'outerId', 'price', 'stock', 'onlineTime', 'status', 'platName', 'shopName', 'showCategoryName', 'showSellerCategoryName'];
43692
+ var IS_STANDARD_CATE$1 = ['YDH', 'PDD', 'REDBOOK', 'WEIMOB', 'VIP']; // 区分哪些平台不具有标准类目
43693
+ // export const IS_STANDARD_CATE = ['TAOBAO', 'YOUZAN', 'JOS', 'SUNING', 'DOUYIN', 'OFFLINE', 'DANGDANG', 'MOGUJIE', 'WEIXIN'] // 区分哪些平台具有标准类目
43694
+ // export const IS_CUSTOM_CATE = ['YHD', 'SUNING', 'MGJ', 'OFFLINE', 'DD', 'WEIXIN', 'PDD', 'REDBOOK', 'WEIMOB', 'DOUYIN', 'VIP'] // 区分哪些平台不具有自定义类目
43695
+ var IS_CUSTOM_CATE$1 = ['TAOBAO', 'JOS', 'YOUZAN']; // 区分哪些平台有自定义类目
43696
+ var SKU_STATUS_MAP = {
43697
+ 'SY_ONLINE': '在架',
43698
+ 'SY_OFFLINE': '下架',
43699
+ 'SY_SAIL_OVER': '售罄',
43700
+ '': '不限'
43701
+ };
43702
+ var QUERY_MAP$1 = {
43703
+ // 全部商品tab窗口与查询条件枚举关系
43704
+ platCode: {
43705
+ field: 'platCode',
43706
+ // 接口对应字段
43707
+ operator: 'EQ',
43708
+ // 查询条件
43709
+ operatorName: '等于',
43710
+ desc: '平台名称',
43711
+ // 描述
43712
+ rules: 'defalut' // 对应字段解析规则
43713
+ },
43714
+
43715
+ shopId: {
43716
+ field: 'shopId',
43717
+ operator: 'EQ',
43718
+ operatorName: '等于',
43719
+ desc: '店铺名称',
43720
+ rules: 'defalut'
43721
+ },
43722
+ prod_product_id: {
43723
+ field: 'prod.product_id',
43724
+ operator: 'EQ',
43725
+ operatorName: '等于',
43726
+ desc: '商品ID',
43727
+ rules: 'defalut'
43728
+ },
43729
+ prod_product_name: {
43730
+ field: 'prod.product_name',
43731
+ operator: 'LIKE',
43732
+ operatorName: '内容包含',
43733
+ desc: '商品名称',
43734
+ rules: 'split'
43735
+ },
43736
+ prod_category_tree: {
43737
+ field: 'prod.category_id',
43738
+ operator: 'EQ',
43739
+ operatorName: '等于',
43740
+ desc: '标准类目',
43741
+ rules: 'normal'
43742
+ },
43743
+ prod_seller_tree: {
43744
+ field: 'prod.seller_cid',
43745
+ operator: 'EQ',
43746
+ operatorName: '等于',
43747
+ desc: '自定义类目',
43748
+ rules: 'normal'
43749
+ },
43750
+ prod_status: {
43751
+ field: 'prod.status',
43752
+ operator: 'EQ',
43753
+ operatorName: '等于',
43754
+ desc: '商品状态',
43755
+ rules: 'defalut'
43756
+ },
43757
+ prod_stock: {
43758
+ field: 'prod.stock',
43759
+ operator: 'BETWEEN_CLOSE',
43760
+ operatorName: '介于(闭区间)',
43761
+ desc: '库存',
43762
+ rules: 'between'
43763
+ },
43764
+ prod_outer_id: {
43765
+ field: 'prod.outer_id',
43766
+ operator: 'SUB_PATTERN',
43767
+ operatorName: '符合模式(截断)',
43768
+ desc: '商品商家编码',
43769
+ rules: 'sub_pattern'
43770
+ },
43771
+ prod_price: {
43772
+ field: 'prod.price',
43773
+ operator: 'BETWEEN_CLOSE',
43774
+ operatorName: '介于(闭区间)',
43775
+ desc: '价格',
43776
+ rules: 'between'
43777
+ },
43778
+ prod_online_time: {
43779
+ field: 'prod.online_time',
43780
+ operator: 'BETWEEN_CLOSE',
43781
+ operatorName: '介于(闭区间)',
43782
+ desc: '上架时间',
43783
+ rules: 'between'
43784
+ },
43785
+ sku_flag: {
43786
+ field: 'sku_flag',
43787
+ operator: 'EQ',
43788
+ operatorName: '等于',
43789
+ desc: '是否有SKU',
43790
+ rules: 'default'
43791
+ },
43792
+ sku_sku_id: {
43793
+ field: 'sku.sku_id',
43794
+ operator: 'EQ',
43795
+ operatorName: '等于',
43796
+ desc: 'SKU ID',
43797
+ rules: 'default'
43798
+ },
43799
+ sku_outer_id: {
43800
+ field: 'sku.outer_id',
43801
+ operator: 'SUB_PATTERN',
43802
+ operatorName: '符合模式(截断)',
43803
+ desc: 'SKU商家编码',
43804
+ rules: 'sub_pattern'
43805
+ },
43806
+ sku_specification: {
43807
+ field: 'sku.specification',
43808
+ operator: 'LIKE',
43809
+ operatorName: '内容包含',
43810
+ desc: 'SKU名称',
43811
+ rules: 'default'
43812
+ }
43813
+ };
43814
+ var SELECTED_TAB_GOODS_TYPE$1 = [
43815
+ // 已选择商品tab窗口,下拉选择配置
43816
+ {
43817
+ labelKey: '商品标题',
43818
+ valueKey: 'productName',
43819
+ isSku: false
43820
+ }, {
43821
+ labelKey: '商品ID',
43822
+ valueKey: 'productId',
43823
+ isSku: false
43824
+ }, {
43825
+ labelKey: '商品商家编码',
43826
+ valueKey: 'outerId',
43827
+ isSku: false
43828
+ }, {
43829
+ labelKey: 'SKU ID',
43830
+ valueKey: 'skuId',
43831
+ isSku: true
43832
+ }, {
43833
+ labelKey: 'SKU商家编码',
43834
+ valueKey: 'outerSkuId',
43835
+ isSku: true
43836
+ }, {
43837
+ labelKey: 'SKU名称',
43838
+ valueKey: 'skuDetail',
43839
+ isSku: true
43840
+ }];
43841
+ var FIELD_STACKS$1 = {
43842
+ SHOP_ID: 'shopId',
43843
+ // 上架店铺
43844
+ PLAT_CODE: 'platCode',
43845
+ // 平台
43846
+ PROD_PRICE: 'prod.price',
43847
+ // 价格
43848
+ PROD_STOCK: 'prod.stock',
43849
+ // 库存
43850
+ PROD_STATUS: 'prod.status',
43851
+ // 商品状态
43852
+ PROD_OUTER_ID: 'prod.outer_id',
43853
+ // 商品商家编码
43854
+ PROD_SELLER_ID: 'prod.seller_cid',
43855
+ // 自定义类目
43856
+ PROD_PRODUCT_ID: 'prod.product_id',
43857
+ // 商品ID
43858
+ PROD_CATEGORY_ID: 'prod.category_id',
43859
+ // 标准类目
43860
+ PROD_ONLINE_TIME: 'prod.online_time',
43861
+ // 上架时间
43862
+ PROD_PRODUCT_NAME: 'prod.product_name',
43863
+ // 商品名称
43864
+
43865
+ SKU_FLAG: 'sku_flag',
43866
+ // 是否有SKU
43867
+ SKU_PRICE: 'sku.price',
43868
+ // SKU属性 > SKU价格
43869
+ SKU_STOCK: 'sku.stock',
43870
+ // SKU属性 > SKU库存
43871
+ SKU_SKU_ID: 'sku.sku_id',
43872
+ // SKU属性 > SKU ID
43873
+ SKU_STATUS: 'sku.status',
43874
+ // SKU属性 > SKU在架状态
43875
+ SKU_OUTER_ID: 'sku.outer_id',
43876
+ // SKU属性 > SKU 商家编码
43877
+ SKU_SPECIFICATION: 'sku.specification' // SKU属性 > SKU名称
43878
+ };
43879
+
43880
+ var OPERATOR_STACKS$1 = {
43881
+ EQ: 'EQ',
43882
+ LT: 'LT',
43883
+ GT: 'GT',
43884
+ LIKE: 'LIKE',
43885
+ END_LIKE: 'END_LIKE',
43886
+ BEGIN_LIKE: 'BEGIN_LIKE',
43887
+ SUB_PATTERN: 'SUB_PATTERN',
43888
+ BETWEEN_OPEN: 'BETWEEN_OPEN',
43889
+ BETWEEN_CLOSE: 'BETWEEN_CLOSE',
43890
+ ISNULL: 'ISNULL',
43891
+ NONULL: 'NONULL',
43892
+ NOT_EQ: 'NOT_EQ',
43893
+ TAG_ISNULL: 'TAG_ISNULL',
43894
+ TAG_NONULL: 'TAG_NONULL',
43895
+ BETWEEN_RELATIVE: 'BETWEEN_RELATIVE'
43896
+ };
43897
+
43898
+ var NULL_MAP$1 = {
43899
+ ISNULL: {
43900
+ label: '为空',
43901
+ value: 'ISNULL'
43902
+ },
43903
+ NONULL: {
43904
+ label: '不为空',
43905
+ value: 'NONULL'
43906
+ }
43907
+ };
43908
+ var TAG_NULL_MAP$1 = {
43909
+ TAG_ISNULL: {
43910
+ label: '为空',
43911
+ value: 'TAG_ISNULL'
43912
+ },
43913
+ TAG_NONULL: {
43914
+ label: '不为空',
43915
+ value: 'TAG_NONULL'
43916
+ }
43917
+ };
43918
+ var reg$1 = new RegExp('\'', 'g');
43919
+ var nullList$1 = ['ISNULL', 'NONULL'];
43920
+ function queryTypeMap$1(moduleType, type) {
43921
+ switch (moduleType) {
43922
+ case 'SELECT':
43923
+ return {
43924
+ operator: 'EQ',
43925
+ operatorName: '等于',
43926
+ rules: 'defalut'
43927
+ };
43928
+ case 'INPUT':
43929
+ return {
43930
+ operator: type === 'SINGLE' ? 'EQ' : 'LIKE',
43931
+ operatorName: type === 'SINGLE' ? '等于' : '内容包含',
43932
+ rules: type === 'SINGLE' ? 'defalut' : 'split'
43933
+ };
43934
+ case 'SELECT_TREE':
43935
+ return {
43936
+ operator: 'EQ',
43937
+ operatorName: '等于',
43938
+ rules: 'normal'
43939
+ };
43940
+ case 'SELECT_INPUT':
43941
+ return {
43942
+ operator: 'SUB_PATTERN',
43943
+ operatorName: '符合模式(截断)',
43944
+ rules: 'sub_pattern'
43945
+ };
43946
+ case 'NUMBER':
43947
+ return {
43948
+ operator: 'BETWEEN_CLOSE',
43949
+ operatorName: '介于(闭区间)',
43950
+ rules: 'between'
43951
+ };
43952
+ case 'DATE':
43953
+ return {
43954
+ operator: type === 'DATE_M' ? 'EQ' : 'BETWEEN_CLOSE',
43955
+ operatorName: type === 'DATE_M' ? '等于' : '介于(闭区间)',
43956
+ rules: type === 'DATE_M' ? 'defalut' : 'between'
43957
+ };
43958
+ }
43959
+ return null;
43960
+ }
43961
+ function configQueryMap$1(data, query) {
43962
+ var obj = {};
43963
+ data.forEach(function (item) {
43964
+ if (!item.groupName || item.groupName === '商品基本属性' || item.groupName === '商品 SKU 属性') {
43965
+ obj = _objectSpread2(_objectSpread2({}, obj), {}, _defineProperty({}, item.itemId, _objectSpread2(_objectSpread2({}, QUERY_MAP$1[item.itemId]), {}, {
43966
+ type: item.type,
43967
+ moduleType: item.moduleType,
43968
+ dataSource: item.configs,
43969
+ newStatus: item.newStatus,
43970
+ // status: item.newStatus,
43971
+ tagsFlag: null
43972
+ })));
43973
+ } else {
43974
+ var optObj = {};
43975
+ if (item.moduleType !== 'NO_VALUE') {
43976
+ optObj = queryTypeMap$1(item.moduleType, item.type);
43977
+ } else if (query[item.itemId]) {
43978
+ var id = query[item.itemId];
43979
+ optObj.operator = TAG_NULL_MAP$1[id].value;
43980
+ optObj.operatorName = TAG_NULL_MAP$1[id].label;
43981
+ optObj.rules = 'noValue';
43982
+ }
43983
+ obj = _objectSpread2(_objectSpread2({}, obj), {}, _defineProperty({}, item.itemId, _objectSpread2({
43984
+ field: item.itemId,
43985
+ desc: item.itemName,
43986
+ tagsFlag: 'tags',
43987
+ type: item.type,
43988
+ moduleType: item.moduleType,
43989
+ dataSource: item.configs,
43990
+ newStatus: item.newStatus
43991
+ }, optObj)));
43992
+ }
43993
+ });
43994
+ return obj;
43995
+ }
43996
+
43997
+ /**
43998
+ * 数组去重
43999
+ */
44000
+ function unique$1(array) {
44001
+ var keyFn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (item) {
44002
+ return item;
44003
+ };
44004
+ var hash = {};
44005
+ var result = [];
44006
+ array.forEach(function (item) {
44007
+ var key = keyFn(item);
44008
+ if (key in hash) return;
44009
+ result.push(item);
44010
+ hash[key] = null;
44011
+ });
44012
+ return result;
44013
+ }
44014
+ function genPlatShopValue$1(platList, shopList, platShop) {
44015
+ var _platCode = platShop.platCode,
44016
+ _shopId = platShop.shopId;
44017
+ var defaultPlat = platList[0] && platList[0].platCode;
44018
+ var platCode = platList.find(function (plat) {
44019
+ return plat.platCode === _platCode;
44020
+ }) ? _platCode : defaultPlat;
44021
+ var defaultShop = (shopList.find(function (shop) {
44022
+ return shop.platCode === platCode;
44023
+ }) || {}).shopId;
44024
+ var shopId = shopList.find(function (shop) {
44025
+ return shop.shopId === _shopId;
44026
+ }) ? _shopId : defaultShop;
44027
+ return {
44028
+ shopId: shopId,
44029
+ platCode: platCode
44030
+ };
44031
+ }
44032
+
44033
+ /**
44034
+ * 全部商品tab-请求参数转化
44035
+ * @param {*} data 需要转化的数据
44036
+ * @param {*} config 配置项枚举信息
44037
+ */
44038
+ function allTabFormatting$1(config, data) {
44039
+ var arr = [];
44040
+ Object.keys(data).forEach(function (item) {
44041
+ if (config[item]) {
44042
+ var obj = {
44043
+ field: config[item].field,
44044
+ fieldName: config[item].desc,
44045
+ configName: item,
44046
+ tagsFlag: config[item].tagsFlag,
44047
+ operator: config[item].operator,
44048
+ operatorName: config[item].operatorName
44049
+ };
44050
+ switch (config[item].rules) {
44051
+ case 'normal':
44052
+ if (data[item]) {
44053
+ if (config[item].type === 'SINGLE') {
44054
+ obj.value = [data[item].value];
44055
+ obj.semantic = [data[item].label];
44056
+ } else {
44057
+ var ids = [];
44058
+ var names = [];
44059
+ data[item].forEach(function (str) {
44060
+ ids.push(str.id);
44061
+ names.push(str.name);
44062
+ });
44063
+ obj.semantic = names;
44064
+ obj.value = config[item].tagsFlag ? names : ids;
44065
+ }
44066
+ }
44067
+ break;
44068
+ case 'between':
44069
+ data[item].start = "".concat(data[item].start);
44070
+ data[item].end = "".concat(data[item].end);
44071
+ if (data[item].datetype) {
44072
+ obj.relative = data[item].datetype;
44073
+ }
44074
+ if (data[item].dateUnit) {
44075
+ obj.timeUnit = data[item].dateUnit;
44076
+ }
44077
+ if (data[item].start || data[item].end) {
44078
+ obj.value = [data[item].start, data[item].end];
44079
+ obj.semantic = [data[item].start, data[item].end];
44080
+ }
44081
+ break;
44082
+ case 'split':
44083
+ if (data[item]) {
44084
+ var _value = data[item].replace(reg$1, '\\\'');
44085
+ obj.value = _value.split(',');
44086
+ obj.semantic = data[item].split(',');
44087
+ }
44088
+ break;
44089
+ case 'sub_pattern':
44090
+ if (data[item]) {
44091
+ if (typeof data[item] === 'string') {
44092
+ var _value2 = data[item].replace(reg$1, '\\\'');
44093
+ obj.value = [_value2];
44094
+ var val = data[item].split(':');
44095
+ if (val.length > 1) {
44096
+ obj.semantic = ["\u622A\u53D6".concat(val[0], "\u81F3").concat(val[1], "\u4F4D\uFF0C\u5B57\u7B26\u662F").concat(val[2])];
44097
+ } else {
44098
+ obj.operatorName = '等于';
44099
+ obj.semantic = [data[item]];
44100
+ }
44101
+ }
44102
+ }
44103
+ break;
44104
+ default:
44105
+ if (data[item]) {
44106
+ if (config[item].field === 'platCode') {
44107
+ // 假如平台code标识,需要找出平台名称
44108
+ data.platList.forEach(function (val) {
44109
+ if (val.platCode === data[item]) {
44110
+ obj.semantic = [val.platName];
44111
+ obj.value = [data[item]];
44112
+ }
44113
+ });
44114
+ } else if (config[item].field === 'shopId') {
44115
+ // 假如是店铺ID标识,需要找出店铺名称
44116
+ data.shopList.forEach(function (val) {
44117
+ if (val.shopId === data[item]) {
44118
+ obj.semantic = [val.shopName];
44119
+ obj.value = [data[item]];
44120
+ }
44121
+ });
44122
+ } else if (config[item].moduleType === 'SELECT' || config[item].moduleType === 'DATE') {
44123
+ if (config[item].type === 'SINGLE') {
44124
+ var _list = config[item].dataSource.filter(function (el) {
44125
+ return el.value === data[item];
44126
+ });
44127
+ obj.semantic = [_list[0].label];
44128
+ obj.value = config[item].tagsFlag ? [_list[0].label] : [_list[0].value];
44129
+ } else if (config[item].type === 'MULTIPLE' || config[item].type === 'DATE_M') {
44130
+ var values = data[item] && data[item].map(function (el) {
44131
+ var findTemp = config[item].dataSource.find(function (innerItem) {
44132
+ return innerItem.value === el;
44133
+ });
44134
+ return (findTemp || {}).label;
44135
+ });
44136
+ obj.value = values;
44137
+ obj.semantic = values;
44138
+ } else if (config[item].moduleType === 'N0_VALUE') {
44139
+ obj.semantic = NULL_MAP$1[data[item]].label;
44140
+ obj.value = [data[item]];
44141
+ obj.operator = NULL_MAP$1[data[item]].value;
44142
+ obj.operatorName = NULL_MAP$1[data[item]].label;
44143
+ } else {
44144
+ obj.semantic = [data[item]];
44145
+ obj.value = [data[item]];
44146
+ }
44147
+ } else {
44148
+ obj.semantic = [data[item]];
44149
+ var _value3 = data[item].replace(reg$1, '\\\'');
44150
+ obj.value = [_value3];
44151
+ }
44152
+ }
44153
+ }
44154
+ arr.push(obj);
44155
+ }
44156
+ });
44157
+ /**
44158
+ *
44159
+ */
44160
+ return arr.filter(function (item) {
44161
+ return item.value && item.value.length >= 1;
44162
+ });
44163
+ }
44164
+
44165
+ /**
44166
+ * 过滤对象中空属性
44167
+ * @param {*} obj
44168
+ * @returns
44169
+ */
44170
+ function filterNullValueObject$1(obj) {
44171
+ for (var i in obj) {
44172
+ if (obj[i] === '' || obj[i] === null || obj[i] === 'null') {
44173
+ delete obj[i];
44174
+ }
44175
+ }
44176
+ return obj;
44177
+ }
44178
+
44179
+ /**
44180
+ * 商品选择tab窗口,根据筛选条件格式化数据
44181
+ * @param {*} data
44182
+ */
44183
+ function parsingNewCondition(data) {
44184
+ var arr = [];
44185
+ var list = ['shopId', 'prod.outer_id', 'sku.outer_id', 'prod.product_id', 'sku.sku_id', 'prod.online_time', 'prod.status'];
44186
+ data.forEach(function (item) {
44187
+ var obj = {
44188
+ field: '',
44189
+ fieldName: '',
44190
+ operator: '',
44191
+ operatorName: '',
44192
+ semantic: [],
44193
+ value: []
44194
+ };
44195
+ obj.tagsFlag = item.field.groupName ? 'tags' : null;
44196
+ obj.field = item.field.field;
44197
+ obj.fieldName = item.field.desc;
44198
+ obj.operator = item.operator.value;
44199
+ obj.operatorName = item.operator.label;
44200
+ if (list.includes(item.field.field)) {
44201
+ switch (item.field.field) {
44202
+ case 'shopId':
44203
+ // 上架店铺(需要解析出平台code)
44204
+ if (item.value) {
44205
+ arr.push({
44206
+ field: 'platCode',
44207
+ fieldName: '平台名称',
44208
+ operator: item.operator.value,
44209
+ operatorName: '等于',
44210
+ semantic: [item.value.plat.label],
44211
+ value: [item.value.plat.value]
44212
+ });
44213
+ obj.semantic = item.value.shops.map(function (shop) {
44214
+ return shop.label;
44215
+ });
44216
+ obj.value = item.value.shops.map(function (shop) {
44217
+ return shop.value;
44218
+ });
44219
+ }
44220
+ break;
44221
+ case 'prod.outer_id': // 商品商家编码
44222
+ case 'sku.outer_id':
44223
+ // sku商家编码
44224
+ if (item.value) {
44225
+ if (item.operator.value === 'SUB_PATTERN') {
44226
+ // 如果是截断模式
44227
+ obj.value = ["".concat(item.value.begin, ":").concat(item.value.end, ":").concat(item.value.value.replace(reg$1, '\\\''))];
44228
+ obj.semantic = ["\u622A\u53D6".concat(item.value.begin, "\u81F3").concat(item.value.end, "\u4F4D,\u5B57\u7B26\u662F").concat(item.value.value)];
44229
+ } else if (Array.isArray(item.value)) {
44230
+ obj.semantic = item.value.filter(function (val) {
44231
+ return val !== '';
44232
+ });
44233
+ obj.value = item.value.filter(function (val) {
44234
+ return val !== '';
44235
+ }).map(function (val) {
44236
+ return val.replace(reg$1, '\\\'');
44237
+ });
44238
+ } else {
44239
+ obj.semantic = [item.value];
44240
+ obj.value = [item.value.replace(reg$1, '\\\'')];
44241
+ }
44242
+ } else if (nullList$1.includes(item.operator.value)) {
44243
+ obj.value = [NULL_MAP$1[item.operator.value].value];
44244
+ obj.semantic = [NULL_MAP$1[item.operator.value].label];
44245
+ }
44246
+ break;
44247
+ case 'prod.product_id':
44248
+ case 'sku.sku_id':
44249
+ if (item.value) {
44250
+ if (Array.isArray(item.value)) {
44251
+ obj.semantic = item.value.filter(function (val) {
44252
+ return val !== '';
44253
+ });
44254
+ obj.value = item.value.filter(function (val) {
44255
+ return val !== '';
44256
+ }).map(function (val) {
44257
+ return val.replace(reg$1, '\\\'');
44258
+ });
44259
+ } else {
44260
+ obj.semantic = [item.value];
44261
+ obj.value = [item.value.replace(reg$1, '\\\'')];
44262
+ }
44263
+ }
44264
+ break;
44265
+ case 'prod.online_time':
44266
+ if (item.operator.value === 'BETWEEN_RELATIVE') {
44267
+ obj.relative = 'relative';
44268
+ obj.operator = 'BETWEEN_CLOSE';
44269
+ obj.operatorName = '介于(闭区间)';
44270
+ if (item.value) {
44271
+ if (item.value.value) {
44272
+ obj.value = item.value.value;
44273
+ obj.semantic = item.value.value;
44274
+ }
44275
+ if (item.value.timeUnit) {
44276
+ obj.timeUnit = item.value.timeUnit;
44277
+ }
44278
+ }
44279
+ }
44280
+ break;
44281
+ case 'prod.status':
44282
+ obj.value = item.value;
44283
+ var values = item.value.map(function (el) {
44284
+ var findTemp = item.field.dataSource.find(function (innerItem) {
44285
+ return innerItem.value === el;
44286
+ });
44287
+ return (findTemp || {
44288
+ label: el
44289
+ }).label;
44290
+ });
44291
+ obj.semantic = values;
44292
+ break;
44293
+ }
44294
+ } else {
44295
+ switch (item.field.type) {
44296
+ case 'NO_VALUE':
44297
+ // 无值类
44298
+ obj.semantic = [item.operator.label];
44299
+ obj.value = [item.operator.value];
44300
+ break;
44301
+ case 'DATE_YMD': // 年月日
44302
+ case 'DATE_MD':
44303
+ // 月日
44304
+ if (item.value) {
44305
+ if (item.operator.value === 'BETWEEN_CLOSE' || item.operator.value === 'BETWEEN_OPEN') {
44306
+ // 假如是区间类型
44307
+ obj.value = item.value ? [item.value.start || '', item.value.end || ''] : [item.value];
44308
+ obj.semantic = item.value ? [item.value.start || '', item.value.end || ''] : [item.value];
44309
+ } else if (nullList$1.includes(item.operator.value)) {
44310
+ obj.value = [NULL_MAP$1[item.operator.value].value];
44311
+ obj.semantic = [NULL_MAP$1[item.operator.value].label];
44312
+ } else {
44313
+ obj.value = item.value ? [item.value] : [''];
44314
+ obj.semantic = item.value ? [item.value] : [''];
44315
+ }
44316
+ } else if (nullList$1.includes(item.operator.value)) {
44317
+ obj.value = [NULL_MAP$1[item.operator.value].value];
44318
+ obj.semantic = [NULL_MAP$1[item.operator.value].label];
44319
+ }
44320
+ break;
44321
+ case 'DATE_M':
44322
+ // 月
44323
+ if (item.value) {
44324
+ obj.value = item.value;
44325
+ obj.semantic = item.value.map(function (el) {
44326
+ var findTemp = item.field.dataSource.find(function (innerItem) {
44327
+ return Number(innerItem.value) === Number(el);
44328
+ });
44329
+ return (findTemp || {
44330
+ label: el
44331
+ }).label;
44332
+ });
44333
+ } else if (nullList$1.includes(item.operator.value)) {
44334
+ obj.value = [NULL_MAP$1[item.operator.value].value];
44335
+ obj.semantic = [NULL_MAP$1[item.operator.value].label];
44336
+ }
44337
+ break;
44338
+ case 'CATEGORY_SELECT_TREE':
44339
+ obj.field = item.field.field;
44340
+ obj.fieldName = item.field.desc;
44341
+ obj.operator = item.operator.value;
44342
+ obj.operatorName = item.operator.label;
44343
+ if (item.value) {
44344
+ var categoriesIds = [];
44345
+ var categoriesName = [];
44346
+ item.value.categories.forEach(function (str) {
44347
+ categoriesIds.push(str.id);
44348
+ categoriesName.push(str.name);
44349
+ });
44350
+ obj.semantic = categoriesName;
44351
+ obj.value = categoriesIds;
44352
+ } else if (item.operator.value === 'ISNULL') {
44353
+ obj.semantic = ['为空'];
44354
+ obj.value = ['ISNULL'];
44355
+ } else if (item.operator.value === 'NONULL') {
44356
+ obj.semantic = ['不为空'];
44357
+ obj.value = ['NONULL'];
44358
+ }
44359
+ break;
44360
+ case 'SELECT_MULTIPLE_TREE':
44361
+ // 下拉树多选
44362
+ if (item.value) {
44363
+ var ids = [];
44364
+ var names = [];
44365
+ var _list = item.value;
44366
+ _list.forEach(function (str) {
44367
+ ids.push(str.id);
44368
+ names.push(str.name);
44369
+ });
44370
+ obj.semantic = names;
44371
+ obj.value = names;
44372
+ } else if (nullList$1.includes(item.operator.value)) {
44373
+ obj.value = [NULL_MAP$1[item.operator.value].label];
44374
+ obj.semantic = [NULL_MAP$1[item.operator.value].label];
44375
+ }
44376
+ break;
44377
+ case 'SELECT_TREE':
44378
+ // 下拉树单选
44379
+ if (item.value) {
44380
+ obj.semantic = [item.field.label];
44381
+ obj.value = [item.field.label];
44382
+ } else if (nullList$1.includes(item.operator.value)) {
44383
+ obj.value = [NULL_MAP$1[item.operator.value].value];
44384
+ obj.semantic = [NULL_MAP$1[item.operator.value].label];
44385
+ }
44386
+ break;
44387
+ case 'MULTIPLE_SELECT':
44388
+ // 下拉多选
44389
+ if (item.value) {
44390
+ var _item$value;
44391
+ var _values = (_item$value = item.value) === null || _item$value === void 0 ? void 0 : _item$value.map(function (el) {
44392
+ var findTemp = item.field.dataSource.find(function (innerItem) {
44393
+ return innerItem.value === el;
44394
+ });
44395
+ return (findTemp || {
44396
+ label: el
44397
+ }).label;
44398
+ });
44399
+ obj.value = _values;
44400
+ obj.semantic = _values;
44401
+ } else if (nullList$1.includes(item.operator.value)) {
44402
+ obj.value = [NULL_MAP$1[item.operator.value].value];
44403
+ obj.semantic = [NULL_MAP$1[item.operator.value].label];
44404
+ }
44405
+ break;
44406
+ case 'SELECT':
44407
+ // 下拉单选
44408
+ if (item.value !== undefined) {
44409
+ obj.value = [item.value];
44410
+ var _list3 = item.field.dataSource.filter(function (el) {
44411
+ return el.value === item.value;
44412
+ });
44413
+ obj.semantic = [_list3[0].label];
44414
+ } else if (nullList$1.includes(item.operator.value)) {
44415
+ obj.value = [NULL_MAP$1[item.operator.value].value];
44416
+ obj.semantic = [NULL_MAP$1[item.operator.value].label];
44417
+ }
44418
+ break;
44419
+ case 'NUMBER_INT': // 整数
44420
+ case 'NUMBER_DECIMAL':
44421
+ // 小数
44422
+ if (item.value || item.value === 0) {
44423
+ obj.semantic = Array.isArray(item.value) ? item.value : [item.value];
44424
+ obj.value = Array.isArray(item.value) ? item.value : [item.value];
44425
+ } else if (nullList$1.includes(item.operator.value)) {
44426
+ obj.value = [NULL_MAP$1[item.operator.value].value];
44427
+ obj.semantic = [NULL_MAP$1[item.operator.value].label];
44428
+ }
44429
+ break;
44430
+ case 'STRING':
44431
+ // 字符
44432
+ if (item.value) {
44433
+ if (item.operator.value === 'LIKE') {
44434
+ // 假如是like操作还需要区分出或者还是并且的关系
44435
+ obj.value = item.value.value.map(function (val) {
44436
+ return val.replace(reg$1, '\\\'');
44437
+ });
44438
+ obj.multiText = item.value.relation ? 'AND' : 'OR';
44439
+ obj.semantic = item.value;
44440
+ } else if (Array.isArray(item.value)) {
44441
+ obj.semantic = item.value.filter(function (val) {
44442
+ return val !== '';
44443
+ });
44444
+ obj.value = item.value.filter(function (val) {
44445
+ return val !== '';
44446
+ }).map(function (val) {
44447
+ return val.replace(reg$1, '\\\'');
44448
+ });
44449
+ } else {
44450
+ obj.semantic = [item.value];
44451
+ obj.value = [item.value.replace(reg$1, '\\\'')];
44452
+ }
44453
+ } else if (nullList$1.includes(item.operator.value)) {
44454
+ obj.value = [NULL_MAP$1[item.operator.value].value];
44455
+ obj.semantic = [NULL_MAP$1[item.operator.value].label];
44456
+ }
44457
+ break;
44458
+ }
44459
+ }
44460
+ arr.push(obj);
44461
+ });
44462
+ return arr;
44463
+ }
44464
+ function queryConditionToStringNew(array) {
44465
+ var obj = {
44466
+ str: [],
44467
+ title: [],
44468
+ value: parsingNewCondition(array).filter(function (item) {
44469
+ return item.value.length || item.operator === "ISNULL" || item.operator === "NONULL";
44470
+ })
44471
+ };
44472
+ return obj;
44473
+ }
44474
+
44475
+ /**
44476
+ * 计算已选商品和sku的数量
44477
+ * @param {*} Object || Array
44478
+ */
44479
+ function resultGoodsLength$1(obj) {
44480
+ // TODO SELECT
44481
+ var len = 0;
44482
+ if (Array.isArray(obj)) {
44483
+ if (obj.length) {
44484
+ obj.forEach(function (item) {
44485
+ if (item.rowExpandable) {
44486
+ len += item.skus.length;
44487
+ } else {
44488
+ len += 1;
44489
+ }
44490
+ });
44491
+ }
44492
+ } else {
44493
+ Object.keys(obj).forEach(function (item) {
44494
+ if (obj[item].rowExpandable) {
44495
+ // 假如是sku展开状态则商品数量以sku数量为准
44496
+ len += obj[item].skus.length;
44497
+ } else {
44498
+ len += 1;
44499
+ }
44500
+ });
44501
+ }
44502
+ return len;
44503
+ }
44504
+
43668
44505
  var skuConditionQueryList = ['sku.sku_id', 'sku.outer_id', 'sku.specification', 'sku.status', 'sku.price', 'sku.stock'];
43669
44506
  var Store$f = /*#__PURE__*/function () {
43670
44507
  function Store() {
@@ -44157,7 +44994,7 @@
44157
44994
  case 0:
44158
44995
  url = "".concat(server, "/product-selector/2.0/batch/import?tenant=").concat(extraQuery);
44159
44996
  _context10.next = 3;
44160
- return http.post(url, data);
44997
+ return http.post(url, filterNullValueObject$1(data));
44161
44998
  case 3:
44162
44999
  result = _context10.sent;
44163
45000
  if (result.data.success) {
@@ -44803,217 +45640,6 @@
44803
45640
  return React.useContext(Context$4);
44804
45641
  }
44805
45642
 
44806
- /**
44807
- * 此文件记录一些通用 & 默认配置项
44808
- */
44809
- var DEFAULT_TABLE_SKU_ROW = ['productName', 'productId', 'outerId', 'price', 'stock', 'onlineTime', 'status', 'platName', 'shopName', 'showCategoryName', 'showSellerCategoryName', 'skuTotal', 'sku'];
44810
- var DEFAULT_TABLE_ROW$1 = ['productName', 'productId', 'outerId', 'price', 'stock', 'onlineTime', 'status', 'platName', 'shopName', 'showCategoryName', 'showSellerCategoryName'];
44811
- var IS_STANDARD_CATE$1 = ['YDH', 'PDD', 'REDBOOK', 'WEIMOB', 'VIP']; // 区分哪些平台不具有标准类目
44812
- // export const IS_STANDARD_CATE = ['TAOBAO', 'YOUZAN', 'JOS', 'SUNING', 'DOUYIN', 'OFFLINE', 'DANGDANG', 'MOGUJIE', 'WEIXIN'] // 区分哪些平台具有标准类目
44813
- // export const IS_CUSTOM_CATE = ['YHD', 'SUNING', 'MGJ', 'OFFLINE', 'DD', 'WEIXIN', 'PDD', 'REDBOOK', 'WEIMOB', 'DOUYIN', 'VIP'] // 区分哪些平台不具有自定义类目
44814
- var IS_CUSTOM_CATE$1 = ['TAOBAO', 'JOS', 'YOUZAN']; // 区分哪些平台有自定义类目
44815
- var SKU_STATUS_MAP = {
44816
- 'SY_ONLINE': '在架',
44817
- 'SY_OFFLINE': '下架',
44818
- 'SY_SAIL_OVER': '售罄',
44819
- '': '不限'
44820
- };
44821
- var QUERY_MAP$1 = {
44822
- // 全部商品tab窗口与查询条件枚举关系
44823
- platCode: {
44824
- field: 'platCode',
44825
- // 接口对应字段
44826
- operator: 'EQ',
44827
- // 查询条件
44828
- operatorName: '等于',
44829
- desc: '平台名称',
44830
- // 描述
44831
- rules: 'defalut' // 对应字段解析规则
44832
- },
44833
-
44834
- shopId: {
44835
- field: 'shopId',
44836
- operator: 'EQ',
44837
- operatorName: '等于',
44838
- desc: '店铺名称',
44839
- rules: 'defalut'
44840
- },
44841
- prod_product_id: {
44842
- field: 'prod.product_id',
44843
- operator: 'EQ',
44844
- operatorName: '等于',
44845
- desc: '商品ID',
44846
- rules: 'defalut'
44847
- },
44848
- prod_product_name: {
44849
- field: 'prod.product_name',
44850
- operator: 'LIKE',
44851
- operatorName: '内容包含',
44852
- desc: '商品名称',
44853
- rules: 'split'
44854
- },
44855
- prod_category_tree: {
44856
- field: 'prod.category_id',
44857
- operator: 'EQ',
44858
- operatorName: '等于',
44859
- desc: '标准类目',
44860
- rules: 'normal'
44861
- },
44862
- prod_seller_tree: {
44863
- field: 'prod.seller_cid',
44864
- operator: 'EQ',
44865
- operatorName: '等于',
44866
- desc: '自定义类目',
44867
- rules: 'normal'
44868
- },
44869
- prod_status: {
44870
- field: 'prod.status',
44871
- operator: 'EQ',
44872
- operatorName: '等于',
44873
- desc: '商品状态',
44874
- rules: 'defalut'
44875
- },
44876
- prod_stock: {
44877
- field: 'prod.stock',
44878
- operator: 'BETWEEN_CLOSE',
44879
- operatorName: '介于(闭区间)',
44880
- desc: '库存',
44881
- rules: 'between'
44882
- },
44883
- prod_outer_id: {
44884
- field: 'prod.outer_id',
44885
- operator: 'SUB_PATTERN',
44886
- operatorName: '符合模式(截断)',
44887
- desc: '商品商家编码',
44888
- rules: 'sub_pattern'
44889
- },
44890
- prod_price: {
44891
- field: 'prod.price',
44892
- operator: 'BETWEEN_CLOSE',
44893
- operatorName: '介于(闭区间)',
44894
- desc: '价格',
44895
- rules: 'between'
44896
- },
44897
- prod_online_time: {
44898
- field: 'prod.online_time',
44899
- operator: 'BETWEEN_CLOSE',
44900
- operatorName: '介于(闭区间)',
44901
- desc: '上架时间',
44902
- rules: 'between'
44903
- },
44904
- sku_flag: {
44905
- field: 'sku_flag',
44906
- operator: 'EQ',
44907
- operatorName: '等于',
44908
- desc: '是否有SKU',
44909
- rules: 'default'
44910
- },
44911
- sku_sku_id: {
44912
- field: 'sku.sku_id',
44913
- operator: 'EQ',
44914
- operatorName: '等于',
44915
- desc: 'SKU ID',
44916
- rules: 'default'
44917
- },
44918
- sku_outer_id: {
44919
- field: 'sku.outer_id',
44920
- operator: 'SUB_PATTERN',
44921
- operatorName: '符合模式(截断)',
44922
- desc: 'SKU商家编码',
44923
- rules: 'sub_pattern'
44924
- },
44925
- sku_specification: {
44926
- field: 'sku.specification',
44927
- operator: 'LIKE',
44928
- operatorName: '内容包含',
44929
- desc: 'SKU名称',
44930
- rules: 'default'
44931
- }
44932
- };
44933
- var SELECTED_TAB_GOODS_TYPE$1 = [
44934
- // 已选择商品tab窗口,下拉选择配置
44935
- {
44936
- labelKey: '商品标题',
44937
- valueKey: 'productName',
44938
- isSku: false
44939
- }, {
44940
- labelKey: '商品ID',
44941
- valueKey: 'productId',
44942
- isSku: false
44943
- }, {
44944
- labelKey: '商品商家编码',
44945
- valueKey: 'outerId',
44946
- isSku: false
44947
- }, {
44948
- labelKey: 'SKU ID',
44949
- valueKey: 'skuId',
44950
- isSku: true
44951
- }, {
44952
- labelKey: 'SKU商家编码',
44953
- valueKey: 'outerSkuId',
44954
- isSku: true
44955
- }, {
44956
- labelKey: 'SKU名称',
44957
- valueKey: 'skuDetail',
44958
- isSku: true
44959
- }];
44960
- var FIELD_STACKS$1 = {
44961
- SHOP_ID: 'shopId',
44962
- // 上架店铺
44963
- PLAT_CODE: 'platCode',
44964
- // 平台
44965
- PROD_PRICE: 'prod.price',
44966
- // 价格
44967
- PROD_STOCK: 'prod.stock',
44968
- // 库存
44969
- PROD_STATUS: 'prod.status',
44970
- // 商品状态
44971
- PROD_OUTER_ID: 'prod.outer_id',
44972
- // 商品商家编码
44973
- PROD_SELLER_ID: 'prod.seller_cid',
44974
- // 自定义类目
44975
- PROD_PRODUCT_ID: 'prod.product_id',
44976
- // 商品ID
44977
- PROD_CATEGORY_ID: 'prod.category_id',
44978
- // 标准类目
44979
- PROD_ONLINE_TIME: 'prod.online_time',
44980
- // 上架时间
44981
- PROD_PRODUCT_NAME: 'prod.product_name',
44982
- // 商品名称
44983
-
44984
- SKU_FLAG: 'sku_flag',
44985
- // 是否有SKU
44986
- SKU_PRICE: 'sku.price',
44987
- // SKU属性 > SKU价格
44988
- SKU_STOCK: 'sku.stock',
44989
- // SKU属性 > SKU库存
44990
- SKU_SKU_ID: 'sku.sku_id',
44991
- // SKU属性 > SKU ID
44992
- SKU_STATUS: 'sku.status',
44993
- // SKU属性 > SKU在架状态
44994
- SKU_OUTER_ID: 'sku.outer_id',
44995
- // SKU属性 > SKU 商家编码
44996
- SKU_SPECIFICATION: 'sku.specification' // SKU属性 > SKU名称
44997
- };
44998
-
44999
- var OPERATOR_STACKS$1 = {
45000
- EQ: 'EQ',
45001
- LT: 'LT',
45002
- GT: 'GT',
45003
- LIKE: 'LIKE',
45004
- END_LIKE: 'END_LIKE',
45005
- BEGIN_LIKE: 'BEGIN_LIKE',
45006
- SUB_PATTERN: 'SUB_PATTERN',
45007
- BETWEEN_OPEN: 'BETWEEN_OPEN',
45008
- BETWEEN_CLOSE: 'BETWEEN_CLOSE',
45009
- ISNULL: 'ISNULL',
45010
- NONULL: 'NONULL',
45011
- NOT_EQ: 'NOT_EQ',
45012
- TAG_ISNULL: 'TAG_ISNULL',
45013
- TAG_NONULL: 'TAG_NONULL',
45014
- BETWEEN_RELATIVE: 'BETWEEN_RELATIVE'
45015
- };
45016
-
45017
45643
  function WidgetBox$1(_ref) {
45018
45644
  var _ref$help = _ref.help,
45019
45645
  help = _ref$help === void 0 ? '' : _ref$help,
@@ -50107,599 +50733,6 @@
50107
50733
  return data;
50108
50734
  }
50109
50735
 
50110
- var NULL_MAP$1 = {
50111
- ISNULL: {
50112
- label: '为空',
50113
- value: 'ISNULL'
50114
- },
50115
- NONULL: {
50116
- label: '不为空',
50117
- value: 'NONULL'
50118
- }
50119
- };
50120
- var TAG_NULL_MAP$1 = {
50121
- TAG_ISNULL: {
50122
- label: '为空',
50123
- value: 'TAG_ISNULL'
50124
- },
50125
- TAG_NONULL: {
50126
- label: '不为空',
50127
- value: 'TAG_NONULL'
50128
- }
50129
- };
50130
- var reg$1 = new RegExp('\'', 'g');
50131
- var nullList$1 = ['ISNULL', 'NONULL'];
50132
- function queryTypeMap$1(moduleType, type) {
50133
- switch (moduleType) {
50134
- case 'SELECT':
50135
- return {
50136
- operator: 'EQ',
50137
- operatorName: '等于',
50138
- rules: 'defalut'
50139
- };
50140
- case 'INPUT':
50141
- return {
50142
- operator: type === 'SINGLE' ? 'EQ' : 'LIKE',
50143
- operatorName: type === 'SINGLE' ? '等于' : '内容包含',
50144
- rules: type === 'SINGLE' ? 'defalut' : 'split'
50145
- };
50146
- case 'SELECT_TREE':
50147
- return {
50148
- operator: 'EQ',
50149
- operatorName: '等于',
50150
- rules: 'normal'
50151
- };
50152
- case 'SELECT_INPUT':
50153
- return {
50154
- operator: 'SUB_PATTERN',
50155
- operatorName: '符合模式(截断)',
50156
- rules: 'sub_pattern'
50157
- };
50158
- case 'NUMBER':
50159
- return {
50160
- operator: 'BETWEEN_CLOSE',
50161
- operatorName: '介于(闭区间)',
50162
- rules: 'between'
50163
- };
50164
- case 'DATE':
50165
- return {
50166
- operator: type === 'DATE_M' ? 'EQ' : 'BETWEEN_CLOSE',
50167
- operatorName: type === 'DATE_M' ? '等于' : '介于(闭区间)',
50168
- rules: type === 'DATE_M' ? 'defalut' : 'between'
50169
- };
50170
- }
50171
- return null;
50172
- }
50173
- function configQueryMap$1(data, query) {
50174
- var obj = {};
50175
- data.forEach(function (item) {
50176
- if (!item.groupName || item.groupName === '商品基本属性' || item.groupName === '商品 SKU 属性') {
50177
- obj = _objectSpread2(_objectSpread2({}, obj), {}, _defineProperty({}, item.itemId, _objectSpread2(_objectSpread2({}, QUERY_MAP$1[item.itemId]), {}, {
50178
- type: item.type,
50179
- moduleType: item.moduleType,
50180
- dataSource: item.configs,
50181
- newStatus: item.newStatus,
50182
- // status: item.newStatus,
50183
- tagsFlag: null
50184
- })));
50185
- } else {
50186
- var optObj = {};
50187
- if (item.moduleType !== 'NO_VALUE') {
50188
- optObj = queryTypeMap$1(item.moduleType, item.type);
50189
- } else if (query[item.itemId]) {
50190
- var id = query[item.itemId];
50191
- optObj.operator = TAG_NULL_MAP$1[id].value;
50192
- optObj.operatorName = TAG_NULL_MAP$1[id].label;
50193
- optObj.rules = 'noValue';
50194
- }
50195
- obj = _objectSpread2(_objectSpread2({}, obj), {}, _defineProperty({}, item.itemId, _objectSpread2({
50196
- field: item.itemId,
50197
- desc: item.itemName,
50198
- tagsFlag: 'tags',
50199
- type: item.type,
50200
- moduleType: item.moduleType,
50201
- dataSource: item.configs,
50202
- newStatus: item.newStatus
50203
- }, optObj)));
50204
- }
50205
- });
50206
- return obj;
50207
- }
50208
-
50209
- /**
50210
- * 数组去重
50211
- */
50212
- function unique$1(array) {
50213
- var keyFn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (item) {
50214
- return item;
50215
- };
50216
- var hash = {};
50217
- var result = [];
50218
- array.forEach(function (item) {
50219
- var key = keyFn(item);
50220
- if (key in hash) return;
50221
- result.push(item);
50222
- hash[key] = null;
50223
- });
50224
- return result;
50225
- }
50226
- function genPlatShopValue$1(platList, shopList, platShop) {
50227
- var _platCode = platShop.platCode,
50228
- _shopId = platShop.shopId;
50229
- var defaultPlat = platList[0] && platList[0].platCode;
50230
- var platCode = platList.find(function (plat) {
50231
- return plat.platCode === _platCode;
50232
- }) ? _platCode : defaultPlat;
50233
- var defaultShop = (shopList.find(function (shop) {
50234
- return shop.platCode === platCode;
50235
- }) || {}).shopId;
50236
- var shopId = shopList.find(function (shop) {
50237
- return shop.shopId === _shopId;
50238
- }) ? _shopId : defaultShop;
50239
- return {
50240
- shopId: shopId,
50241
- platCode: platCode
50242
- };
50243
- }
50244
-
50245
- /**
50246
- * 全部商品tab-请求参数转化
50247
- * @param {*} data 需要转化的数据
50248
- * @param {*} config 配置项枚举信息
50249
- */
50250
- function allTabFormatting$1(config, data) {
50251
- var arr = [];
50252
- Object.keys(data).forEach(function (item) {
50253
- if (config[item]) {
50254
- var obj = {
50255
- field: config[item].field,
50256
- fieldName: config[item].desc,
50257
- configName: item,
50258
- tagsFlag: config[item].tagsFlag,
50259
- operator: config[item].operator,
50260
- operatorName: config[item].operatorName
50261
- };
50262
- switch (config[item].rules) {
50263
- case 'normal':
50264
- if (data[item]) {
50265
- if (config[item].type === 'SINGLE') {
50266
- obj.value = [data[item].value];
50267
- obj.semantic = [data[item].label];
50268
- } else {
50269
- var ids = [];
50270
- var names = [];
50271
- data[item].forEach(function (str) {
50272
- ids.push(str.id);
50273
- names.push(str.name);
50274
- });
50275
- obj.semantic = names;
50276
- obj.value = config[item].tagsFlag ? names : ids;
50277
- }
50278
- }
50279
- break;
50280
- case 'between':
50281
- data[item].start = "".concat(data[item].start);
50282
- data[item].end = "".concat(data[item].end);
50283
- if (data[item].datetype) {
50284
- obj.relative = data[item].datetype;
50285
- }
50286
- if (data[item].dateUnit) {
50287
- obj.timeUnit = data[item].dateUnit;
50288
- }
50289
- if (data[item].start || data[item].end) {
50290
- obj.value = [data[item].start, data[item].end];
50291
- obj.semantic = [data[item].start, data[item].end];
50292
- }
50293
- break;
50294
- case 'split':
50295
- if (data[item]) {
50296
- var _value = data[item].replace(reg$1, '\\\'');
50297
- obj.value = _value.split(',');
50298
- obj.semantic = data[item].split(',');
50299
- }
50300
- break;
50301
- case 'sub_pattern':
50302
- if (data[item]) {
50303
- if (typeof data[item] === 'string') {
50304
- var _value2 = data[item].replace(reg$1, '\\\'');
50305
- obj.value = [_value2];
50306
- var val = data[item].split(':');
50307
- if (val.length > 1) {
50308
- obj.semantic = ["\u622A\u53D6".concat(val[0], "\u81F3").concat(val[1], "\u4F4D\uFF0C\u5B57\u7B26\u662F").concat(val[2])];
50309
- } else {
50310
- obj.operatorName = '等于';
50311
- obj.semantic = [data[item]];
50312
- }
50313
- }
50314
- }
50315
- break;
50316
- default:
50317
- if (data[item]) {
50318
- if (config[item].field === 'platCode') {
50319
- // 假如平台code标识,需要找出平台名称
50320
- data.platList.forEach(function (val) {
50321
- if (val.platCode === data[item]) {
50322
- obj.semantic = [val.platName];
50323
- obj.value = [data[item]];
50324
- }
50325
- });
50326
- } else if (config[item].field === 'shopId') {
50327
- // 假如是店铺ID标识,需要找出店铺名称
50328
- data.shopList.forEach(function (val) {
50329
- if (val.shopId === data[item]) {
50330
- obj.semantic = [val.shopName];
50331
- obj.value = [data[item]];
50332
- }
50333
- });
50334
- } else if (config[item].moduleType === 'SELECT' || config[item].moduleType === 'DATE') {
50335
- if (config[item].type === 'SINGLE') {
50336
- var _list = config[item].dataSource.filter(function (el) {
50337
- return el.value === data[item];
50338
- });
50339
- obj.semantic = [_list[0].label];
50340
- obj.value = config[item].tagsFlag ? [_list[0].label] : [_list[0].value];
50341
- } else if (config[item].type === 'MULTIPLE' || config[item].type === 'DATE_M') {
50342
- var values = data[item] && data[item].map(function (el) {
50343
- var findTemp = config[item].dataSource.find(function (innerItem) {
50344
- return innerItem.value === el;
50345
- });
50346
- return (findTemp || {}).label;
50347
- });
50348
- obj.value = values;
50349
- obj.semantic = values;
50350
- } else if (config[item].moduleType === 'N0_VALUE') {
50351
- obj.semantic = NULL_MAP$1[data[item]].label;
50352
- obj.value = [data[item]];
50353
- obj.operator = NULL_MAP$1[data[item]].value;
50354
- obj.operatorName = NULL_MAP$1[data[item]].label;
50355
- } else {
50356
- obj.semantic = [data[item]];
50357
- obj.value = [data[item]];
50358
- }
50359
- } else {
50360
- obj.semantic = [data[item]];
50361
- var _value3 = data[item].replace(reg$1, '\\\'');
50362
- obj.value = [_value3];
50363
- }
50364
- }
50365
- }
50366
- arr.push(obj);
50367
- }
50368
- });
50369
- /**
50370
- *
50371
- */
50372
- return arr.filter(function (item) {
50373
- return item.value && item.value.length >= 1;
50374
- });
50375
- }
50376
-
50377
- /**
50378
- * 商品选择tab窗口,根据筛选条件格式化数据
50379
- * @param {*} data
50380
- */
50381
- function parsingNewCondition(data) {
50382
- var arr = [];
50383
- var list = ['shopId', 'prod.outer_id', 'sku.outer_id', 'prod.product_id', 'sku.sku_id', 'prod.online_time', 'prod.status'];
50384
- data.forEach(function (item) {
50385
- var obj = {
50386
- field: '',
50387
- fieldName: '',
50388
- operator: '',
50389
- operatorName: '',
50390
- semantic: [],
50391
- value: []
50392
- };
50393
- obj.tagsFlag = item.field.groupName ? 'tags' : null;
50394
- obj.field = item.field.field;
50395
- obj.fieldName = item.field.desc;
50396
- obj.operator = item.operator.value;
50397
- obj.operatorName = item.operator.label;
50398
- if (list.includes(item.field.field)) {
50399
- switch (item.field.field) {
50400
- case 'shopId':
50401
- // 上架店铺(需要解析出平台code)
50402
- if (item.value) {
50403
- arr.push({
50404
- field: 'platCode',
50405
- fieldName: '平台名称',
50406
- operator: item.operator.value,
50407
- operatorName: '等于',
50408
- semantic: [item.value.plat.label],
50409
- value: [item.value.plat.value]
50410
- });
50411
- obj.semantic = item.value.shops.map(function (shop) {
50412
- return shop.label;
50413
- });
50414
- obj.value = item.value.shops.map(function (shop) {
50415
- return shop.value;
50416
- });
50417
- }
50418
- break;
50419
- case 'prod.outer_id': // 商品商家编码
50420
- case 'sku.outer_id':
50421
- // sku商家编码
50422
- if (item.value) {
50423
- if (item.operator.value === 'SUB_PATTERN') {
50424
- // 如果是截断模式
50425
- obj.value = ["".concat(item.value.begin, ":").concat(item.value.end, ":").concat(item.value.value.replace(reg$1, '\\\''))];
50426
- obj.semantic = ["\u622A\u53D6".concat(item.value.begin, "\u81F3").concat(item.value.end, "\u4F4D,\u5B57\u7B26\u662F").concat(item.value.value)];
50427
- } else if (Array.isArray(item.value)) {
50428
- obj.semantic = item.value.filter(function (val) {
50429
- return val !== '';
50430
- });
50431
- obj.value = item.value.filter(function (val) {
50432
- return val !== '';
50433
- }).map(function (val) {
50434
- return val.replace(reg$1, '\\\'');
50435
- });
50436
- } else {
50437
- obj.semantic = [item.value];
50438
- obj.value = [item.value.replace(reg$1, '\\\'')];
50439
- }
50440
- } else if (nullList$1.includes(item.operator.value)) {
50441
- obj.value = [NULL_MAP$1[item.operator.value].value];
50442
- obj.semantic = [NULL_MAP$1[item.operator.value].label];
50443
- }
50444
- break;
50445
- case 'prod.product_id':
50446
- case 'sku.sku_id':
50447
- if (item.value) {
50448
- if (Array.isArray(item.value)) {
50449
- obj.semantic = item.value.filter(function (val) {
50450
- return val !== '';
50451
- });
50452
- obj.value = item.value.filter(function (val) {
50453
- return val !== '';
50454
- }).map(function (val) {
50455
- return val.replace(reg$1, '\\\'');
50456
- });
50457
- } else {
50458
- obj.semantic = [item.value];
50459
- obj.value = [item.value.replace(reg$1, '\\\'')];
50460
- }
50461
- }
50462
- break;
50463
- case 'prod.online_time':
50464
- if (item.operator.value === 'BETWEEN_RELATIVE') {
50465
- obj.relative = 'relative';
50466
- obj.operator = 'BETWEEN_CLOSE';
50467
- obj.operatorName = '介于(闭区间)';
50468
- if (item.value) {
50469
- if (item.value.value) {
50470
- obj.value = item.value.value;
50471
- obj.semantic = item.value.value;
50472
- }
50473
- if (item.value.timeUnit) {
50474
- obj.timeUnit = item.value.timeUnit;
50475
- }
50476
- }
50477
- }
50478
- break;
50479
- case 'prod.status':
50480
- obj.value = item.value;
50481
- var values = item.value.map(function (el) {
50482
- var findTemp = item.field.dataSource.find(function (innerItem) {
50483
- return innerItem.value === el;
50484
- });
50485
- return (findTemp || {
50486
- label: el
50487
- }).label;
50488
- });
50489
- obj.semantic = values;
50490
- break;
50491
- }
50492
- } else {
50493
- switch (item.field.type) {
50494
- case 'NO_VALUE':
50495
- // 无值类
50496
- obj.semantic = [item.operator.label];
50497
- obj.value = [item.operator.value];
50498
- break;
50499
- case 'DATE_YMD': // 年月日
50500
- case 'DATE_MD':
50501
- // 月日
50502
- if (item.value) {
50503
- if (item.operator.value === 'BETWEEN_CLOSE' || item.operator.value === 'BETWEEN_OPEN') {
50504
- // 假如是区间类型
50505
- obj.value = item.value ? [item.value.start || '', item.value.end || ''] : [item.value];
50506
- obj.semantic = item.value ? [item.value.start || '', item.value.end || ''] : [item.value];
50507
- } else if (nullList$1.includes(item.operator.value)) {
50508
- obj.value = [NULL_MAP$1[item.operator.value].value];
50509
- obj.semantic = [NULL_MAP$1[item.operator.value].label];
50510
- } else {
50511
- obj.value = item.value ? [item.value] : [''];
50512
- obj.semantic = item.value ? [item.value] : [''];
50513
- }
50514
- } else if (nullList$1.includes(item.operator.value)) {
50515
- obj.value = [NULL_MAP$1[item.operator.value].value];
50516
- obj.semantic = [NULL_MAP$1[item.operator.value].label];
50517
- }
50518
- break;
50519
- case 'DATE_M':
50520
- // 月
50521
- if (item.value) {
50522
- obj.value = item.value;
50523
- obj.semantic = item.value.map(function (el) {
50524
- var findTemp = item.field.dataSource.find(function (innerItem) {
50525
- return Number(innerItem.value) === Number(el);
50526
- });
50527
- return (findTemp || {
50528
- label: el
50529
- }).label;
50530
- });
50531
- } else if (nullList$1.includes(item.operator.value)) {
50532
- obj.value = [NULL_MAP$1[item.operator.value].value];
50533
- obj.semantic = [NULL_MAP$1[item.operator.value].label];
50534
- }
50535
- break;
50536
- case 'CATEGORY_SELECT_TREE':
50537
- obj.field = item.field.field;
50538
- obj.fieldName = item.field.desc;
50539
- obj.operator = item.operator.value;
50540
- obj.operatorName = item.operator.label;
50541
- if (item.value) {
50542
- var categoriesIds = [];
50543
- var categoriesName = [];
50544
- item.value.categories.forEach(function (str) {
50545
- categoriesIds.push(str.id);
50546
- categoriesName.push(str.name);
50547
- });
50548
- obj.semantic = categoriesName;
50549
- obj.value = categoriesIds;
50550
- } else if (item.operator.value === 'ISNULL') {
50551
- obj.semantic = ['为空'];
50552
- obj.value = ['ISNULL'];
50553
- } else if (item.operator.value === 'NONULL') {
50554
- obj.semantic = ['不为空'];
50555
- obj.value = ['NONULL'];
50556
- }
50557
- break;
50558
- case 'SELECT_MULTIPLE_TREE':
50559
- // 下拉树多选
50560
- if (item.value) {
50561
- var ids = [];
50562
- var names = [];
50563
- var _list = item.value;
50564
- _list.forEach(function (str) {
50565
- ids.push(str.id);
50566
- names.push(str.name);
50567
- });
50568
- obj.semantic = names;
50569
- obj.value = names;
50570
- } else if (nullList$1.includes(item.operator.value)) {
50571
- obj.value = [NULL_MAP$1[item.operator.value].label];
50572
- obj.semantic = [NULL_MAP$1[item.operator.value].label];
50573
- }
50574
- break;
50575
- case 'SELECT_TREE':
50576
- // 下拉树单选
50577
- if (item.value) {
50578
- obj.semantic = [item.field.label];
50579
- obj.value = [item.field.label];
50580
- } else if (nullList$1.includes(item.operator.value)) {
50581
- obj.value = [NULL_MAP$1[item.operator.value].value];
50582
- obj.semantic = [NULL_MAP$1[item.operator.value].label];
50583
- }
50584
- break;
50585
- case 'MULTIPLE_SELECT':
50586
- // 下拉多选
50587
- if (item.value) {
50588
- var _item$value;
50589
- var _values = (_item$value = item.value) === null || _item$value === void 0 ? void 0 : _item$value.map(function (el) {
50590
- var findTemp = item.field.dataSource.find(function (innerItem) {
50591
- return innerItem.value === el;
50592
- });
50593
- return (findTemp || {
50594
- label: el
50595
- }).label;
50596
- });
50597
- obj.value = _values;
50598
- obj.semantic = _values;
50599
- } else if (nullList$1.includes(item.operator.value)) {
50600
- obj.value = [NULL_MAP$1[item.operator.value].value];
50601
- obj.semantic = [NULL_MAP$1[item.operator.value].label];
50602
- }
50603
- break;
50604
- case 'SELECT':
50605
- // 下拉单选
50606
- if (item.value !== undefined) {
50607
- obj.value = [item.value];
50608
- var _list3 = item.field.dataSource.filter(function (el) {
50609
- return el.value === item.value;
50610
- });
50611
- obj.semantic = [_list3[0].label];
50612
- } else if (nullList$1.includes(item.operator.value)) {
50613
- obj.value = [NULL_MAP$1[item.operator.value].value];
50614
- obj.semantic = [NULL_MAP$1[item.operator.value].label];
50615
- }
50616
- break;
50617
- case 'NUMBER_INT': // 整数
50618
- case 'NUMBER_DECIMAL':
50619
- // 小数
50620
- if (item.value || item.value === 0) {
50621
- obj.semantic = Array.isArray(item.value) ? item.value : [item.value];
50622
- obj.value = Array.isArray(item.value) ? item.value : [item.value];
50623
- } else if (nullList$1.includes(item.operator.value)) {
50624
- obj.value = [NULL_MAP$1[item.operator.value].value];
50625
- obj.semantic = [NULL_MAP$1[item.operator.value].label];
50626
- }
50627
- break;
50628
- case 'STRING':
50629
- // 字符
50630
- if (item.value) {
50631
- if (item.operator.value === 'LIKE') {
50632
- // 假如是like操作还需要区分出或者还是并且的关系
50633
- obj.value = item.value.value.map(function (val) {
50634
- return val.replace(reg$1, '\\\'');
50635
- });
50636
- obj.multiText = item.value.relation ? 'AND' : 'OR';
50637
- obj.semantic = item.value;
50638
- } else if (Array.isArray(item.value)) {
50639
- obj.semantic = item.value.filter(function (val) {
50640
- return val !== '';
50641
- });
50642
- obj.value = item.value.filter(function (val) {
50643
- return val !== '';
50644
- }).map(function (val) {
50645
- return val.replace(reg$1, '\\\'');
50646
- });
50647
- } else {
50648
- obj.semantic = [item.value];
50649
- obj.value = [item.value.replace(reg$1, '\\\'')];
50650
- }
50651
- } else if (nullList$1.includes(item.operator.value)) {
50652
- obj.value = [NULL_MAP$1[item.operator.value].value];
50653
- obj.semantic = [NULL_MAP$1[item.operator.value].label];
50654
- }
50655
- break;
50656
- }
50657
- }
50658
- arr.push(obj);
50659
- });
50660
- return arr;
50661
- }
50662
- function queryConditionToStringNew(array) {
50663
- var obj = {
50664
- str: [],
50665
- title: [],
50666
- value: parsingNewCondition(array).filter(function (item) {
50667
- return item.value.length || item.operator === "ISNULL" || item.operator === "NONULL";
50668
- })
50669
- };
50670
- return obj;
50671
- }
50672
-
50673
- /**
50674
- * 计算已选商品和sku的数量
50675
- * @param {*} Object || Array
50676
- */
50677
- function resultGoodsLength$1(obj) {
50678
- // TODO SELECT
50679
- var len = 0;
50680
- if (Array.isArray(obj)) {
50681
- if (obj.length) {
50682
- obj.forEach(function (item) {
50683
- if (item.rowExpandable) {
50684
- len += item.skus.length;
50685
- } else {
50686
- len += 1;
50687
- }
50688
- });
50689
- }
50690
- } else {
50691
- Object.keys(obj).forEach(function (item) {
50692
- if (obj[item].rowExpandable) {
50693
- // 假如是sku展开状态则商品数量以sku数量为准
50694
- len += obj[item].skus.length;
50695
- } else {
50696
- len += 1;
50697
- }
50698
- });
50699
- }
50700
- return len;
50701
- }
50702
-
50703
50736
  // 动态条件
50704
50737
  function DynamicCondition(props) {
50705
50738
  var _useState = React.useState([]),
@@ -50846,7 +50879,7 @@
50846
50879
  return /*#__PURE__*/React__default['default'].createElement("div", {
50847
50880
  className: "".concat(prefixCls, "-rule-group")
50848
50881
  }, /*#__PURE__*/React__default['default'].createElement("div", {
50849
- className: "".concat(prefixCls, "-rule-group-title-new")
50882
+ className: "".concat(prefixCls, "-rule-group-title")
50850
50883
  }, /*#__PURE__*/React__default['default'].createElement("span", {
50851
50884
  style: {
50852
50885
  display: 'flex'
@@ -50872,7 +50905,7 @@
50872
50905
  currentRule: props.currentRule,
50873
50906
  setCurrentRule: props.setDynamicCondition
50874
50907
  }, /*#__PURE__*/React__default['default'].createElement("div", {
50875
- className: "condition-tab-wrap goods-table-wrap"
50908
+ className: "edit-condition ".concat(prefixCls, "-goods-selector-new-goods-table-wrap")
50876
50909
  }, /*#__PURE__*/React__default['default'].createElement(Conditions$1.Form, null))) : /*#__PURE__*/React__default['default'].createElement(cloudReactV2.Loading, null));
50877
50910
  }
50878
50911
 
@@ -51136,7 +51169,7 @@
51136
51169
  maxWidth: "570px"
51137
51170
  }
51138
51171
  }, /*#__PURE__*/React__default['default'].createElement("div", {
51139
- className: "".concat(prefixCls, "-goods-selector-pro-create-history-new")
51172
+ className: "".concat(prefixCls, "-goods-selector-new-create-condition")
51140
51173
  }, /*#__PURE__*/React__default['default'].createElement(cloudReactV2.Tips, {
51141
51174
  icon: "info-circle1",
51142
51175
  msg: "<div><div>1. \u53EF\u521B\u5EFA\u548C\u4FDD\u5B58\u6700\u8FD1\u768430\u4E2A\u5546\u54C1\u67E5\u8BE2\u6761\u4EF6\uFF1B\u8D85\u8FC730\u4E2A\u65F6\uFF0C\u7CFB\u7EDF\u5C06\u6309\u4ECE\u65E9\u53CA\u665A\u89C4\u5219\u5220\u9664\u3002</div><div>2. \u4FDD\u5B58\u6210\u529F\u540E\uFF0C\u53EF\u70B9\u51FB\u3010\u5E38\u7528\u67E5\u8BE2\u6761\u4EF6\u3011\u627E\u5230\u4FDD\u5B58\u8FC7\u7684\u67E5\u8BE2\u6761\u4EF6\u3002</div></div>",
@@ -51607,7 +51640,7 @@
51607
51640
  initData();
51608
51641
  };
51609
51642
  var footer = /*#__PURE__*/React__default['default'].createElement("div", {
51610
- className: "goods-selector-pro-node-new-footer"
51643
+ className: "".concat(prefixCls, "-goods-selector-new-footer")
51611
51644
  }, !props.readonly ? /*#__PURE__*/React__default['default'].createElement(cloudReactV2.Button, {
51612
51645
  className: "cancel",
51613
51646
  onClick: closePop
@@ -52690,7 +52723,7 @@
52690
52723
  }
52691
52724
  }), "\u53EF\u5C06\u5E38\u7528\u7684\u67E5\u8BE2\u6761\u4EF6\u8BBE\u4E3A\u9ED8\u8BA4\uFF0C\u9ED8\u8BA4\u7684\u67E5\u8BE2\u6761\u4EF6\u5C06\u88AB\u56FA\u5B9A\u5728\u5546\u54C1\u641C\u7D22\u6761\u4EF6\u7684\u754C\u9762\u4E0A\u3002");
52692
52725
  return /*#__PURE__*/React__default['default'].createElement("div", {
52693
- className: "newCloud-add-condition"
52726
+ className: "add-condition-new"
52694
52727
  }, /*#__PURE__*/React__default['default'].createElement(cloudReactV2.Tips, {
52695
52728
  msg: tipNode
52696
52729
  }), /*#__PURE__*/React__default['default'].createElement("div", {
@@ -53785,7 +53818,7 @@
53785
53818
  // const hiddenDisplayQuery = usedQuery.slice(6);
53786
53819
 
53787
53820
  var footer = /*#__PURE__*/React__default['default'].createElement("div", {
53788
- className: "goods-selector-pro-node-new-footer"
53821
+ className: "".concat(prefixCls, "-goods-selector-new-footer")
53789
53822
  }, !props.readonly ? /*#__PURE__*/React__default['default'].createElement(cloudReactV2.Button, {
53790
53823
  className: "cancel",
53791
53824
  onClick: handleClose
@@ -53798,7 +53831,7 @@
53798
53831
  onClick: handleOk
53799
53832
  }, "\u786E\u5B9A"));
53800
53833
  return /*#__PURE__*/React__default['default'].createElement("div", {
53801
- className: "goods-selector-pro-form-new"
53834
+ className: "".concat(prefixCls, "-goods-selector-new-goods-form")
53802
53835
  }, dropDown && usedQuery.length ? usedQuery.map(function (item) {
53803
53836
  var itemId = item.itemId,
53804
53837
  itemName = item.itemName,
@@ -54632,7 +54665,7 @@
54632
54665
  setColumns(ctxValue.globalSelectColumn);
54633
54666
  }, [ctxValue.globalSelectColumn]);
54634
54667
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", {
54635
- className: "newCloud-goods-table-wrap"
54668
+ className: "".concat(prefixCls, "-goods-selector-new-goods-table-wrap")
54636
54669
  }, allQuery.length ? /*#__PURE__*/React__default['default'].createElement(GoodsForm$1, {
54637
54670
  platShop: platShop,
54638
54671
  platShopList: platShopList,
@@ -54948,7 +54981,7 @@
54948
54981
  setColumns(ctxValue.globalSelectColumn);
54949
54982
  }, [ctxValue.globalSelectColumn]);
54950
54983
  return /*#__PURE__*/React__default['default'].createElement("div", {
54951
- className: "cloud-select-tab-wrap-new newCloud-goods-table-wrap"
54984
+ className: "".concat(prefixCls, "-goods-selector-new-selected-tab ").concat(prefixCls, "-goods-selector-new-goods-table-wrap")
54952
54985
  }, /*#__PURE__*/React__default['default'].createElement("div", {
54953
54986
  className: "justify-between"
54954
54987
  }, /*#__PURE__*/React__default['default'].createElement("div", {
@@ -55131,18 +55164,9 @@
55131
55164
  }();
55132
55165
  var onClose = function onClose() {
55133
55166
  props.onClose(globalSelect);
55134
- // setCurrentPageNum(1),
55135
- // setCurrentPageSize(10)
55136
55167
  };
55137
-
55138
- // const footer = <>
55139
- // {!props.readonly ? <Button style={{ marginRight: 16 }} className="cancel-btn" onClick={onCancel}>取消</Button> : null}
55140
- // <Button type="primary" onClick={onOk}>确定</Button>
55141
-
55142
- // </>;
55143
-
55144
55168
  var footer = /*#__PURE__*/React__default['default'].createElement("div", {
55145
- className: "goods-selector-pro-node-new-footer"
55169
+ className: "".concat(prefixCls, "-goods-selector-new-footer")
55146
55170
  }, !props.readonly ? /*#__PURE__*/React__default['default'].createElement(cloudReactV2.Button, {
55147
55171
  className: "cancel",
55148
55172
  onClick: onCancel
@@ -55165,7 +55189,7 @@
55165
55189
  }, /*#__PURE__*/React__default['default'].createElement(GoodsProvider$1, {
55166
55190
  value: props.ctxContext
55167
55191
  }, /*#__PURE__*/React__default['default'].createElement("div", {
55168
- className: "".concat(prefixCls, "-goods-selector-pro-container-new"),
55192
+ className: "".concat(prefixCls, "-goods-selector-new-goods-modal"),
55169
55193
  style: {
55170
55194
  position: 'relative'
55171
55195
  }
@@ -55178,7 +55202,7 @@
55178
55202
  })
55179
55203
  }) : null, /*#__PURE__*/React__default['default'].createElement(cloudReactV2.Tabs, {
55180
55204
  defaultActiveKey: "all",
55181
- className: "".concat(prefixCls, "-goods-selector-pro-new"),
55205
+ className: "".concat(prefixCls, "-goods-selector-new-goods-modal-tabs"),
55182
55206
  activeKey: nowActive,
55183
55207
  mode: "remain",
55184
55208
  type: "line",
@@ -55186,7 +55210,7 @@
55186
55210
  }, tabList.includes('all') && !readonly && /*#__PURE__*/React__default['default'].createElement(cloudReactV2.Tabs.Panel, {
55187
55211
  tab: "\u5168\u90E8\u5546\u54C1",
55188
55212
  key: "all",
55189
- className: "".concat(prefixCls, "-goods-selector-pro-new-panel")
55213
+ className: "".concat(prefixCls, "-goods-selector-new-goods-modal-tabs-panel")
55190
55214
  }, /*#__PURE__*/React__default['default'].createElement(AllGoods$1, _extends({
55191
55215
  tabActive: nowActive
55192
55216
  }, props, {
@@ -55195,7 +55219,7 @@
55195
55219
  }))), tabList.includes('selected') && /*#__PURE__*/React__default['default'].createElement(cloudReactV2.Tabs.Panel, {
55196
55220
  tab: "\u5DF2\u9009\u5546\u54C1",
55197
55221
  key: "selected",
55198
- className: "".concat(prefixCls, "-goods-selector-pro-new-panel")
55222
+ className: "".concat(prefixCls, "-goods-selector-new-goods-modal-tabs-panel")
55199
55223
  }, /*#__PURE__*/React__default['default'].createElement(SelectGoods$2, {
55200
55224
  server: server,
55201
55225
  extraQuery: extraQuery,
@@ -55455,7 +55479,7 @@
55455
55479
  return /*#__PURE__*/React__default['default'].createElement("div", {
55456
55480
  className: "".concat(prefixCls, "-rule-group")
55457
55481
  }, /*#__PURE__*/React__default['default'].createElement("div", {
55458
- className: "".concat(prefixCls, "-rule-group-title-new")
55482
+ className: "".concat(prefixCls, "-rule-group-title")
55459
55483
  }, /*#__PURE__*/React__default['default'].createElement("span", {
55460
55484
  style: {
55461
55485
  display: 'flex'
@@ -56254,9 +56278,9 @@
56254
56278
  supportSku: props.supportSku,
56255
56279
  showPage: showPage
56256
56280
  })))), tabList.includes('find') ? /*#__PURE__*/React__default['default'].createElement("div", {
56257
- className: "".concat(prefixCls, "-goods-selector-pro-container")
56281
+ className: "".concat(prefixCls, "-goods-selector-new-goods-modal")
56258
56282
  }, /*#__PURE__*/React__default['default'].createElement("div", {
56259
- className: "".concat(prefixCls, "-good-rules-container")
56283
+ className: "".concat(prefixCls, "-goods-selector-new-rules-container")
56260
56284
  }, !props.supportConditionsOnlyGoods && /*#__PURE__*/React__default['default'].createElement(cloudReactV2.Tips, {
56261
56285
  icon: "info-circle1",
56262
56286
  msg: "\u540C\u65F6\u4FDD\u5B58\u5546\u54C1\u67E5\u8BE2\u548C\u6761\u4EF6\u67E5\u8BE2\uFF0C\u67E5\u8BE2\u7ED3\u679C\u4E3A\u4E24\u8005\u7684\u5E76\u96C6\u3002",
@@ -56361,7 +56385,7 @@
56361
56385
  renameData: renameData,
56362
56386
  ctxValue: ctxValue
56363
56387
  }))) : /*#__PURE__*/React__default['default'].createElement("div", {
56364
- className: "".concat(prefixCls, "-goods-selector-pro-container-new"),
56388
+ className: "".concat(prefixCls, "-goods-selector-new-goods-modal"),
56365
56389
  style: {
56366
56390
  position: 'relative'
56367
56391
  }
@@ -56374,7 +56398,7 @@
56374
56398
  })
56375
56399
  }) : null, /*#__PURE__*/React__default['default'].createElement(cloudReactV2.Tabs, {
56376
56400
  defaultActiveKey: "1",
56377
- className: "".concat(prefixCls, "-goods-selector-pro-new"),
56401
+ className: "".concat(prefixCls, "-goods-selector-new-goods-modal-tabs"),
56378
56402
  activeKey: nowActive,
56379
56403
  mode: "remain",
56380
56404
  type: "line",
@@ -56382,7 +56406,7 @@
56382
56406
  }, tabList.includes('all') && !props.readonly && /*#__PURE__*/React__default['default'].createElement(cloudReactV2.Tabs.Panel, {
56383
56407
  tab: "\u5168\u90E8\u5546\u54C1",
56384
56408
  key: "all",
56385
- className: "".concat(prefixCls, "-goods-selector-pro-new-panel")
56409
+ className: "".concat(prefixCls, "-goods-selector-new-goods-modal-tab-panel")
56386
56410
  }, /*#__PURE__*/React__default['default'].createElement(AllGoods$1, _extends({}, props, {
56387
56411
  tabActive: nowActive,
56388
56412
  changeCondition: changeCondition,
@@ -56390,7 +56414,7 @@
56390
56414
  }))), tabList.includes('selected') && /*#__PURE__*/React__default['default'].createElement(cloudReactV2.Tabs.Panel, {
56391
56415
  tab: "\u5DF2\u9009\u5546\u54C1",
56392
56416
  key: "selected",
56393
- className: "".concat(prefixCls, "-goods-selector-pro-new-panel")
56417
+ className: "".concat(prefixCls, "-goods-selector-new-goods-modal-tabs-panel")
56394
56418
  }, /*#__PURE__*/React__default['default'].createElement(SelectGoods$2, {
56395
56419
  server: server,
56396
56420
  extraQuery: extraQuery,
@@ -56591,7 +56615,7 @@
56591
56615
  setModalVisible(visible);
56592
56616
  }, [visible]);
56593
56617
  var footer = /*#__PURE__*/React__default['default'].createElement("div", {
56594
- className: "goods-selector-pro-node-new-footer"
56618
+ className: "".concat(prefixCls, "-goods-selector-new-footer")
56595
56619
  }, /*#__PURE__*/React__default['default'].createElement(cloudReactV2.Button, {
56596
56620
  className: "cancel",
56597
56621
  onClick: onCancel
@@ -56676,7 +56700,7 @@
56676
56700
  onClose: onClose
56677
56701
  // onCancel={onCancel}
56678
56702
  ,
56679
- className: "goods-selector-pro-node-new"
56703
+ className: "".concat(prefixCls, "-goods-selector-new")
56680
56704
  }, visible && rulesVisible && /*#__PURE__*/React__default['default'].createElement(Rules, _extends({
56681
56705
  modalRef: modalRef,
56682
56706
  forwardRef: ref
@@ -146405,7 +146429,7 @@
146405
146429
  }
146406
146430
  // 检验当前运行环境
146407
146431
  if (typeof window === 'undefined') {
146408
- console.warn('cloud-business@0.1.124-1 仅支持在浏览器环境进行使用!');
146432
+ console.warn('cloud-business@0.1.124-3 仅支持在浏览器环境进行使用!');
146409
146433
  }
146410
146434
  var bodys = document.getElementsByTagName('body')[0];
146411
146435
  var colors = [1, 2, 3, 4, 5, 6, 7];
@@ -146415,7 +146439,7 @@
146415
146439
  bodys.style.setProperty("--shuyunBlue".concat(i$2 + 1), color);
146416
146440
  }
146417
146441
  }
146418
- var version = '0.1.124-1';
146442
+ var version = '0.1.124-3';
146419
146443
 
146420
146444
  exports.AreaSelector = AreaSelector;
146421
146445
  exports.AreaSelectorNew = AreaSelector$1;