Browse Source

材料调差

ZaiZai 1 year ago
parent
commit
98adb93d99

+ 2 - 2
src/api/modules/debit-pay/material/material.js

@@ -17,11 +17,11 @@ export default {
         }, false)
     },
     //材料名称
-    async materialName(contractId, contractPeriodId) {
+    async materialName(contractId, contractPeriodId, id) {
         return HcApi({
             url: '/api/blade-meter/contractMaterial/get-all-material3',
             method: 'post',
-            data: { contractId, contractPeriodId },
+            data: { contractId, contractPeriodId, id },
         }, false)
     },
     //分页

+ 8 - 4
src/views/debit-pay/material/components/material/dataModal.vue

@@ -12,7 +12,12 @@
                             <el-form-item prop="key1">
                                 <el-select v-model="formModel.meterPeriodId" placeholder="选择计量期" filterable block>
                                     <template v-for="item in adjustment" :key="item.id">
-                                        <el-option :label="item.periodNumber" :value="item.id" :disabled="item.approveStatus !== 0" />
+                                        <template v-if="dataId">
+                                            <el-option :label="item.periodNumber" :value="item.id" :disabled="item.approveStatus !== 0" />
+                                        </template>
+                                        <template v-else>
+                                            <el-option v-if="item.approveStatus === 0" :label="item.periodNumber" :value="item.id" />
+                                        </template>
                                     </template>
                                 </el-select>
                                 <!-- el-select v-model="formModel.meterPeriodId" placeholder="选择计量期" filterable block>
@@ -263,7 +268,6 @@ const detailsModalShow = () => {
     getPeriodMeasurement()
     getPeriodAdjustment()
     //过去数据详情
-    console.log(dataId.value)
     if (!isNullES(dataId.value)) {
         getDetailData()
     } else {
@@ -285,7 +289,7 @@ const getDetailData = async () => {
         } catch { /* empty */ }
         isAdjustDate.value = true
         getMaterialName()
-        getMaterialRangePrice(obj.currentPriceId)
+        //getMaterialRangePrice(obj.currentPriceId)
     } else {
         window.$message.error(msg ?? '数据异常')
         modalClose()
@@ -333,7 +337,7 @@ const adjustmentChange = () => {
 const materialName = ref([])
 const getMaterialName = async () => {
     const { contractPeriodId } = formModel.value
-    const { data } = await mainApi.materialName(contractId.value, contractPeriodId)
+    const { data } = await mainApi.materialName(contractId.value, contractPeriodId, dataId.value ?? null)
     materialName.value = getArrValue(data)
 }
 const materialNameChange = () => {