dolphin-weex-bc 0.0.22 → 0.0.23
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 +5 -0
- package/dist/index.native.js +58 -110
- package/dist/index.native.js.map +1 -1
- package/dist/index.web.js +58 -110
- package/dist/index.web.js.map +1 -1
- package/package.json +1 -1
- package/packages/dof-consumables/index.vue +35 -25
- package/packages/material-event/index.js +23 -112
package/dist/index.web.js
CHANGED
|
@@ -4034,9 +4034,23 @@ var MaterialEvent = {
|
|
|
4034
4034
|
it.chartData = _this15.setChartDataColmo(it);
|
|
4035
4035
|
continue;
|
|
4036
4036
|
}
|
|
4037
|
-
|
|
4037
|
+
//这里需要对有skuid的耗材进行处理
|
|
4038
|
+
var purchaseInfoPurchaseEnable = it.purchaseInfo && it.purchaseInfo.purchaseEnable;
|
|
4039
|
+
if (purchaseInfoPurchaseEnable && it.purchaseInfo.purchaseInfo.skuId) {}
|
|
4040
|
+
|
|
4041
|
+
if (purchaseInfoPurchaseEnable && it.purchaseInfo.purchaseInfo.searchLinkUrl) {
|
|
4042
|
+
//去掉有搜索列表的(优先级最高)
|
|
4043
|
+
} else if (it.productCode && it.productCode != 0) {
|
|
4044
|
+
tmpcodeList.push(it.productCode);
|
|
4045
|
+
}
|
|
4046
|
+
|
|
4047
|
+
//这里需要对有skuid的耗材进行处理
|
|
4048
|
+
var washingServiceEnable = it.serviceSupport && it.serviceSupport.washingService && it.serviceSupport.washingService.enable;
|
|
4049
|
+
if (washingServiceEnable && it.serviceSupport.washingService.skuId) {}
|
|
4038
4050
|
//对清洗服务里面有productCode的,也需要请求商城那边接口
|
|
4039
|
-
if (
|
|
4051
|
+
if (washingServiceEnable && it.serviceSupport.washingService.searchLinkUrl) {
|
|
4052
|
+
//去掉有搜索列表的(优先级最高)
|
|
4053
|
+
} else if (washingServiceEnable && it.serviceSupport.washingService.productCode) {
|
|
4040
4054
|
tmpcodeList.push(it.serviceSupport.washingService.productCode);
|
|
4041
4055
|
}
|
|
4042
4056
|
it.chartData = _this15.setChartData(it);
|
|
@@ -4410,7 +4424,7 @@ var MaterialEvent = {
|
|
|
4410
4424
|
|
|
4411
4425
|
this.deviceMaterialList.forEach(function (item, index) {
|
|
4412
4426
|
item.consumables.forEach(function (it, i) {
|
|
4413
|
-
if (it.goodsInfo && (it.goodsInfo.skulink || it.goodsInfo.skuId) || it.purchaseInfo && it.purchaseInfo.linkUrl) {
|
|
4427
|
+
if (it.goodsInfo && (it.goodsInfo.skulink || it.goodsInfo.skuId) || it.purchaseInfo && it.purchaseInfo.linkUrl || it.purchaseInfo && it.purchaseInfo.searchLinkUrl) {
|
|
4414
4428
|
it.btnType = 1;
|
|
4415
4429
|
it.btnText = '购买';
|
|
4416
4430
|
} else {
|
|
@@ -4426,7 +4440,7 @@ var MaterialEvent = {
|
|
|
4426
4440
|
it.btnType = 2;
|
|
4427
4441
|
it.btnText = '保养';
|
|
4428
4442
|
}
|
|
4429
|
-
} else if (it.serviceSupport && it.serviceSupport.washingService && it.serviceSupport.washingService.enable && (it.serviceSupport.washingService.serviceUrl || it.washingServiceGoodsInfo && (it.washingServiceGoodsInfo.skulink || it.washingServiceGoodsInfo.skuId))) {
|
|
4443
|
+
} 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)) {
|
|
4430
4444
|
it.btnType = 4;
|
|
4431
4445
|
it.btnText = '清洗';
|
|
4432
4446
|
}
|
|
@@ -4465,82 +4479,6 @@ var MaterialEvent = {
|
|
|
4465
4479
|
// 都有type=4的保持原顺序
|
|
4466
4480
|
return 0;
|
|
4467
4481
|
},
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
//对材料进行分层排序
|
|
4471
|
-
getMaterialSort: function getMaterialSort(tempList) {
|
|
4472
|
-
var _this22 = this;
|
|
4473
|
-
|
|
4474
|
-
var categorizedDeviceMaterialList = {
|
|
4475
|
-
insufficient: [],
|
|
4476
|
-
unknown: [],
|
|
4477
|
-
sufficient: []
|
|
4478
|
-
};
|
|
4479
|
-
var insufficientMaterialLength = 0;
|
|
4480
|
-
var unknownMaterialLength = 0;
|
|
4481
|
-
var sufficientMaterialLength = 0;
|
|
4482
|
-
|
|
4483
|
-
var dsposeList = tempList || this.deviceMaterialList;
|
|
4484
|
-
dsposeList.forEach(function (device) {
|
|
4485
|
-
var categorizedConsumables = {
|
|
4486
|
-
insufficient: [],
|
|
4487
|
-
unknown: [],
|
|
4488
|
-
sufficient: []
|
|
4489
|
-
};
|
|
4490
|
-
|
|
4491
|
-
device.consumables.forEach(function (consumable) {
|
|
4492
|
-
if ((consumable.remainingStatus == 1 || consumable.remainingStatus == 0) && consumable.remainingValue != null && device.deviceInfo.isOnline == 1 && consumable.remainingValueType != 5) {
|
|
4493
|
-
categorizedConsumables.insufficient.push(consumable);
|
|
4494
|
-
insufficientMaterialLength++;
|
|
4495
|
-
} else if (consumable.remainingStatus == 2 && consumable.remainingValue != null && device.deviceInfo.isOnline == 1 && consumable.remainingValueType != 5) {
|
|
4496
|
-
categorizedConsumables.sufficient.push(consumable);
|
|
4497
|
-
sufficientMaterialLength++;
|
|
4498
|
-
} else {
|
|
4499
|
-
categorizedConsumables.unknown.push(consumable);
|
|
4500
|
-
unknownMaterialLength++;
|
|
4501
|
-
}
|
|
4502
|
-
});
|
|
4503
|
-
|
|
4504
|
-
if (categorizedConsumables.insufficient.length > 0) {
|
|
4505
|
-
categorizedDeviceMaterialList.insufficient.push(_extends({}, device, {
|
|
4506
|
-
consumables: _this22.sortConsumables(categorizedConsumables.insufficient)
|
|
4507
|
-
}));
|
|
4508
|
-
}
|
|
4509
|
-
|
|
4510
|
-
if (categorizedConsumables.unknown.length > 0) {
|
|
4511
|
-
categorizedDeviceMaterialList.unknown.push(_extends({}, device, {
|
|
4512
|
-
consumables: categorizedConsumables.unknown
|
|
4513
|
-
}));
|
|
4514
|
-
}
|
|
4515
|
-
|
|
4516
|
-
if (categorizedConsumables.sufficient.length > 0) {
|
|
4517
|
-
categorizedDeviceMaterialList.sufficient.push(_extends({}, device, {
|
|
4518
|
-
consumables: _this22.sortConsumables(categorizedConsumables.sufficient)
|
|
4519
|
-
}));
|
|
4520
|
-
}
|
|
4521
|
-
});
|
|
4522
|
-
|
|
4523
|
-
// 对每个分类进行排序
|
|
4524
|
-
categorizedDeviceMaterialList.insufficient.sort(this.sortByRemainingValue);
|
|
4525
|
-
categorizedDeviceMaterialList.sufficient.sort(this.sortByRemainingValue);
|
|
4526
|
-
|
|
4527
|
-
// 合并三个数组
|
|
4528
|
-
var sortedDeviceMaterialList = [].concat(_toConsumableArray(categorizedDeviceMaterialList.insufficient), _toConsumableArray(categorizedDeviceMaterialList.unknown), _toConsumableArray(categorizedDeviceMaterialList.sufficient));
|
|
4529
|
-
|
|
4530
|
-
//记录每一种情况下的设备数量
|
|
4531
|
-
this.deviceTotal = [categorizedDeviceMaterialList.insufficient.length, categorizedDeviceMaterialList.unknown.length, categorizedDeviceMaterialList.sufficient.length];
|
|
4532
|
-
//记录每一种情况下的耗材数量
|
|
4533
|
-
this.materialTotal = [insufficientMaterialLength, unknownMaterialLength, sufficientMaterialLength];
|
|
4534
|
-
console.log('设备数量哦:' + categorizedDeviceMaterialList.insufficient.length + '---' + categorizedDeviceMaterialList.unknown.length + '---' + categorizedDeviceMaterialList.sufficient.length);
|
|
4535
|
-
console.log('耗材数量哦:' + insufficientMaterialLength + '---' + unknownMaterialLength + '---' + sufficientMaterialLength);
|
|
4536
|
-
|
|
4537
|
-
return {
|
|
4538
|
-
sortedDeviceMaterialList: sortedDeviceMaterialList,
|
|
4539
|
-
materialTotal: materialTotal,
|
|
4540
|
-
deviceTotal: deviceTotal,
|
|
4541
|
-
insufficientList: insufficientList
|
|
4542
|
-
};
|
|
4543
|
-
},
|
|
4544
4482
|
setChartData: function setChartData(it) {
|
|
4545
4483
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
4546
4484
|
|
|
@@ -4659,7 +4597,7 @@ var MaterialEvent = {
|
|
|
4659
4597
|
|
|
4660
4598
|
//分层排序
|
|
4661
4599
|
sortHierarchical: function sortHierarchical(data) {
|
|
4662
|
-
var
|
|
4600
|
+
var _this22 = this;
|
|
4663
4601
|
|
|
4664
4602
|
var categorizedDeviceMaterialList = {
|
|
4665
4603
|
insufficient: [],
|
|
@@ -4690,7 +4628,7 @@ var MaterialEvent = {
|
|
|
4690
4628
|
|
|
4691
4629
|
if (categorizedConsumables.insufficient.length > 0) {
|
|
4692
4630
|
categorizedDeviceMaterialList.insufficient.push(_extends({}, device, {
|
|
4693
|
-
consumables:
|
|
4631
|
+
consumables: _this22.sortConsumables(categorizedConsumables.insufficient)
|
|
4694
4632
|
}));
|
|
4695
4633
|
}
|
|
4696
4634
|
|
|
@@ -4702,7 +4640,7 @@ var MaterialEvent = {
|
|
|
4702
4640
|
|
|
4703
4641
|
if (categorizedConsumables.sufficient.length > 0) {
|
|
4704
4642
|
categorizedDeviceMaterialList.sufficient.push(_extends({}, device, {
|
|
4705
|
-
consumables:
|
|
4643
|
+
consumables: _this22.sortConsumables(categorizedConsumables.sufficient)
|
|
4706
4644
|
}));
|
|
4707
4645
|
}
|
|
4708
4646
|
});
|
|
@@ -64522,6 +64460,28 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
|
|
|
64522
64460
|
//
|
|
64523
64461
|
//
|
|
64524
64462
|
//
|
|
64463
|
+
//
|
|
64464
|
+
//
|
|
64465
|
+
//
|
|
64466
|
+
//
|
|
64467
|
+
//
|
|
64468
|
+
//
|
|
64469
|
+
//
|
|
64470
|
+
//
|
|
64471
|
+
//
|
|
64472
|
+
//
|
|
64473
|
+
//
|
|
64474
|
+
//
|
|
64475
|
+
//
|
|
64476
|
+
//
|
|
64477
|
+
//
|
|
64478
|
+
//
|
|
64479
|
+
//
|
|
64480
|
+
//
|
|
64481
|
+
//
|
|
64482
|
+
//
|
|
64483
|
+
//
|
|
64484
|
+
//
|
|
64525
64485
|
|
|
64526
64486
|
var globalEvent = weex.requireModule('globalEvent');
|
|
64527
64487
|
var animation = weex.requireModule('animation');
|
|
@@ -64573,18 +64533,6 @@ exports.default = {
|
|
|
64573
64533
|
type: Boolean,
|
|
64574
64534
|
default: false
|
|
64575
64535
|
},
|
|
64576
|
-
deviceTotal: {
|
|
64577
|
-
type: Array,
|
|
64578
|
-
default: function _default() {
|
|
64579
|
-
return [];
|
|
64580
|
-
}
|
|
64581
|
-
},
|
|
64582
|
-
materialTotal: {
|
|
64583
|
-
type: Array,
|
|
64584
|
-
default: function _default() {
|
|
64585
|
-
return [];
|
|
64586
|
-
}
|
|
64587
|
-
},
|
|
64588
64536
|
isFilterShow: {
|
|
64589
64537
|
type: Boolean,
|
|
64590
64538
|
default: false // 是否是分层模式
|
|
@@ -64816,10 +64764,10 @@ exports.default = {
|
|
|
64816
64764
|
// 1购买
|
|
64817
64765
|
if (it.btnType == 1) {
|
|
64818
64766
|
var activeUrl = it.purchaseInfo ? it.purchaseInfo.linkUrl : '';
|
|
64819
|
-
var
|
|
64820
|
-
if (
|
|
64821
|
-
|
|
64822
|
-
this.goodsjumpWebViewNew(
|
|
64767
|
+
var searchLinkUrl = it.purchaseInfo ? it.purchaseInfo.searchLinkUrl : '';
|
|
64768
|
+
if (searchLinkUrl) {
|
|
64769
|
+
searchLinkUrl = searchLinkUrl.includes('?') ? searchLinkUrl + '&entrance=consumables' : searchLinkUrl + '?entrance=consumables';
|
|
64770
|
+
this.goodsjumpWebViewNew(searchLinkUrl);
|
|
64823
64771
|
} else if (it.purchaseInfo && it.purchaseInfo.skuId) {
|
|
64824
64772
|
this.goToGoodsDetail(it.purchaseInfo);
|
|
64825
64773
|
} else if (it.goodsInfo && (it.goodsInfo.skulink || it.goodsInfo.skuId)) {
|
|
@@ -64912,10 +64860,10 @@ exports.default = {
|
|
|
64912
64860
|
|
|
64913
64861
|
if (it.serviceSupport && it.serviceSupport.washingService && it.serviceSupport.washingService.enable) {
|
|
64914
64862
|
var activeUrl = it.serviceSupport.washingService.serviceUrl;
|
|
64915
|
-
var
|
|
64916
|
-
if (
|
|
64917
|
-
|
|
64918
|
-
this.goodsjumpWebViewNew(
|
|
64863
|
+
var searchLinkUrl = it.serviceSupport.washingService.searchLinkUrl;
|
|
64864
|
+
if (searchLinkUrl) {
|
|
64865
|
+
searchLinkUrl = searchLinkUrl.includes('?') ? searchLinkUrl + '&entrance=consumables' : searchLinkUrl + '?entrance=consumables';
|
|
64866
|
+
this.goodsjumpWebViewNew(searchLinkUrl);
|
|
64919
64867
|
} else if (it.serviceSupport.washingService.skuId) {
|
|
64920
64868
|
this.goToGoodsDetail(it.serviceSupport.washingService);
|
|
64921
64869
|
} else if (it.washingServiceGoodsInfo && (it.washingServiceGoodsInfo.skulink || it.washingServiceGoodsInfo.skuId)) {
|
|
@@ -73033,8 +72981,8 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
|
|
|
73033
72981
|
"weex-type": "div"
|
|
73034
72982
|
}
|
|
73035
72983
|
}, [_vm._l((_vm.deviceMaterialList), function(item, index) {
|
|
73036
|
-
return [(_vm.isFilterShow) ? [(
|
|
73037
|
-
key:
|
|
72984
|
+
return [(_vm.isFilterShow) ? [(item.categorySort === 'insufficient' && item.categoryNum) ? _c('div', {
|
|
72985
|
+
key: item.applianceCode,
|
|
73038
72986
|
staticClass: "l-tittle-insufficient-box weex-ct weex-div",
|
|
73039
72987
|
attrs: {
|
|
73040
72988
|
"weex-type": "div"
|
|
@@ -73045,21 +72993,21 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
|
|
|
73045
72993
|
attrs: {
|
|
73046
72994
|
"weex-type": "text"
|
|
73047
72995
|
}
|
|
73048
|
-
}, [_vm._v("耗材不足(" + _vm._s(
|
|
73049
|
-
key:
|
|
72996
|
+
}, [_vm._v("耗材不足(" + _vm._s(item.categoryNum) + ")")]), _vm._v(" "), _vm._t("filterShowAddCar", null, {})], 2) : _vm._e(), _vm._v(" "), (item.categorySort === 'unknown' && item.categoryNum) ? _c('p', {
|
|
72997
|
+
key: item.applianceCode,
|
|
73050
72998
|
staticClass: " weex-el weex-text",
|
|
73051
72999
|
class: ['l-tittle', _vm.isDiablo && 'l-tittle-isDiablo'],
|
|
73052
73000
|
attrs: {
|
|
73053
73001
|
"weex-type": "text"
|
|
73054
73002
|
}
|
|
73055
|
-
}, [_vm._v("耗材数据未知(" + _vm._s(
|
|
73056
|
-
key:
|
|
73003
|
+
}, [_vm._v("耗材数据未知(" + _vm._s(item.categoryNum) + ")")]) : _vm._e(), _vm._v(" "), (item.categorySort === 'sufficient' && item.categoryNum) ? _c('p', {
|
|
73004
|
+
key: item.applianceCode,
|
|
73057
73005
|
staticClass: " weex-el weex-text",
|
|
73058
73006
|
class: ['l-tittle', _vm.isDiablo && 'l-tittle-isDiablo'],
|
|
73059
73007
|
attrs: {
|
|
73060
73008
|
"weex-type": "text"
|
|
73061
73009
|
}
|
|
73062
|
-
}, [_vm._v("耗材充足(" + _vm._s(
|
|
73010
|
+
}, [_vm._v("耗材充足(" + _vm._s(item.categoryNum) + ")")]) : _vm._e()] : _vm._e(), _vm._v(" "), _c('div', {
|
|
73063
73011
|
key: index,
|
|
73064
73012
|
staticClass: "material-list weex-ct weex-div",
|
|
73065
73013
|
style: ({
|