jufubao-takeorder 1.0.2-beta6 → 1.0.2-beta8

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-beta6",
3
+ "version": "1.0.2-beta8",
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: {
@@ -518,11 +526,13 @@ export default {
518
526
  // 如果“全部”未被选中,则只选中“全部”
519
527
  else {
520
528
  this.selectedProvs = ["all"];
529
+ this.selectedProvsName = ["全部"];
521
530
  }
522
531
  } else {
523
532
  // 如果当前选中了“全部”,则先取消“全部”的选择
524
533
  if (this.selectedProvs.includes("all")) {
525
534
  this.selectedProvs = []; // 清空,准备添加具体选项
535
+ this.selectedProvsName = [];
526
536
  }
527
537
 
528
538
  const index = this.selectedProvs.findIndex(
@@ -531,14 +541,16 @@ export default {
531
541
  if (index > -1) {
532
542
  // 如果已选中,则取消选择
533
543
  this.selectedProvs.splice(index, 1);
534
-
544
+ this.selectedProvsName.splice(index, 1);
535
545
  // 【可选】当所有具体选项都被取消时,自动选中“全部”
536
546
  if (this.selectedProvs.length === 0) {
537
547
  this.selectedProvs = ["all"];
548
+ this.selectedProvsName = ["全部"];
538
549
  }
539
550
  } else {
540
551
  // 如果未选中,则添加
541
552
  this.selectedProvs.push(item.value);
553
+ this.selectedProvsName.push(item.label);
542
554
  }
543
555
  }
544
556
  },
@@ -550,9 +562,11 @@ export default {
550
562
  if (index > -1) {
551
563
  // 如果已选中,则取消选择
552
564
  this.selectedBrands.splice(index, 1);
565
+ this.selectedBrandsName.splice(index, 1);
553
566
  } else {
554
567
  // 如果未选中,则添加
555
568
  this.selectedBrands.push(item.value);
569
+ this.selectedBrandsName.push(item.label);
556
570
  }
557
571
  },
558
572
  handleGetNew() {
@@ -636,20 +650,25 @@ export default {
636
650
  if (index > -1) {
637
651
  // 如果已选中,则取消选择
638
652
  this.selectedCity.splice(index, 1);
653
+ this.selectedCityName.splice(index, 1);
639
654
  } else {
640
655
  // 如果未选中,则添加
641
656
  this.selectedCity.push(city.city_code);
657
+ this.selectedCityName.push(city.city_name);
642
658
  }
643
659
  },
644
660
  handleResetFilter() {
645
661
  if (this.filterType === "province") {
646
662
  this.selectedProvs = [];
663
+ this.selectedProvsName = [];
647
664
  }
648
665
  if (this.filterType === "brand") {
649
666
  this.selectedBrands = [];
667
+ this.selectedBrandsName = [];
650
668
  }
651
669
  if (this.filterType === "city") {
652
670
  this.selectedCity = [];
671
+ this.selectedCityName = [];
653
672
  }
654
673
  this.filterType = "";
655
674
  this.showFilterQuery = false;
@@ -679,10 +698,7 @@ export default {
679
698
  }
680
699
  },
681
700
  onJfbShow(options) {
682
- // 页面显示时恢复轮询
683
- if (!this.pollTimer) {
684
- this.startPolling();
685
- }
701
+ this.onJfbLoad(options);
686
702
  console.log("event.onJfbShow", options);
687
703
  },
688
704
  onJfbHide(options) {
@@ -743,6 +759,13 @@ export default {
743
759
  margin-right: 10rpx;
744
760
  }
745
761
  }
762
+ &-text {
763
+ max-width: 90rpx;
764
+ overflow: hidden;
765
+ text-overflow: ellipsis;
766
+ white-space: nowrap;
767
+ min-width: 0;
768
+ }
746
769
  }
747
770
  &-query {
748
771
  &-filter {
@@ -27,9 +27,8 @@
27
27
  >
28
28
  <view
29
29
  v-if="
30
- (info.user_quotation_status === 'received' ||
31
- info.user_quotation_status === 'win_order') &&
32
- info.order_status !== 'close'
30
+ info.user_quotation_status === 'received' ||
31
+ info.user_quotation_status === 'win_order'
33
32
  "
34
33
  class="jfb-takeorder-order-detail__countdown-banner"
35
34
  :style="{ backgroundColor: mainColor }"
@@ -58,7 +57,7 @@
58
57
  v-if="
59
58
  info.user_quotation_status === 'wait_quote' ||
60
59
  info.user_quotation_status === 'quoted' ||
61
- info.order_status === 'close' ||
60
+ info.user_quotation_status === 'close' ||
62
61
  info.user_quotation_status === 'cancel_quotation'
63
62
  "
64
63
  class="wrap"
@@ -68,7 +67,7 @@
68
67
  v-if="
69
68
  step === 1 ||
70
69
  info.user_quotation_status === 'quoted' ||
71
- info.order_status === 'close'
70
+ info.user_quotation_status === 'close'
72
71
  "
73
72
  >
74
73
  <view>市场原价(仅供参考)</view>
@@ -91,7 +90,7 @@
91
90
  v-if="
92
91
  step === 1 ||
93
92
  info.user_quotation_status === 'quoted' ||
94
- info.order_status === 'close'
93
+ info.user_quotation_status === 'close'
95
94
  "
96
95
  >
97
96
  <view>报价人数</view>
@@ -102,7 +101,7 @@
102
101
  v-if="
103
102
  step === 1 ||
104
103
  info.user_quotation_status === 'quoted' ||
105
- info.order_status === 'close'
104
+ info.user_quotation_status === 'close'
106
105
  "
107
106
  >
108
107
  <view>报价倒计时</view>
@@ -158,9 +157,7 @@
158
157
  (info.user_quotation_status === 'cancel_quotation' ||
159
158
  info.user_quotation_status === 'wait_quote' ||
160
159
  info.user_quotation_status === 'quoted') &&
161
- step !== 2 &&
162
- info.order_status !== 'reported' &&
163
- info.order_status !== 'close'
160
+ step !== 2
164
161
  "
165
162
  >
166
163
  <view class="quote-title">订单报价</view>
@@ -169,7 +166,7 @@
169
166
  <input
170
167
  :disabled="quoteDisabled"
171
168
  v-model="quotePrice"
172
- placeholder="请输入单张报价金额"
169
+ placeholder="请输入订单报价金额"
173
170
  />
174
171
  </view>
175
172
  <view class="quote-advice"
@@ -185,8 +182,8 @@
185
182
  <view
186
183
  class="wrap upload"
187
184
  v-if="
188
- info.user_quotation_status === 'received' &&
189
- info.order_status !== 'close'
185
+ info.user_quotation_status === 'received' ||
186
+ info.user_quotation_status === 'reported'
190
187
  "
191
188
  >
192
189
  <view class="voucher" v-if="voucherImages && voucherImages.length > 0">
@@ -223,7 +220,7 @@
223
220
  </view>
224
221
  </view>
225
222
  </view>
226
- <view style="display: flex; justify-content: center">
223
+ <view v-if="info.user_quotation_status === 'received'" style="display: flex; justify-content: center">
227
224
  <xd-upload
228
225
  @on-done="handleUploadDone"
229
226
  selectType="image"
@@ -242,7 +239,7 @@
242
239
  >
243
240
  </xd-upload>
244
241
  </view>
245
- <view class="upload-notice">
242
+ <view v-if="info.user_quotation_status === 'received'" class="upload-notice">
246
243
  <text>请务必按真实报单并仔细校对取餐码正确无误,</text>
247
244
  <text :style="{ color: mainColor }"
248
245
  >取餐码错误或未上报真实取餐码造成客诉产生损失将由您承担!</text
@@ -251,9 +248,9 @@
251
248
  </view>
252
249
  <view
253
250
  v-if="
254
- (info.order_status === 'close' || info.order_status === 'quoting') &&
255
- notice &&
256
- info.user_quotation_status !== 'received'
251
+ (info.user_quotation_status === 'close' ||
252
+ info.user_quotation_status === 'quoted') &&
253
+ notice
257
254
  "
258
255
  class="special-tip wrap"
259
256
  style="padding: 24rpx 32rpx"
@@ -273,7 +270,10 @@
273
270
  <view v-if="!isCountdownEnd" :style="{ height: '100rpx' }"></view>
274
271
  <view
275
272
  :key="info.user_quotation_status"
276
- v-if="info.order_status !== 'close' && info.order_status !== 'reported'"
273
+ v-if="
274
+ info.user_quotation_status !== 'close' &&
275
+ info.user_quotation_status !== 'reported'
276
+ "
277
277
  class="fixe_bottom"
278
278
  :style="prod_bottom"
279
279
  >
@@ -478,7 +478,7 @@ export default {
478
478
  // 上报倒计时定时器标识
479
479
  reportCountdownTimer: null,
480
480
  // 上报倒计时剩余秒数(10分钟 = 600秒)
481
- reportCountdownSeconds: 600,
481
+ reportCountdownSeconds: 0,
482
482
  quotePrice: "",
483
483
  closeMask: true,
484
484
  showConfirmDialog: false,
@@ -509,7 +509,10 @@ export default {
509
509
  };
510
510
  },
511
511
  quotePriceTotal() {
512
- return this.$xdUniHelper.multiplyFloatNumber(this.quotePrice, this.info.product_total);
512
+ return this.$xdUniHelper.multiplyFloatNumber(
513
+ this.quotePrice,
514
+ this.info.product_total
515
+ );
513
516
  },
514
517
  },
515
518
  watch: {
@@ -566,11 +569,9 @@ export default {
566
569
  this.quoteDisabled = true;
567
570
  }
568
571
  if (
569
- (this.info.user_quotation_status === "cancel_quotation" ||
570
- this.info.user_quotation_status === "wait_quote" ||
571
- this.info.user_quotation_status === "quoted") &&
572
- this.info.order_status !== "reported" &&
573
- this.info.order_status !== "close"
572
+ this.info.user_quotation_status === "cancel_quotation" ||
573
+ this.info.user_quotation_status === "wait_quote" ||
574
+ this.info.user_quotation_status === "quoted"
574
575
  ) {
575
576
  this.startCountdown();
576
577
  }
@@ -582,7 +583,7 @@ export default {
582
583
  //如果已接单,开启十分钟上报订单倒计时
583
584
  this.startReportCountdown();
584
585
  }
585
- if (this.info.order_status === "close") {
586
+ if (this.info.user_quotation_status === "close") {
586
587
  //如果订单已关闭,则隐藏所有按钮,并且清除倒计时
587
588
  this.isCountdownEnd = true;
588
589
  this.clearReceiveCountdown();
@@ -618,7 +619,7 @@ export default {
618
619
  100
619
620
  );
620
621
  const price = parseFloat(this.quotePrice);
621
- if (price < min || price > max) {
622
+ if (price > max) {
622
623
  this.$xdAlert({ content: `报价价格只能在建议报价区间内` });
623
624
  return;
624
625
  }
@@ -772,7 +773,7 @@ export default {
772
773
  // 先清除可能存在的旧定时器,防止重复计时
773
774
  this.clearReportCountdown();
774
775
  // 初始化倒计时秒数(10分钟 = 600秒),如果有接口返回的时间则使用接口返回的时间
775
- this.reportCountdownSeconds = this.info.rest_report_time || 600;
776
+ this.reportCountdownSeconds = this.info.rest_report_time;
776
777
  this.isReportCountdownEnd = false;
777
778
 
778
779
  // 创建每秒执行的定时器
@@ -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
  // 页面隐藏时暂停轮询