فهرست منبع

众聘发布职位金额进出都乘除100

lifanagju_citu 10 ماه پیش
والد
کامیت
ca3578496d
2فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 1 0
      src/utils/position.js
  2. 1 1
      src/views/recruit/enterprise/positionManagement/components/item.vue

+ 1 - 0
src/utils/position.js

@@ -91,6 +91,7 @@ const getRation = async () => {
 getRation()
 
 export const commissionCalculation = (count, type) => {
+  if (count && type === 'realPay') return ((count - 0)/100) // 众聘发布需要支付金额(需要统一除以100)
   if (!data || !Object.keys(data).length) return
   const ratio = parseFloat(data[list[type]]) / 100
   const value = (count * ratio)/100 // 后端需要除100

+ 1 - 1
src/views/recruit/enterprise/positionManagement/components/item.vue

@@ -106,7 +106,7 @@ const spuName = ref('')
 const toPay = (val) => {
   spuId.value = val.id || ''
   spuName.value = val.name || ''
-  cost.value = (val.hirePrice - 0) || 0
+  cost.value = commissionCalculation(val.hirePrice, 'realPay')
   // 打开支付弹窗
   showConfirmPaymentDialog.value = true
 }