<template>
  <view>
    <view class="card_form">
      <hs-cell title="是否确认完工" required borderTop>
        <hs-radio
          v-model:valueModel="useModel.formData.value.is_completed"
          :Enums="useModel?.HouseWorkOrdersAcceptResultEnum?.value"
        />
      </hs-cell>
      <view class="text_gray">
        您选择 “否” 后，这个工单会重新回到处理中，我们会安排工作人员再次处理。
      </view>
    </view>
    <view class="card_form" v-if="useModel?.formData?.value?.is_completed === '0'">
      <hs-cell-textarea
        title="填写原因"
        required
        placeholder="请详细描述情况，包括具体位置现象等 "
        v-model:valueModel="useModel.formData.value.accept_remark"
      />
    </view>

    <hs-footer btnParimaryName="提交" @handleParmaryClick="method?.handleSubmit" />
  </view>
</template>

<script setup lang="ts">
import { onLoad } from '@dcloudio/uni-app'
import method from './method'
import useModel from './model'
import { Apis } from '@/gen/Apis'

onLoad(e => {
  method?.init(e)
})
</script>

<style lang="scss">
@import './style.scss';
</style>
