jufubao-admin-library 1.1.169 → 1.1.170

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.
@@ -10,13 +10,13 @@ module.exports = {
10
10
  mapFn: "purchaseMainOrder",
11
11
  isPublic: true,
12
12
  // #ifdef admin
13
- path: '/wholesale-admin/v1/purchase-main-order',
13
+ path: '/wholesale-admin/v1/finance/purchase-sub-order',
14
14
  // #endif
15
15
  // #ifdef partner-wholesale
16
16
  path: '/wholesale-partner/v1/purchase-main-order',
17
17
  // #endif
18
18
  // #ifdef oa-finance
19
- path: '/wholesale-partner/v1/finance/purchase-main-order',
19
+ path: '/wholesale-partner/v1/finance/purchase-sub-order',
20
20
  // #endif
21
21
  isRule: false,
22
22
  data: {
@@ -33,13 +33,13 @@ module.exports = {
33
33
  mapFn: "purchaseMainOrderInfo",
34
34
  isPublic: true,
35
35
  // #ifdef admin
36
- path: '/wholesale-admin/v1/purchase-main-order/:purchase_main_order_id',
36
+ path: '/wholesale-admin/v1/finance/purchase-sub-order/:purchase_main_order_id',
37
37
  // #endif
38
38
  // #ifdef partner-wholesale
39
39
  path: '/wholesale-partner/v1/purchase-main-order/:purchase_main_order_id',
40
40
  // #endif
41
41
  // #ifdef oa-finance
42
- path: '/wholesale-partner/v1/finance/purchase-main-order/:purchase_main_order_id',
42
+ path: '/wholesale-partner/v1/finance/purchase-sub-order/:purchase_main_order_id',
43
43
  // #endif
44
44
  isRule: false,
45
45
  params: {
@@ -178,10 +178,10 @@ module.exports = {
178
178
  {
179
179
  title: '订单供货商列表',
180
180
  mapFn: "purchaseMainOrderSuppliers",
181
- path: '/wholesale-partner/v1/purchase-main-order/:purchase_main_order_id/suppliers',
181
+ path: '/wholesale-partner/v1/purchase-sub-order/:purchase_sub_order_id/suppliers',
182
182
  isRule: false,
183
183
  params: {
184
- purchase_main_order_id: ['purchase_main_order_id', 'String', '必填'],
184
+ purchase_sub_order_id: ['purchase_sub_order_id', 'String', '必填'],
185
185
  },
186
186
  resultKey: "data",
187
187
  disabled: true,
@@ -356,7 +356,8 @@ export default {
356
356
  },
357
357
  //上传发票
358
358
  handleUploadInvoice(){
359
- this.purchaseMainOrderSuppliers({purchase_main_order_id: this.purchase_main_order_id,})
359
+
360
+ this.purchaseMainOrderSuppliers({purchase_sub_order_id: this.$route.params.id})
360
361
  .then(res=>{
361
362
  console.log(res,'sss')
362
363
  this.tableData = res.data.list
@@ -379,8 +380,8 @@ export default {
379
380
  },
380
381
  //上传发票form初始化
381
382
  initFormUploadInvoice (params) {
382
- console.log(params,123123123)
383
- this.listFormUploadInvoice = [
383
+ console.log(params,this.info, 123123123)
384
+ let listFormUploadInvoice = [
384
385
  {
385
386
  label: " ",
386
387
  ele: "xd-radio",
@@ -414,6 +415,16 @@ export default {
414
415
  slot:'tableform'
415
416
  }
416
417
  ].filter(i=>i)
418
+
419
+ let listFormUploadInvoice2 = [
420
+ {
421
+ lebel:'',
422
+ ele:'slot',
423
+ slot:'tableform'
424
+ }
425
+ ]
426
+
427
+ this.listFormUploadInvoice = this.info.is_show_partner_invoice ? listFormUploadInvoice : listFormUploadInvoice2
417
428
  this.dialogVisibleUploadInvoice = true
418
429
  this.renderFormUploadInvoiceKey = Date.now()
419
430
 
@@ -467,6 +478,16 @@ export default {
467
478
  purchase_main_order_id:this.purchase_main_order_id,
468
479
  items:this.tableData
469
480
  }
481
+ let hasEmpty = false;
482
+ this.tableData.forEach(item => {
483
+ if(!item.invoice_url){
484
+ hasEmpty = true;
485
+ }
486
+ })
487
+ if(hasEmpty){
488
+ this.$message.error('请上传发票')
489
+ return;
490
+ }
470
491
  this.purchaseMainOrderSupplierUpload(data).then(res=>{
471
492
  this.$message({
472
493
  message: '上传发票成功',
@@ -7,7 +7,7 @@
7
7
  <order-button
8
8
  v-if="isOperate&&baseData"
9
9
  :events="buttonData"
10
- :purchase_main_order_id="id"
10
+ :purchase_main_order_id="purchase_main_order_id"
11
11
  :info="baseData['main_order']"
12
12
  @refresh="handeleRefresh"
13
13
  @confirmPrice="handleConfirmPrice"
@@ -172,6 +172,7 @@ export default {
172
172
  formList: null,
173
173
  formParams: {},
174
174
  id: null,
175
+ purchase_main_order_id: "",
175
176
  renderFormKey: Date.now(),
176
177
  customForm: {
177
178
  company_id: '',
@@ -199,13 +200,13 @@ export default {
199
200
  // #endif
200
201
  { "type": "price", "prop": "total_amount1", "align": "center", "label": "订单金额" },
201
202
  { "type": "normal", "prop": "supplier_name1", "align": "center", "label": "供应商" },
202
- // #ifdef admin
203
+ // #ifdef admin oa-finance
203
204
  { "type": "normal", "prop": "supplier_product_amount1", "align": "center","width":170, "label": "订单金额" },
204
205
  { "type": "normal", "prop": "supplier_logistic_amount1", "align": "center","width":170, "label": "运费" },
205
206
  { "type": "normal", "prop": "supplier_settlement_amount1", "align": "center","width":170, "label": "供应商结算金额" },
206
207
  // #endif
207
208
  // #ifdef oa-finance
208
- { "type": "price", "prop": "supplier_settlement_amount1", "align": "center","width":170, "label": "实际结算货款" },
209
+ // { "type": "price", "prop": "supplier_settlement_amount1", "align": "center","width":170, "label": "实际结算货款" },
209
210
  // #endif
210
211
  ],
211
212
  orderHeadersIn:[
@@ -232,13 +233,13 @@ export default {
232
233
  { "type": "price", "prop": "total_amount", "align": "center", "label": "订单金额" },
233
234
  // #endif
234
235
  { "type": "normal", "prop": "supplier_name", "align": "center", "label": "供应商" },
235
- // #ifdef admin
236
+ // #ifdef admin oa-finance
236
237
  { "type": "normal", "prop": "supplier_product_amount", "align": "center","width":170, "label": "订单金额" },
237
238
  { "type": "normal", "prop": "supplier_logistic_amount", "align": "center","width":170, "label": "运费" },
238
239
  { "type": "normal", "prop": "supplier_settlement_amount", "align": "center","width":170, "label": "供应商结算金额" },
239
240
  // #endif
240
241
  // #ifdef oa-finance
241
- { "type": "price", "prop": "actual_settlement_amount", "align": "center","width":170, "label": "实际结算货款" },
242
+ // { "type": "price", "prop": "actual_settlement_amount", "align": "center","width":170, "label": "实际结算货款" },
242
243
  // #endif
243
244
  ],
244
245
  tables:[],
@@ -302,10 +303,11 @@ export default {
302
303
  }
303
304
  this.purchaseMainOrderInfo(params).then(res => {
304
305
  this.baseData = res.data.order
306
+ this.purchase_main_order_id = res.data.order.main_order.purchase_main_order_id;
305
307
  this.tables = res.data.order.sub_orders
306
308
  this.buttonData = res['data']['order']['buttons']
307
309
  let product_num = 0;
308
- this.tables.map(item=>{
310
+ this.tables = this.tables.map(item=>{
309
311
  item.supplier_settlement_amount = this.$xdHelper.divisionFloatNumber(item.supplier_settlement_amount,100)
310
312
  item.supplier_logistic_amount = this.$xdHelper.divisionFloatNumber(item.supplier_logistic_amount,100)
311
313
  item.supplier_product_amount = this.$xdHelper.divisionFloatNumber(item.supplier_product_amount,100)
@@ -313,8 +315,8 @@ export default {
313
315
  item.order_products.map(ls=>{
314
316
  ls.supplier_name = item.supplier_name
315
317
  ls.total_amount = item.total_amount
316
- ls.supplier_logistic_amount = item.supplier_logistic_amount
317
- ls.supplier_product_amount = item.supplier_product_amount
318
+ ls.supplier_logistic_amount = item.supplier_logistic_amount || 0
319
+ ls.supplier_product_amount = item.supplier_product_amount || 0
318
320
  ls.sale_price = this.$xdHelper.divisionFloatNumber(ls.sale_price, 100)
319
321
  ls.purchase_sub_order_id = item.purchase_sub_order_id
320
322
  ls.supplier_settlement_amount = item.supplier_settlement_amount
@@ -327,7 +329,9 @@ export default {
327
329
  if(item.is_can_edit_amount||item.is_can_edit_amount===0){
328
330
  ls.is_can_edit_amount = item.is_can_edit_amount
329
331
  }
332
+ return ls;
330
333
  })
334
+ return item;
331
335
  })
332
336
  this.product_num = product_num;
333
337
  console.log(this.tables,product_num,'this.tables')
@@ -517,7 +521,7 @@ export default {
517
521
  }
518
522
  console.log(copyData,'ccc')
519
523
  let data = {
520
- purchase_main_order_id:this.id,
524
+ purchase_main_order_id: this.purchase_main_order_id,
521
525
  items:copyData
522
526
  }
523
527
  this.supplierSettlementAmountBatch(data)
@@ -304,7 +304,18 @@ export default {
304
304
  let params = this.handleGetSearchForm()
305
305
  let loading = Loading.service({})
306
306
  this.purchaseMainOrder(params).then(res => {
307
- const { orders, total_size, next_page_token } = res.data
307
+ let { orders, total_size, next_page_token } = res.data
308
+ // #ifdef oa-finance admin
309
+ /**
310
+ * 集采1.5 (加盟商-财务、超管)
311
+ * 接口从主单列表、详情 切换为 拆单列表详情
312
+ * 详情页也变换为拆单详情, 传拆单号。
313
+ */
314
+ orders = orders.map(item => {
315
+ item.main_order = item.sub_order;
316
+ return item;
317
+ })
318
+ // #endif
308
319
  orders.map(item => {
309
320
  item.confirm_time = window.getTimeFormat(item['main_order']['confirm_time'])
310
321
  item.purchase_main_order_id = item['main_order']['purchase_main_order_id']
@@ -523,7 +534,11 @@ export default {
523
534
  },
524
535
 
525
536
  getLink ({ row, value, index }) {
526
- return `/enterprise_buy/detail/${row.purchase_main_order_id}`
537
+ let order_id = row.purchase_main_order_id;
538
+ // #ifdef oa-finance admin
539
+ order_id = row.main_order.purchase_sub_order_id;
540
+ // #endif
541
+ return `/enterprise_buy/detail/${order_id}`
527
542
  },
528
543
 
529
544
  handleCustom ({ action, data }) {
@@ -70,7 +70,7 @@
70
70
  </div>
71
71
  </div>
72
72
  <!-- #ifdef oa-finance -->
73
- <div class="card-box_base_item">
73
+ <div v-if="baseData.is_show_partner_invoice" class="card-box_base_item">
74
74
  <span>加盟商发票:</span><span>{{baseData.invoice}}</span>
75
75
  </div>
76
76
  <div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-admin-library",
3
- "version": "1.1.169",
3
+ "version": "1.1.170",
4
4
  "description": "聚福宝福利后台管理系统公共模块",
5
5
  "author": "goashiyong <gaoshiyong1272@vip.163.com>",
6
6
  "scripts": {