jufubao-takeorder 1.0.2-beta5 → 1.0.2-beta7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-takeorder",
3
- "version": "1.0.2-beta5",
3
+ "version": "1.0.2-beta7",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -23,33 +23,38 @@
23
23
  <view class="menu_wrap" :style="[menuWrapBoxStyle]">
24
24
  <view class="jfb-takeorder-index__body-filter">
25
25
  <view
26
- :style="{ color: filterType === 'province' ? mainColor : '' }"
26
+ :style="{ color: (filterType === 'province' || selectedProvs.length > 0) ? mainColor : '' }"
27
27
  @click="handleSwitchFilter('province')"
28
28
  class="jfb-takeorder-index__body-filter-item"
29
- ><view>省份</view
30
- ><XdFontIcon
29
+ >
30
+ <view v-if="selectedProvs.length===0">省份</view
31
+ >
32
+ <view v-else class="jfb-takeorder-index__body-filter-text">{{ selectedProvsName.join('') }}</view>
33
+ <XdFontIcon
31
34
  style="font-weight: bolder"
32
35
  size="20"
33
36
  icon="iconxia_down"
34
37
  ></XdFontIcon
35
38
  ></view>
36
39
  <view
37
- :style="{ color: filterType === 'city' ? mainColor : '' }"
40
+ :style="{ color: (filterType === 'city' || selectedCity.length > 0) ? mainColor : '' }"
38
41
  @click="handleSwitchFilter('city')"
39
42
  class="jfb-takeorder-index__body-filter-item"
40
- ><view>城市</view
41
- ><XdFontIcon
43
+ ><view v-if="selectedCity.length===0">城市</view
44
+ ><view v-else class="jfb-takeorder-index__body-filter-text">{{ selectedCityName.join('') }}</view>
45
+ <XdFontIcon
42
46
  style="font-weight: bolder"
43
47
  size="20"
44
48
  icon="iconxia_down"
45
49
  ></XdFontIcon
46
50
  ></view>
47
51
  <view
48
- :style="{ color: filterType === 'brand' ? mainColor : '' }"
52
+ :style="{ color: (filterType === 'brand' || selectedBrands.length > 0) ? mainColor : '' }"
49
53
  @click="handleSwitchFilter('brand')"
50
54
  class="jfb-takeorder-index__body-filter-item"
51
- ><view>品牌</view
52
- ><XdFontIcon
55
+ ><view v-if="selectedBrands.length===0">品牌</view
56
+ ><view v-else class="jfb-takeorder-index__body-filter-text">{{ selectedBrandsName.join('') }}</view>
57
+ <XdFontIcon
53
58
  style="font-weight: bolder"
54
59
  size="20"
55
60
  icon="iconxia_down"
@@ -228,6 +233,9 @@ export default {
228
233
  isPreview: false,
229
234
  isOpenNew: "N",
230
235
  isOpenWin: "N",
236
+ selectedProvsName: [],
237
+ selectedCityName: [],
238
+ selectedBrandsName: [],
231
239
  };
232
240
  },
233
241
  computed: {
@@ -332,9 +340,12 @@ export default {
332
340
  page_size: this.page_size, // 每页数量
333
341
  };
334
342
 
335
- // 只有当有选择时,才添加筛选参数
343
+ // 只有当有选择时,才添加筛选参数,如果选择了 'all' 则不传
336
344
  if (this.selectedProvs && this.selectedProvs.length > 0) {
337
- params.province_codes = this.selectedProvs;
345
+ // 如果只有一个选项且为 'all',则不传 province_codes
346
+ if (!(this.selectedProvs.length === 1 && this.selectedProvs[0] === 'all')) {
347
+ params.province_codes = this.selectedProvs;
348
+ }
338
349
  }
339
350
  if (this.selectedCity && this.selectedCity.length > 0) {
340
351
  params.city_codes = this.selectedCity;
@@ -515,11 +526,13 @@ export default {
515
526
  // 如果“全部”未被选中,则只选中“全部”
516
527
  else {
517
528
  this.selectedProvs = ["all"];
529
+ this.selectedProvsName = ["全部"];
518
530
  }
519
531
  } else {
520
532
  // 如果当前选中了“全部”,则先取消“全部”的选择
521
533
  if (this.selectedProvs.includes("all")) {
522
534
  this.selectedProvs = []; // 清空,准备添加具体选项
535
+ this.selectedProvsName = [];
523
536
  }
524
537
 
525
538
  const index = this.selectedProvs.findIndex(
@@ -528,14 +541,16 @@ export default {
528
541
  if (index > -1) {
529
542
  // 如果已选中,则取消选择
530
543
  this.selectedProvs.splice(index, 1);
531
-
544
+ this.selectedProvsName.splice(index, 1);
532
545
  // 【可选】当所有具体选项都被取消时,自动选中“全部”
533
546
  if (this.selectedProvs.length === 0) {
534
547
  this.selectedProvs = ["all"];
548
+ this.selectedProvsName = ["全部"];
535
549
  }
536
550
  } else {
537
551
  // 如果未选中,则添加
538
552
  this.selectedProvs.push(item.value);
553
+ this.selectedProvsName.push(item.label);
539
554
  }
540
555
  }
541
556
  },
@@ -547,9 +562,11 @@ export default {
547
562
  if (index > -1) {
548
563
  // 如果已选中,则取消选择
549
564
  this.selectedBrands.splice(index, 1);
565
+ this.selectedBrandsName.splice(index, 1);
550
566
  } else {
551
567
  // 如果未选中,则添加
552
568
  this.selectedBrands.push(item.value);
569
+ this.selectedBrandsName.push(item.label);
553
570
  }
554
571
  },
555
572
  handleGetNew() {
@@ -633,20 +650,25 @@ export default {
633
650
  if (index > -1) {
634
651
  // 如果已选中,则取消选择
635
652
  this.selectedCity.splice(index, 1);
653
+ this.selectedCityName.splice(index, 1);
636
654
  } else {
637
655
  // 如果未选中,则添加
638
656
  this.selectedCity.push(city.city_code);
657
+ this.selectedCityName.push(city.city_name);
639
658
  }
640
659
  },
641
660
  handleResetFilter() {
642
661
  if (this.filterType === "province") {
643
662
  this.selectedProvs = [];
663
+ this.selectedProvsName = [];
644
664
  }
645
665
  if (this.filterType === "brand") {
646
666
  this.selectedBrands = [];
667
+ this.selectedBrandsName = [];
647
668
  }
648
669
  if (this.filterType === "city") {
649
670
  this.selectedCity = [];
671
+ this.selectedCityName = [];
650
672
  }
651
673
  this.filterType = "";
652
674
  this.showFilterQuery = false;
@@ -740,6 +762,13 @@ export default {
740
762
  margin-right: 10rpx;
741
763
  }
742
764
  }
765
+ &-text {
766
+ max-width: 90rpx;
767
+ overflow: hidden;
768
+ text-overflow: ellipsis;
769
+ white-space: nowrap;
770
+ min-width: 0;
771
+ }
743
772
  }
744
773
  &-query {
745
774
  &-filter {
@@ -169,7 +169,7 @@
169
169
  <input
170
170
  :disabled="quoteDisabled"
171
171
  v-model="quotePrice"
172
- placeholder="请输入单张报价金额"
172
+ placeholder="请输入订单报价金额"
173
173
  />
174
174
  </view>
175
175
  <view class="quote-advice"
@@ -196,7 +196,7 @@
196
196
  :key="index"
197
197
  >
198
198
  <view class="voucher-item-image">
199
- <image :src="item.report_voucher" />
199
+ <image :src="item.report_voucher_preview_url" />
200
200
  <view>凭证图</view>
201
201
  </view>
202
202
  <view>
@@ -509,7 +509,7 @@ export default {
509
509
  };
510
510
  },
511
511
  quotePriceTotal() {
512
- return this.quotePrice * this.info.product_total;
512
+ return this.$xdUniHelper.multiplyFloatNumber(this.quotePrice, this.info.product_total);
513
513
  },
514
514
  },
515
515
  watch: {
@@ -618,7 +618,7 @@ export default {
618
618
  100
619
619
  );
620
620
  const price = parseFloat(this.quotePrice);
621
- if (price < min || price > max) {
621
+ if (price > max) {
622
622
  this.$xdAlert({ content: `报价价格只能在建议报价区间内` });
623
623
  return;
624
624
  }
@@ -864,7 +864,8 @@ export default {
864
864
  .then((res1) => {
865
865
  console.log("event.getImagePreview", res);
866
866
  let obj = {
867
- report_voucher: res1.preview_url,
867
+ report_voucher: files[0].url,
868
+ report_voucher_preview_url: res1.preview_url,
868
869
  code_list: res.list.map((item) => {
869
870
  if (item.show_type === "qrcode") {
870
871
  let reg = /^(http:\/\/|https:\/\/|\/\/)+.+$/;
@@ -270,10 +270,7 @@ export default {
270
270
  }
271
271
  },
272
272
  onJfbShow(options) {
273
- // 页面显示时恢复轮询
274
- if (!this.pollTimer) {
275
- this.startPolling();
276
- }
273
+ this.onJfbLoad(options);
277
274
  },
278
275
  onJfbHide(options) {
279
276
  // 页面隐藏时暂停轮询