jufubao-admin-library 1.1.66 → 1.1.67

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.
@@ -115,7 +115,6 @@ export default {
115
115
  ...mapState(['commonParams']),
116
116
  },
117
117
  async created () {
118
- console.log(this.projectType,"projectTypeprojectType");
119
118
  let cityData = await this.getAllCityList()
120
119
  this.cityData = cityData.data.list
121
120
  this.cookieKey = `${this.commonParams.xsiteid}.${this.commonParams.xnamespace}.${this.pagesType}.channel`
@@ -246,6 +245,10 @@ export default {
246
245
  * @param form 搜索请求参数
247
246
  */
248
247
  handleSearch ({ action, form }) {
248
+ if(action==='reset'){
249
+ this.category_id = []
250
+ this.custom_category_id = []
251
+ }
249
252
  if (this.JfbParent.page) this.JfbParent.page = 1
250
253
  this.getList(action)
251
254
  },
@@ -383,7 +386,7 @@ export default {
383
386
  formatValue: "timestamp", //输出时间格式
384
387
  placeholder: ["开始时间", "结束时间"],
385
388
  },
386
- {
389
+ this.projectType!=='wholesale'&&{
387
390
  label: "按价格:", //label
388
391
  ele: "xd-input-range", //package 名称
389
392
  valueKey: "price_range", //form[valueKey]
@@ -419,13 +422,13 @@ export default {
419
422
  },
420
423
  notice: "市场价和分销价",
421
424
  },
422
- {
425
+ this.projectType!=='wholesale'&&{
423
426
  label: "按折扣:", //label
424
427
  ele: "xd-input-range", //package 名称
425
428
  valueKey: "discount_ratio", //form[valueKey]
429
+ labelSlot:'按大于等于最低折扣,小于最高折扣(不含)进行搜索',
426
430
  value: {},
427
431
  disabled: false,
428
- labelSlot:'按大于等于最低折扣,小于最高折扣(不含)进行搜索',
429
432
  setting: {
430
433
  /**单位显示**/
431
434
  //图标优先于文字单位
@@ -108,6 +108,11 @@ export default {
108
108
  default: () => {
109
109
  }
110
110
  },
111
+ info: {
112
+ type: Object,
113
+ default: () => {
114
+ }
115
+ },
111
116
  },
112
117
  data () {
113
118
  return {
@@ -151,7 +156,7 @@ export default {
151
156
  }
152
157
  },
153
158
  created () {
154
-
159
+ console.log(this.info,'iiii')
155
160
  },
156
161
  methods: {
157
162
  ...mapActions('enterprise_buy',
@@ -257,6 +262,27 @@ export default {
257
262
  }
258
263
  ]
259
264
  },
265
+ {
266
+ label: '商品金额:',
267
+ ele: 'el-html',
268
+ type: 'text',
269
+ valueKey: 'supplier_product_amount',
270
+ value: this.$xdHelper.divisionFloatNumber(this.info['total_amount'],100),
271
+ },
272
+ {
273
+ label: '运费金额:',
274
+ ele: 'el-html',
275
+ type: 'text',
276
+ valueKey: 'supplier_logistic_amount',
277
+ value: this.$xdHelper.divisionFloatNumber(this.info['supplier_logistic_amount'],100),
278
+ },
279
+ {
280
+ label: '总金额:',
281
+ ele: 'el-html',
282
+ type: 'text',
283
+ valueKey: 'total_amount',
284
+ value: this.$xdHelper.divisionFloatNumber(this.info['total_amount'],100)+this.$xdHelper.divisionFloatNumber(this.info['supplier_logistic_amount'],100),
285
+ },
260
286
  ]
261
287
 
262
288
  this.renderFormSetAmountKey = Date.now()
@@ -2,12 +2,13 @@
2
2
  <div class="app-container">
3
3
  <el-card class="app-container__list">
4
4
  <div class="app-container__list-name">
5
- <div>{{baseData.main_order.purchase_name}} ({{baseData.main_order.order_status_name}})</div>
5
+ <div v-if="baseData">{{baseData.main_order.purchase_name}} ({{baseData.main_order.order_status_name}})</div>
6
6
  <div>
7
7
  <order-button
8
- v-if="isOperate"
8
+ v-if="isOperate&&baseData"
9
9
  :events="buttonData"
10
10
  :purchase_main_order_id="id"
11
+ :info="baseData['main_order']"
11
12
  @refresh="handeleRefresh"
12
13
  @confirmPrice="handleConfirmPrice"
13
14
  ></order-button>
@@ -15,12 +16,12 @@
15
16
  </div>
16
17
  </el-card>
17
18
  <el-card class="app-container__list">
18
- <table-card :orderData="baseData" :key="baseKey"></table-card>
19
+ <table-card v-if="baseData" :orderData="baseData" :key="baseKey"></table-card>
19
20
  </el-card>
20
21
  <el-card class="app-container__list">
21
22
  <div class="mb-10">商品({{product_num}}个)</div>
22
23
  <div class="export_box">
23
- <div class="mb-10">配送至 <i class="el-icon-location-information"></i>{{baseData.main_order.receipt_province_name}}{{baseData.main_order.receipt_city_name}}{{baseData.main_order.receipt_area_name}}{{baseData.main_order.receipt_street_name}}{{baseData.main_order.receipt_address_detail}}</div>
24
+ <div v-if="baseData" class="mb-10">配送至 <i class="el-icon-location-information"></i>{{baseData.main_order.receipt_province_name}}{{baseData.main_order.receipt_city_name}}{{baseData.main_order.receipt_area_name}}{{baseData.main_order.receipt_street_name}}{{baseData.main_order.receipt_address_detail}}</div>
24
25
  <el-button v-if="isExport" type="primary" size="small" @click="handleExport">导出</el-button>
25
26
  </div>
26
27
  <div class="app-container__list-table">
@@ -61,13 +62,31 @@
61
62
  </template>
62
63
  <template slot="supplier_settlement_amount" slot-scope="scope">
63
64
  <div v-if="scope.row.is_can_edit_amount===1">
64
- <el-input v-model="scope.row.supplier_settlement_amount" type="number" @change="handleChangeAmount(scope.row.supplier_settlement_amount,scope1)" placeholder="请输入清单结算金额"></el-input>
65
+ <el-input disabled v-model="scope.row.supplier_settlement_amount" type="number" @change="handleChangeAmount(scope.row.supplier_settlement_amount,scope1,'supplier_settlement_amount')" placeholder="请输入清单结算金额"></el-input>
65
66
  <span class="red">结算金额为最终支付金额</span>
66
67
  </div>
67
68
  <div v-else>
68
69
  <span class="red">{{scope.row.supplier_settlement_amount}}</span>元
69
70
  </div>
70
71
  </template>
72
+ <template slot="supplier_product_amount" slot-scope="scope">
73
+ <div v-if="scope.row.is_can_edit_amount===1">
74
+ <el-input v-model="scope.row.supplier_product_amount" type="number" @change="handleChangeAmount(scope.row.supplier_product_amount,scope1,'supplier_product_amount')" placeholder="请输入订单金额"></el-input>
75
+ <span class="red">结算金额为最终支付金额</span>
76
+ </div>
77
+ <div v-else>
78
+ <span class="red">{{scope.row.supplier_product_amount}}</span>元
79
+ </div>
80
+ </template>
81
+ <template slot="supplier_logistic_amount" slot-scope="scope">
82
+ <div v-if="scope.row.is_can_edit_amount===1">
83
+ <el-input v-model="scope.row.supplier_logistic_amount" type="number" @change="handleChangeAmount(scope.row.supplier_logistic_amount,scope1,'supplier_logistic_amount')" placeholder="请输入运费"></el-input>
84
+ <span class="red">结算金额为最终支付金额</span>
85
+ </div>
86
+ <div v-else>
87
+ <span class="red">{{scope.row.supplier_logistic_amount}}</span>元
88
+ </div>
89
+ </template>
71
90
  </xd-table>
72
91
  </template>
73
92
  </xd-table>
@@ -181,6 +200,8 @@ export default {
181
200
  { "type": "price", "prop": "total_amount1", "align": "center", "label": "订单金额" },
182
201
  { "type": "normal", "prop": "supplier_name1", "align": "center", "label": "供应商" },
183
202
  // #ifdef admin
203
+ { "type": "normal", "prop": "supplier_product_amount1", "align": "center","width":170, "label": "订单金额" },
204
+ { "type": "normal", "prop": "supplier_logistic_amount1", "align": "center","width":170, "label": "运费" },
184
205
  { "type": "normal", "prop": "supplier_settlement_amount1", "align": "center","width":170, "label": "供应商结算金额" },
185
206
  // #endif
186
207
  // #ifdef oa-finance
@@ -212,6 +233,8 @@ export default {
212
233
  // #endif
213
234
  { "type": "normal", "prop": "supplier_name", "align": "center", "label": "供应商" },
214
235
  // #ifdef admin
236
+ { "type": "normal", "prop": "supplier_product_amount", "align": "center","width":170, "label": "订单金额" },
237
+ { "type": "normal", "prop": "supplier_logistic_amount", "align": "center","width":170, "label": "运费" },
215
238
  { "type": "normal", "prop": "supplier_settlement_amount", "align": "center","width":170, "label": "供应商结算金额" },
216
239
  // #endif
217
240
  // #ifdef oa-finance
@@ -284,15 +307,20 @@ export default {
284
307
  let product_num = 0;
285
308
  this.tables.map(item=>{
286
309
  item.supplier_settlement_amount = this.$xdHelper.divisionFloatNumber(item.supplier_settlement_amount,100)
310
+ item.supplier_logistic_amount = this.$xdHelper.divisionFloatNumber(item.supplier_logistic_amount,100)
311
+ item.supplier_product_amount = this.$xdHelper.divisionFloatNumber(item.supplier_product_amount,100)
287
312
  product_num+=item.order_products.length
288
313
  item.order_products.map(ls=>{
289
314
  ls.supplier_name = item.supplier_name
290
315
  ls.total_amount = item.total_amount
316
+ ls.supplier_logistic_amount = item.supplier_logistic_amount
317
+ ls.supplier_product_amount = item.supplier_product_amount
291
318
  ls.sale_price = this.$xdHelper.divisionFloatNumber(ls.sale_price, 100)
292
319
  ls.purchase_sub_order_id = item.purchase_sub_order_id
293
320
  ls.supplier_settlement_amount = item.supplier_settlement_amount
294
321
  ls.supplier_settlement_amount_finace = item.supplier_settlement_amount
295
322
  ls.actual_settlement_amount = item.actual_settlement_amount
323
+
296
324
  if(item.dist_amount){
297
325
  ls.sub_dist_amount = item.dist_amount
298
326
  }
@@ -414,7 +442,10 @@ export default {
414
442
  let { row, column, rowIndex, columnIndex } = data
415
443
  let mergeColumns = [];
416
444
  //rowIndex,columnIndex的值是从0开始
417
- // #ifdef admin oa-finance
445
+ // #ifdef admin
446
+ mergeColumns = [5,6,7,8,9] //第4列需要合并行,并且合并到数组最大值,
447
+ // #endif
448
+ // #ifdef oa-finance
418
449
  mergeColumns = [5,6,7] //第4列需要合并行,并且合并到数组最大值,
419
450
  // #endif
420
451
  // #ifdef partner-wholesale
@@ -451,9 +482,38 @@ export default {
451
482
  this.$message.error('小数点后最多保留两位小数')
452
483
  return
453
484
  }
485
+ if(!reg.test(Number(copyData[i]['supplier_product_amount']))){
486
+ this.$message.error('小数点后最多保留两位小数')
487
+ return
488
+ }
489
+ if(!reg.test(Number(copyData[i]['supplier_logistic_amount']))){
490
+ this.$message.error('小数点后最多保留两位小数')
491
+ return
492
+ }
454
493
  if(copyData[i]['supplier_settlement_amount']){
455
494
  copyData[i]['amount'] = this.$xdHelper.multiplyFloatNumber(Number(copyData[i]['supplier_settlement_amount']),100)
495
+ copyData[i]['supplier_settlement_amount'] = this.$xdHelper.multiplyFloatNumber(Number(copyData[i]['supplier_settlement_amount']),100)
496
+ }
497
+ if(copyData[i]['supplier_product_amount']){
498
+ copyData[i]['supplier_product_amount'] = this.$xdHelper.multiplyFloatNumber(Number(copyData[i]['supplier_product_amount']),100)
499
+ }
500
+ if(copyData[i]['supplier_logistic_amount']){
501
+ copyData[i]['supplier_logistic_amount'] = this.$xdHelper.multiplyFloatNumber(Number(copyData[i]['supplier_logistic_amount']),100)
456
502
  }
503
+ copyData[i]['order_products'].map(item=>{
504
+ if(item.supplier_product_amount){
505
+ item.supplier_product_amount= this.$xdHelper.multiplyFloatNumber(Number(item.supplier_product_amount),100)
506
+ }
507
+ if(item.supplier_settlement_amount){
508
+ item.supplier_settlement_amount= this.$xdHelper.multiplyFloatNumber(Number(item.supplier_settlement_amount),100)
509
+ }
510
+ if(item.supplier_settlement_amount_finace){
511
+ item.supplier_settlement_amount_finace= this.$xdHelper.multiplyFloatNumber(Number(item.supplier_settlement_amount_finace),100)
512
+ }
513
+ if(item.supplier_logistic_amount){
514
+ item.supplier_logistic_amount= this.$xdHelper.multiplyFloatNumber(Number(item.supplier_logistic_amount),100)
515
+ }
516
+ })
457
517
  }
458
518
  console.log(copyData,'ccc')
459
519
  let data = {
@@ -472,8 +532,32 @@ export default {
472
532
  })
473
533
  },
474
534
  //结算金额改变
475
- handleChangeAmount(value,scope1){
476
- this.$set(this.tables[scope1['index']],'supplier_settlement_amount',value)
535
+ handleChangeAmount(value,scope1,type){
536
+ // debugger
537
+ if(type==='supplier_settlement_amount'){
538
+ this.$set(this.tables[scope1['index']],type,value)
539
+ }else if(type==='supplier_product_amount'){
540
+ this.$set(this.tables[scope1['index']],type,value)
541
+ let num = 0;
542
+ num = Number(value) + Number(this.tables[scope1['index']]['supplier_logistic_amount'])
543
+ this.$set(this.tables[scope1['index']],'supplier_settlement_amount',num)
544
+ }else if(type==='supplier_logistic_amount'){
545
+ this.$set(this.tables[scope1['index']],type,value)
546
+ let num = 0;
547
+ num = Number(value) + Number(this.tables[scope1['index']]['supplier_product_amount'])
548
+ this.$set(this.tables[scope1['index']],'supplier_settlement_amount',num)
549
+ console.log(num,'nnn')
550
+ }
551
+ this.tables.map(item=>{
552
+ item.order_products.map(ls=>{
553
+ ls.supplier_product_amount = item.supplier_product_amount
554
+ ls.supplier_logistic_amount = item.supplier_logistic_amount
555
+ ls.supplier_settlement_amount = item.supplier_settlement_amount
556
+ ls.supplier_settlement_amount_finace = item.supplier_settlement_amount
557
+ })
558
+ })
559
+ this.tableRefresh = Date.now()
560
+ this.tableKey = Date.now()
477
561
  console.log(this.tables,value,scope1,2222)
478
562
  },
479
563
  goBack () {
@@ -13,7 +13,7 @@
13
13
  <span>清单预算:</span><span class="red">{{$xdHelper.divisionFloatNumber(baseData.purchase_plan_amount, 100)}}</span>
14
14
  </div>
15
15
  <div class="card-box_base_item">
16
- <span>总金额:</span><span class="red">{{$xdHelper.divisionFloatNumber(baseData.total_amount, 100)}}</span>
16
+ <span>商品金额:</span><span class="red">{{$xdHelper.divisionFloatNumber(baseData.total_amount, 100)}}</span>
17
17
  <el-tooltip
18
18
  popper-class="notice-popper"
19
19
  placement="top"
@@ -27,6 +27,17 @@
27
27
  <!-- #endif -->
28
28
  <div class="card-box_base_item">
29
29
  <span>用户实际结算金额:</span><span class="red">{{baseData.user_settlement_amount===-1?'--':$xdHelper.divisionFloatNumber(baseData.user_settlement_amount, 100)}}</span>
30
+ </div>
31
+ <!-- #ifdef admin -->
32
+ <div class="card-box_base_item">
33
+ <span>结算总金额:</span><span class="red">{{baseData.supplier_settlement_amount===-1?'--':$xdHelper.divisionFloatNumber(baseData.supplier_settlement_amount, 100)}}</span>
34
+ </div>
35
+ <div class="card-box_base_item">
36
+ <span>订单金额:</span><span class="red">{{baseData.supplier_product_amount===-1?'--':$xdHelper.divisionFloatNumber(baseData.supplier_product_amount, 100)}}</span>
37
+ </div>
38
+ <!-- #endif -->
39
+ <div class="card-box_base_item">
40
+ <span>运费金额:</span><span class="red">{{baseData.supplier_logistic_amount===-1?'--':$xdHelper.divisionFloatNumber(baseData.supplier_logistic_amount, 100)}}</span>
30
41
  </div>
31
42
  <!-- #ifdef oa-finance -->
32
43
  <div class="card-box_base_item">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-admin-library",
3
- "version": "1.1.66",
3
+ "version": "1.1.67",
4
4
  "description": "聚福宝福利后台管理系统公共模块",
5
5
  "author": "goashiyong <gaoshiyong1272@vip.163.com>",
6
6
  "scripts": {