ZaiZai il y a 1 an
Parent
commit
3c2e94124a
1 fichiers modifiés avec 16 ajouts et 0 suppressions
  1. 16 0
      src/views/debit-pay/material/components/material/dataModal.vue

+ 16 - 0
src/views/debit-pay/material/components/material/dataModal.vue

@@ -280,12 +280,28 @@ const getDetailData = async () => {
         } catch { /* empty */ }
         isAdjustDate.value = true
         getMaterialName()
+        getMaterialRangePrice(obj.currentPriceId)
     } else {
         window.$message.error(msg ?? '数据异常')
         modalClose()
     }
 }
 
+//获取计算公式
+const getMaterialRangePrice = async (id) => {
+    const { code, msg, data } = await mainApi.getMaterialRangePrice({
+        priceId: id,
+    })
+    const { isAdjust, rangePriceRatio, adjustCalculation } = getObjValue(data)
+    if (code !== 200) {
+        window.$message.error(msg ?? '操作失败')
+        return
+    }
+    isAdjusts.value = isAdjust ?? 0
+    formModel.value.rangePriceRatio = rangePriceRatio
+    formModel.value.adjustCalculation = adjustCalculation
+}
+
 //获取计量期
 const measurement = ref([])
 const getPeriodMeasurement = async () => {