dolphin-weex-bc 0.0.22 → 0.0.24

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # 升级日志
2
2
 
3
+ ## 0.0.24
4
+
5
+ - [ ! ] 耗材业务组件购买逻辑优化
6
+ - [ ! ] date: 2026/01/19
7
+
8
+ ## 0.0.23
9
+
10
+ - [ ! ] 耗材业务组件优化方法调用
11
+ - [ ! ] date: 2026/01/16
12
+
3
13
  ## 0.0.22
4
14
 
5
15
  - [ ! ] 新增耗材COLMO组件
@@ -3394,9 +3394,23 @@ var MaterialEvent = {
3394
3394
  it.chartData = _this15.setChartDataColmo(it);
3395
3395
  continue;
3396
3396
  }
3397
- if (it.productCode && it.productCode != 0) tmpcodeList.push(it.productCode);
3397
+ //这里需要对有skuid的耗材进行处理
3398
+ var purchaseInfoPurchaseEnable = it.purchaseInfo && it.purchaseInfo.purchaseEnable;
3399
+ if (purchaseInfoPurchaseEnable && it.purchaseInfo.skuId) {}
3400
+
3401
+ if (purchaseInfoPurchaseEnable && it.purchaseInfo.searchLinkUrl) {
3402
+ //去掉有搜索列表的(优先级最高)
3403
+ } else if (it.productCode && it.productCode != 0) {
3404
+ tmpcodeList.push(it.productCode);
3405
+ }
3406
+
3407
+ //这里需要对有skuid的耗材进行处理
3408
+ var washingServiceEnable = it.serviceSupport && it.serviceSupport.washingService && it.serviceSupport.washingService.enable;
3409
+ if (washingServiceEnable && it.serviceSupport.washingService.skuId) {}
3398
3410
  //对清洗服务里面有productCode的,也需要请求商城那边接口
3399
- if (it.serviceSupport && it.serviceSupport.washingService && it.serviceSupport.washingService.enable && it.serviceSupport.washingService.productCode) {
3411
+ if (washingServiceEnable && it.serviceSupport.washingService.searchLinkUrl) {
3412
+ //去掉有搜索列表的(优先级最高)
3413
+ } else if (washingServiceEnable && it.serviceSupport.washingService.productCode) {
3400
3414
  tmpcodeList.push(it.serviceSupport.washingService.productCode);
3401
3415
  }
3402
3416
  it.chartData = _this15.setChartData(it);
@@ -3770,7 +3784,7 @@ var MaterialEvent = {
3770
3784
 
3771
3785
  this.deviceMaterialList.forEach(function (item, index) {
3772
3786
  item.consumables.forEach(function (it, i) {
3773
- if (it.goodsInfo && (it.goodsInfo.skulink || it.goodsInfo.skuId) || it.purchaseInfo && it.purchaseInfo.linkUrl) {
3787
+ if (it.goodsInfo && (it.goodsInfo.skulink || it.goodsInfo.skuId) || it.purchaseInfo && it.purchaseInfo.linkUrl || it.purchaseInfo && it.purchaseInfo.searchLinkUrl) {
3774
3788
  it.btnType = 1;
3775
3789
  it.btnText = '购买';
3776
3790
  } else {
@@ -3786,7 +3800,7 @@ var MaterialEvent = {
3786
3800
  it.btnType = 2;
3787
3801
  it.btnText = '保养';
3788
3802
  }
3789
- } else if (it.serviceSupport && it.serviceSupport.washingService && it.serviceSupport.washingService.enable && (it.serviceSupport.washingService.serviceUrl || it.washingServiceGoodsInfo && (it.washingServiceGoodsInfo.skulink || it.washingServiceGoodsInfo.skuId))) {
3803
+ } else if (it.serviceSupport && it.serviceSupport.washingService && it.serviceSupport.washingService.enable && (it.serviceSupport.washingService.serviceUrl || it.washingServiceGoodsInfo && (it.washingServiceGoodsInfo.skulink || it.washingServiceGoodsInfo.skuId) || it.serviceSupport.washingService.searchLinkUrl)) {
3790
3804
  it.btnType = 4;
3791
3805
  it.btnText = '清洗';
3792
3806
  }
@@ -3825,82 +3839,6 @@ var MaterialEvent = {
3825
3839
  // 都有type=4的保持原顺序
3826
3840
  return 0;
3827
3841
  },
3828
-
3829
-
3830
- //对材料进行分层排序
3831
- getMaterialSort: function getMaterialSort(tempList) {
3832
- var _this22 = this;
3833
-
3834
- var categorizedDeviceMaterialList = {
3835
- insufficient: [],
3836
- unknown: [],
3837
- sufficient: []
3838
- };
3839
- var insufficientMaterialLength = 0;
3840
- var unknownMaterialLength = 0;
3841
- var sufficientMaterialLength = 0;
3842
-
3843
- var dsposeList = tempList || this.deviceMaterialList;
3844
- dsposeList.forEach(function (device) {
3845
- var categorizedConsumables = {
3846
- insufficient: [],
3847
- unknown: [],
3848
- sufficient: []
3849
- };
3850
-
3851
- device.consumables.forEach(function (consumable) {
3852
- if ((consumable.remainingStatus == 1 || consumable.remainingStatus == 0) && consumable.remainingValue != null && device.deviceInfo.isOnline == 1 && consumable.remainingValueType != 5) {
3853
- categorizedConsumables.insufficient.push(consumable);
3854
- insufficientMaterialLength++;
3855
- } else if (consumable.remainingStatus == 2 && consumable.remainingValue != null && device.deviceInfo.isOnline == 1 && consumable.remainingValueType != 5) {
3856
- categorizedConsumables.sufficient.push(consumable);
3857
- sufficientMaterialLength++;
3858
- } else {
3859
- categorizedConsumables.unknown.push(consumable);
3860
- unknownMaterialLength++;
3861
- }
3862
- });
3863
-
3864
- if (categorizedConsumables.insufficient.length > 0) {
3865
- categorizedDeviceMaterialList.insufficient.push(_extends({}, device, {
3866
- consumables: _this22.sortConsumables(categorizedConsumables.insufficient)
3867
- }));
3868
- }
3869
-
3870
- if (categorizedConsumables.unknown.length > 0) {
3871
- categorizedDeviceMaterialList.unknown.push(_extends({}, device, {
3872
- consumables: categorizedConsumables.unknown
3873
- }));
3874
- }
3875
-
3876
- if (categorizedConsumables.sufficient.length > 0) {
3877
- categorizedDeviceMaterialList.sufficient.push(_extends({}, device, {
3878
- consumables: _this22.sortConsumables(categorizedConsumables.sufficient)
3879
- }));
3880
- }
3881
- });
3882
-
3883
- // 对每个分类进行排序
3884
- categorizedDeviceMaterialList.insufficient.sort(this.sortByRemainingValue);
3885
- categorizedDeviceMaterialList.sufficient.sort(this.sortByRemainingValue);
3886
-
3887
- // 合并三个数组
3888
- var sortedDeviceMaterialList = [].concat(_toConsumableArray(categorizedDeviceMaterialList.insufficient), _toConsumableArray(categorizedDeviceMaterialList.unknown), _toConsumableArray(categorizedDeviceMaterialList.sufficient));
3889
-
3890
- //记录每一种情况下的设备数量
3891
- this.deviceTotal = [categorizedDeviceMaterialList.insufficient.length, categorizedDeviceMaterialList.unknown.length, categorizedDeviceMaterialList.sufficient.length];
3892
- //记录每一种情况下的耗材数量
3893
- this.materialTotal = [insufficientMaterialLength, unknownMaterialLength, sufficientMaterialLength];
3894
- console.log('设备数量哦:' + categorizedDeviceMaterialList.insufficient.length + '---' + categorizedDeviceMaterialList.unknown.length + '---' + categorizedDeviceMaterialList.sufficient.length);
3895
- console.log('耗材数量哦:' + insufficientMaterialLength + '---' + unknownMaterialLength + '---' + sufficientMaterialLength);
3896
-
3897
- return {
3898
- sortedDeviceMaterialList: sortedDeviceMaterialList,
3899
- materialTotal: materialTotal,
3900
- deviceTotal: deviceTotal,
3901
- insufficientList: insufficientList
3902
- };
3903
- },
3904
3842
  setChartData: function setChartData(it) {
3905
3843
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
3906
3844
 
@@ -4019,7 +3957,7 @@ var MaterialEvent = {
4019
3957
 
4020
3958
  //分层排序
4021
3959
  sortHierarchical: function sortHierarchical(data) {
4022
- var _this23 = this;
3960
+ var _this22 = this;
4023
3961
 
4024
3962
  var categorizedDeviceMaterialList = {
4025
3963
  insufficient: [],
@@ -4050,7 +3988,7 @@ var MaterialEvent = {
4050
3988
 
4051
3989
  if (categorizedConsumables.insufficient.length > 0) {
4052
3990
  categorizedDeviceMaterialList.insufficient.push(_extends({}, device, {
4053
- consumables: _this23.sortConsumables(categorizedConsumables.insufficient)
3991
+ consumables: _this22.sortConsumables(categorizedConsumables.insufficient)
4054
3992
  }));
4055
3993
  }
4056
3994
 
@@ -4062,7 +4000,7 @@ var MaterialEvent = {
4062
4000
 
4063
4001
  if (categorizedConsumables.sufficient.length > 0) {
4064
4002
  categorizedDeviceMaterialList.sufficient.push(_extends({}, device, {
4065
- consumables: _this23.sortConsumables(categorizedConsumables.sufficient)
4003
+ consumables: _this22.sortConsumables(categorizedConsumables.sufficient)
4066
4004
  }));
4067
4005
  }
4068
4006
  });
@@ -65626,6 +65564,28 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
65626
65564
  //
65627
65565
  //
65628
65566
  //
65567
+ //
65568
+ //
65569
+ //
65570
+ //
65571
+ //
65572
+ //
65573
+ //
65574
+ //
65575
+ //
65576
+ //
65577
+ //
65578
+ //
65579
+ //
65580
+ //
65581
+ //
65582
+ //
65583
+ //
65584
+ //
65585
+ //
65586
+ //
65587
+ //
65588
+ //
65629
65589
 
65630
65590
  var globalEvent = weex.requireModule('globalEvent');
65631
65591
  var animation = weex.requireModule('animation');
@@ -65677,18 +65637,6 @@ exports.default = {
65677
65637
  type: Boolean,
65678
65638
  default: false
65679
65639
  },
65680
- deviceTotal: {
65681
- type: Array,
65682
- default: function _default() {
65683
- return [];
65684
- }
65685
- },
65686
- materialTotal: {
65687
- type: Array,
65688
- default: function _default() {
65689
- return [];
65690
- }
65691
- },
65692
65640
  isFilterShow: {
65693
65641
  type: Boolean,
65694
65642
  default: false // 是否是分层模式
@@ -65920,10 +65868,10 @@ exports.default = {
65920
65868
  // 1购买
65921
65869
  if (it.btnType == 1) {
65922
65870
  var activeUrl = it.purchaseInfo ? it.purchaseInfo.linkUrl : '';
65923
- var searchPage = it.purchaseInfo ? it.purchaseInfo.searchPage : '';
65924
- if (searchPage) {
65925
- searchPage = searchPage.includes('?') ? searchPage + '&entrance=consumables' : searchPage + '?entrance=consumables';
65926
- this.goodsjumpWebViewNew(searchPage);
65871
+ var searchLinkUrl = it.purchaseInfo ? it.purchaseInfo.searchLinkUrl : '';
65872
+ if (searchLinkUrl) {
65873
+ searchLinkUrl = searchLinkUrl.includes('?') ? searchLinkUrl + '&entrance=consumables' : searchLinkUrl + '?entrance=consumables';
65874
+ this.goodsjumpWebViewNew(searchLinkUrl);
65927
65875
  } else if (it.purchaseInfo && it.purchaseInfo.skuId) {
65928
65876
  this.goToGoodsDetail(it.purchaseInfo);
65929
65877
  } else if (it.goodsInfo && (it.goodsInfo.skulink || it.goodsInfo.skuId)) {
@@ -66016,10 +65964,10 @@ exports.default = {
66016
65964
 
66017
65965
  if (it.serviceSupport && it.serviceSupport.washingService && it.serviceSupport.washingService.enable) {
66018
65966
  var activeUrl = it.serviceSupport.washingService.serviceUrl;
66019
- var searchPage = it.serviceSupport.washingService.searchPage;
66020
- if (searchPage) {
66021
- searchPage = searchPage.includes('?') ? searchPage + '&entrance=consumables' : searchPage + '?entrance=consumables';
66022
- this.goodsjumpWebViewNew(searchPage);
65967
+ var searchLinkUrl = it.serviceSupport.washingService.searchLinkUrl;
65968
+ if (searchLinkUrl) {
65969
+ searchLinkUrl = searchLinkUrl.includes('?') ? searchLinkUrl + '&entrance=consumables' : searchLinkUrl + '?entrance=consumables';
65970
+ this.goodsjumpWebViewNew(searchLinkUrl);
66023
65971
  } else if (it.serviceSupport.washingService.skuId) {
66024
65972
  this.goToGoodsDetail(it.serviceSupport.washingService);
66025
65973
  } else if (it.washingServiceGoodsInfo && (it.washingServiceGoodsInfo.skulink || it.washingServiceGoodsInfo.skuId)) {
@@ -77791,18 +77739,18 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
77791
77739
  width: _vm.width + 'px'
77792
77740
  }
77793
77741
  }, [_vm._l((_vm.deviceMaterialList), function(item, index) {
77794
- return [(_vm.isFilterShow) ? [(index == 0 && (_vm.deviceTotal[0] > 0 || _vm.deviceTotal[0] === ' ')) ? _c('div', {
77795
- key: index,
77742
+ return [(_vm.isFilterShow) ? [(item.categorySort === 'insufficient' && item.categoryNum) ? _c('div', {
77743
+ key: item.applianceCode,
77796
77744
  staticClass: ["l-tittle-insufficient-box"]
77797
77745
  }, [_c('text', {
77798
77746
  class: ['l-tittle', _vm.isDiablo && 'l-tittle-isDiablo']
77799
- }, [_vm._v("耗材不足(" + _vm._s(_vm.materialTotal[0]) + ")")]), _vm._t("filterShowAddCar")], 2) : _vm._e(), (index == _vm.deviceTotal[0] && _vm.deviceTotal[1] > 0) ? _c('text', {
77800
- key: index,
77747
+ }, [_vm._v("耗材不足(" + _vm._s(item.categoryNum) + ")")]), _vm._t("filterShowAddCar")], 2) : _vm._e(), (item.categorySort === 'unknown' && item.categoryNum) ? _c('text', {
77748
+ key: item.applianceCode,
77801
77749
  class: ['l-tittle', _vm.isDiablo && 'l-tittle-isDiablo']
77802
- }, [_vm._v("耗材数据未知(" + _vm._s(_vm.materialTotal[1]) + ")")]) : _vm._e(), (index == _vm.deviceTotal[0] + _vm.deviceTotal[1] && _vm.deviceTotal[2] > 0) ? _c('text', {
77803
- key: index,
77750
+ }, [_vm._v("耗材数据未知(" + _vm._s(item.categoryNum) + ")")]) : _vm._e(), (item.categorySort === 'sufficient' && item.categoryNum) ? _c('text', {
77751
+ key: item.applianceCode,
77804
77752
  class: ['l-tittle', _vm.isDiablo && 'l-tittle-isDiablo']
77805
- }, [_vm._v("耗材充足(" + _vm._s(_vm.materialTotal[2]) + ")")]) : _vm._e()] : _vm._e(), _c('div', {
77753
+ }, [_vm._v("耗材充足(" + _vm._s(item.categoryNum) + ")")]) : _vm._e()] : _vm._e(), _c('div', {
77806
77754
  key: index,
77807
77755
  staticClass: ["material-list"],
77808
77756
  style: {