gxd-uni-library-editx 1.0.180 → 1.0.181

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": "gxd-uni-library-editx",
3
- "version": "1.0.180",
3
+ "version": "1.0.181",
4
4
  "private": false,
5
5
  "description": "聚福宝基础插件专用库",
6
6
  "main": "index.js",
@@ -3,20 +3,28 @@
3
3
  <slot></slot>
4
4
  <xd-down-drawer :show.sync="xdDownDrawer" :isBodyClose="false"
5
5
  :z-index="3000">
6
- <view style="height: 80rpx;background:#FFF;"></view>
7
- <view class="jfb-cashier-verification-pay__body">
6
+ <view class="card_chose_title">使用票券</view>
7
+ <view class="jfb-cashier-verification-pay__body" style="background-color: #F8F8F8;">
8
8
  <view class="column-group">
9
9
  <view class="column-item">
10
10
  <view class="column_label">
11
11
  我的票券
12
12
  <view :style="{color: style.$warningColor}" v-if="checkedCards.length>0" class="label_sub">(已使用{{checkedCards.length}}张票券)</view>
13
- <view :style="{marginLeft:'20rpx',color: style.$warningColor}" class="label_sub" v-else>请勾选票券</view> </view>
13
+ <view :style="{marginLeft:'20rpx',color: style.$mainColor}" class="label_sub" v-else>请勾选票券</view>
14
+ </view>
14
15
  <view v-if="bindCard==='1'" class="column_value">
15
16
  <xd-button
16
- width="220rpx"
17
+ width="200rpx"
17
18
  radius="60rpx"
18
19
  type="primary"
19
20
  size="small"
21
+ :cusStyle="{
22
+ borderRadius: '16rpx',
23
+ backgroundColor: '#FFFFFF',
24
+ color: style.$mainColor,
25
+ border: '1px solid ' + style.$mainColor,
26
+ padding: 0
27
+ }"
20
28
  @click="xdDownDrawerNewCard=true"
21
29
  >使用新票券</xd-button>
22
30
  </view>
@@ -30,7 +38,7 @@
30
38
  <xd-unit
31
39
  :price="needPayPrice"
32
40
  :isOld="false"
33
- :font-size="32"
41
+ :font-size="28"
34
42
  :icon-size="0.3"
35
43
  ></xd-unit>
36
44
  </view>
@@ -77,7 +85,7 @@
77
85
  <xd-unit
78
86
  :price="ticket.card_point"
79
87
  :isOld="false"
80
- :font-size="24"
88
+ :font-size="28"
81
89
  :icon-size="0.3"
82
90
  :unit="ticket.unit || ''"
83
91
  ></xd-unit>
@@ -86,7 +94,7 @@
86
94
  v-if="ticket.card_use_point"
87
95
  class="_item text-primary"
88
96
  >
89
- <text>使用:</text>
97
+ <text style="color: #333333;">使用:</text>
90
98
  <xd-unit
91
99
  :price="ticket.card_use_point"
92
100
  :isOld="false"
@@ -115,11 +123,11 @@
115
123
  :style="alert_bottom"
116
124
  >
117
125
  <xd-button
118
- width="360rpx"
126
+ width="670rpx"
119
127
  type="primary"
120
128
  radius="50rpx"
121
129
  @click="doTicketPay"
122
- >确认支付</xd-button>
130
+ >确认</xd-button>
123
131
  </view>
124
132
  </view>
125
133
  </xd-down-drawer>
@@ -460,6 +468,7 @@ export default {
460
468
  if(autoCardList.length > 0){
461
469
  await this.autoUseCard(autoCardList, 0);
462
470
  }
471
+ this.$emit("onInit", cardList);
463
472
  })
464
473
  },
465
474
  async autoUseCard(tickets, i){
@@ -770,6 +779,15 @@ export default {
770
779
  .text-gray{
771
780
  color: #999999;
772
781
  }
782
+ .card_chose_title{
783
+ height: 100rpx;
784
+ font-size: 32rpx;
785
+ background-color: #F8F8F8;
786
+ color: #333333;
787
+ display: flex;
788
+ align-items: center;
789
+ justify-content: center;
790
+ }
773
791
  .text-primary{
774
792
  color: #FE7A63;
775
793
  position: relative;
@@ -816,8 +834,7 @@ export default {
816
834
  display: flex;
817
835
  align-items: center;
818
836
  justify-content: space-between;
819
- border-bottom: 1px solid rgba(238, 238, 238, 1);
820
- padding: 30rpx 50rpx;
837
+ padding: 26rpx 40rpx;
821
838
 
822
839
  .column_label{
823
840
  display: flex;
@@ -833,7 +850,7 @@ export default {
833
850
  }
834
851
  }
835
852
  .label_sub{
836
- font-size: 18rpx;
853
+ font-size: 24rpx;
837
854
  color: #999999;
838
855
  }
839
856
  }
@@ -841,45 +858,50 @@ export default {
841
858
 
842
859
  .ticket_list{
843
860
  .ticket_add_new{
844
- width: 690rpx;
845
- height: 220rpx;
861
+ width: 710rpx;
862
+ height: 88rpx;
846
863
  border-radius: 10rpx;
847
864
  background: rgba(255, 255, 255, 1);
848
865
  box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.1);
849
- margin: 30rpx auto;
866
+ margin: 20rpx auto;
850
867
  display: flex;
851
- flex-direction: column;
852
868
  align-items: center;
853
869
  justify-content: center;
854
- font-size: 24rpx;
855
- color: var(--main-color);
870
+ font-size: 28rpx;
871
+ color: #CCCCCC;
856
872
 
857
873
  .plus_icon{
858
- background-color: var(--main-color);
874
+ background-color: #CCCCCC;
859
875
  color: #FFFFFF;
860
- border-radius: 20rpx;
876
+ border-radius: 8rpx;
861
877
  display: flex;
862
878
  align-items: center;
863
879
  justify-content: center;
864
- font-size: 48rpx;
865
- width: 80rpx;
866
- height: 80rpx;
867
- margin-bottom: 20rpx;
880
+ font-size: 24rpx;
881
+ width: 40rpx;
882
+ height: 40rpx;
883
+ margin-right: 24rpx;
868
884
  }
869
885
  }
870
886
  .ticket_item{
871
- width: 690rpx;
887
+ width: 710rpx;
872
888
  border-radius: 10rpx;
873
889
  background: rgba(255, 255, 255, 1);
874
890
  box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.1);
875
- margin: 30rpx auto;
891
+ margin: 20rpx auto;
876
892
  padding: 30rpx 0 20rpx;
893
+
894
+ ::v-deep .xd-radio__body{
895
+ border-radius: 8rpx !important;
896
+ }
877
897
  ._header{
878
898
  display: flex;
879
899
  justify-content: space-between;
880
900
  align-items: center;
881
901
  padding: 0rpx 30rpx;
882
902
  font-size: 28rpx;
903
+ color: #333333;
904
+ font-weight: 500;
883
905
  .login_card{
884
906
  padding: 8rpx 20rpx;
885
907
  border-radius: 8px;
@@ -888,16 +910,18 @@ export default {
888
910
  }
889
911
  ._cont{
890
912
  display: flex;
891
- font-size: 18rpx;
913
+ font-size: 28rpx;
892
914
  padding: 24rpx 30rpx;
893
915
  border-bottom: 1px solid rgba(242, 242, 242, 1);
894
- color: #777777;
916
+ color: #666666;
917
+ font-weight: 400;
895
918
  }
896
919
  ._footer{
897
920
  display: flex;
898
921
  justify-content: space-between;
899
922
  padding: 24rpx 30rpx 12rpx;
900
- font-size: 24rpx;
923
+ font-size: 28rpx;
924
+ color: #333333;
901
925
  ._item{
902
926
  display: flex;
903
927
  align-items: center;
@@ -1,31 +1,34 @@
1
1
  <template>
2
2
  <view class="xd-wallet-chose">
3
3
  <xd-down-drawer :show.sync="xdDownDrawer" :isBodyClose="false">
4
- <view class="title" >请选择{{showName}}</view>
5
- <view class="wallet_body">
6
- <view class="wallet_total">
7
- <view class="_title">剩余{{showName}}</view>
8
- <view class="_money">{{totalAmount/100}}</view>
9
- </view>
10
- <view class="wallet_list" :key="renderChecked">
11
- <view class="wallet_item"
12
- v-for="(item, i) in showWalletList" :key="i"
13
- @click="handleChange(!(item.wallet_use_price > 0), item)"
14
- >
15
- <view>
16
- <view class="label">
17
- <view class="label_tit">{{item.wallet_name}}</view>
18
- <view>(剩余{{item.amount/100}})</view>
19
- </view>
20
- <view class="label_company" v-if="item.customer_name">{{ item.customer_name }}</view>
4
+ <view class="title" >选择{{showName}}</view>
5
+ <view class="wallet_body_wrap">
6
+ <view class="wallet_body">
7
+ <view class="wallet_total">
8
+ <view class="_title">全部{{showName}}</view>
9
+ <view class="_money">{{totalAmount/100}}</view>
21
10
  </view>
22
-
23
- <view class="value">
24
- <view class="val_sub" v-if="item.wallet_use_price > 0">本单<text class="red">已减{{item.wallet_use_price/100}}</text></view>
25
- <xd-radio
26
- :value="item.wallet_use_price > 0"
27
- :isClickEvent="false"
28
- ></xd-radio>
11
+ <view class="wallet_list" :key="renderChecked">
12
+ <view class="wallet_item"
13
+ v-for="(item, i) in showWalletList" :key="i"
14
+ @click="handleChange(!(item.wallet_use_price > 0), item)"
15
+ >
16
+ <view>
17
+ <view class="label">
18
+ <view class="label_tit">{{item.wallet_name}}</view>
19
+ <view class="label_sub">(剩余{{item.amount/100}})</view>
20
+ </view>
21
+ <view class="label_company" v-if="item.customer_name">{{ item.customer_name }}</view>
22
+ </view>
23
+
24
+ <view class="value">
25
+ <view class="val_sub" v-if="item.wallet_use_price > 0">本单<text class="red">已减{{item.wallet_use_price/100}}</text></view>
26
+ <xd-radio
27
+ :value="item.wallet_use_price > 0"
28
+ :isClickEvent="false"
29
+ :isOld="false"
30
+ ></xd-radio>
31
+ </view>
29
32
  </view>
30
33
  </view>
31
34
  </view>
@@ -35,7 +38,7 @@
35
38
  class="bottom_btn"
36
39
  :style="alert_bottom"
37
40
  >
38
- <xd-button width="360rpx" type="primary" radius="50rpx" @click="handleChose">确认支付</xd-button>
41
+ <xd-button width="680rpx" type="primary" radius="50rpx" @click="handleChose">确认</xd-button>
39
42
  </view>
40
43
  </view>
41
44
  </xd-down-drawer>
@@ -66,6 +69,10 @@
66
69
  },
67
70
  hadChoseWallet:{
68
71
  type: null | Array
72
+ },
73
+ defaultUseFirst: {
74
+ type: Boolean,
75
+ default: false
69
76
  }
70
77
  },
71
78
  watch: {
@@ -133,6 +140,18 @@
133
140
  });
134
141
  this.showName = res.show_name;
135
142
  this.totalAmount = res.total_amount
143
+ this.$emit("onInit", res.total_amount)
144
+
145
+ if(this.defaultUseFirst){
146
+ if(this.showWalletList.length===0) return;
147
+ setTimeout(() => {
148
+ let item = this.showWalletList[0]
149
+ this.handleChange(true, item, () => {
150
+ this.handleChose();
151
+ });
152
+ }, 300)
153
+ }
154
+
136
155
  })
137
156
  },
138
157
  methods: {
@@ -149,7 +168,7 @@
149
168
  }
150
169
  this.$emit("onChose", data)
151
170
  },
152
- handleChange(flag, row){
171
+ handleChange(flag, row, cb){
153
172
  console.log(flag);
154
173
  console.log(this.walletList);
155
174
  if(flag){
@@ -171,6 +190,7 @@
171
190
  this.needPayPrice = res.need_pay_price;
172
191
  this.walletPayPrice = res.wallet_total_use_price;
173
192
  this.renderChecked = Date.now();
193
+ if(cb) cb();
174
194
  }, (err) => {
175
195
  this.$xdHideLoading();
176
196
  this.renderChecked = Date.now();
@@ -180,6 +200,7 @@
180
200
  return item.wallet_virtual_number != row.wallet_virtual_number
181
201
  })
182
202
  this.walletPayPrice = this.walletPayPrice - row.wallet_use_price;
203
+ if(cb) cb();
183
204
  // this.$set(row, "wallet_use_price", 0);
184
205
  }
185
206
  },
@@ -212,19 +233,26 @@
212
233
  <style lang="less" scoped>
213
234
 
214
235
  .xd-wallet-chose{
236
+ ::v-deep .xd-up-drawer__content{
237
+ background-color: #F8F8F8;
238
+ }
215
239
  .title{
216
240
  height: 100rpx;
217
241
  line-height: 100rpx;
218
- background:#FFF;
242
+ background:#F8F8F8;
219
243
  text-align: center;
220
- font-size: 28rpx;
221
- color: #666666;
222
- border-bottom: 1px solid #F2F2F2;
244
+ font-size: 32rpx;
245
+ color: #333333;
223
246
  }
224
- .wallet_body{
247
+ .wallet_body_wrap{
248
+ padding: 24rpx;
225
249
  padding-bottom: 150rpx;
250
+ }
251
+ .wallet_body{
226
252
  max-height: 70vh;
227
253
  overflow: auto;
254
+ background-color: #FFFFFF;
255
+ border-radius: 16rpx;
228
256
  .wallet_total{
229
257
  padding: 32rpx 48rpx;
230
258
  border-bottom: 1px solid #F2F2F2;
@@ -232,27 +260,32 @@
232
260
  color: #333333;
233
261
  font-size: 24rpx;
234
262
  font-weight: 400;
263
+ margin-bottom: 12rpx;
235
264
  }
236
265
  ._money{
237
266
  color: #333333;
238
- font-size: 64rpx;
267
+ font-size: 48rpx;
239
268
  font-weight: 500;
240
269
  }
241
270
  }
242
271
  .wallet_list{
243
272
  .wallet_item{
244
273
  display: flex;
245
- align-items: center;
274
+ align-items: flex-start;
246
275
  justify-content: space-between;
247
276
  padding: 32rpx 48rpx;
248
- font-size: 26rpx;
249
- color: #666666;
277
+ font-size: 28rpx;
278
+ color: #333333;
250
279
  .label{
251
280
  display: flex;
252
281
  align-items: center;
253
282
  .label_tit{
254
283
  margin-right: 16rpx;
255
284
  }
285
+ .label_sub{
286
+ color: var(--g-theme-mainColor);
287
+ font-size: 24rpx;
288
+ }
256
289
  &_company{
257
290
  color: #999999;
258
291
  font-size: 24rpx;
@@ -263,8 +296,10 @@
263
296
  display: flex;
264
297
  align-items: center;
265
298
  .val_sub{
266
- color: #999999;
299
+ color: #333333;
267
300
  margin-right: 24rpx;
301
+ font-size: 24rpx;
302
+ line-height: 40rpx;
268
303
  .red{
269
304
  color: #FF7070;
270
305
  }
@@ -273,16 +308,16 @@
273
308
  }
274
309
  }
275
310
 
276
- .bottom_btn{
277
- position: fixed;
278
- width: 100%;
279
- padding-top: 24rpx;
280
- background: #FFFFFF;
281
- box-shadow: 0 0 0px 1px rgba(0, 0, 0, 0.1);
282
- transition: 500ms all;
283
- padding-bottom: calc(24rpx + env(safe-area-inset-bottom));
284
- padding-bottom: calc(24rpx + constant(safe-area-inset-bottom));
285
- }
311
+ }
312
+ .bottom_btn{
313
+ position: fixed;
314
+ width: 100%;
315
+ padding-top: 24rpx;
316
+ background: #FFFFFF;
317
+ box-shadow: 0 0 0px 1px rgba(0, 0, 0, 0.1);
318
+ transition: 500ms all;
319
+ padding-bottom: calc(24rpx + env(safe-area-inset-bottom));
320
+ padding-bottom: calc(24rpx + constant(safe-area-inset-bottom));
286
321
  }
287
322
  }
288
323
  </style>