Browse Source

fix : 核查详情得分显示

梦辉 1 year ago
parent
commit
2c5aaea705

+ 3 - 2
src/subPages/pages/commitment/commitmentDetail/components/IndicatorComponents.vue

@@ -175,8 +175,9 @@ export default {
               label="核查得分"
           >
             <template #input>
-              <view v-if="item.auditScore === 0">0分</view>
-              <view v-if="item.auditScore === -10">-10分</view>
+              <view v-if="item.auditResult === 0 && item.auditScore === 0">符合</view>
+              <view v-if="item.auditResult === 1 && item.auditScore === 0">整改 0分</view>
+              <view v-if="item.auditResult === 2 && item.auditScore === -10">整改扣分 -10分</view>
             </template>
           </van-field>
           <!--核查说明-->

+ 24 - 1
src/subPages/pages/commitment/components/commitmentConfirmForm/index.vue

@@ -58,6 +58,28 @@ export default {
     handleCheckResultConfirm(value) {
       this.formStates.auditResult = value.text
       this.checkResultPopupVisible = false
+      //如果选择的不是符合,核查得分选择去掉符合
+      //先清空核查得分
+      this.formStates.auditScore = ''
+      if (this.formStates.auditResult !== '符合') {
+        this.checkGoalColumns = [
+          {
+            text: '整改 0分',
+            value: 0
+          },
+          {
+            text: '整改扣分 -10分',
+            value: -10
+          }
+        ]
+      } else {
+        this.checkGoalColumns = [
+          {
+            text: '符合',
+            value: 0
+          }
+        ]
+      }
     },
     handleCheckGoalConfirm(value) {
       this.formStates.auditScore = value.text
@@ -114,13 +136,14 @@ export default {
       <van-field
           readonly
           clickable
+          :disabled="!formStates.auditResult"
           name="auditScore"
           :value="formStates.auditScore"
           label="核查得分"
           placeholder="请选择核查得分"
           @click="checkScorePopupVisible = true"
       />
-      <van-popup v-model="checkScorePopupVisible" position="bottom">
+      <van-popup v-if="formStates.auditResult" v-model="checkScorePopupVisible" position="bottom">
         <van-picker
             show-toolbar
             value-key="text"