<template>
  <view>
    <view class="card_form">
      <hs-cell title="优先级" required>
        <hs-radio v-model:valueModel="useModel.formData.value.level" :Enums="HouseWorkOrdersLevelEnum" />
      </hs-cell>
      <hs-cell v-if="useModel?.formData?.value?.pageType === '领取工单'" title="处理人" required borderTop>
        <view class="handler_label">{{ useModel?.formData?.value?.assign_employees?.name }}</view>
      </hs-cell>
      <hs-popup-employees v-else title="处理人" v-model:valueModel="useModel.formData.value.assign_employees_id" />
      <hs-cell title="预计完成时间" required borderTop isLink>
        <hs-day-picker v-model:valueModel="useModel.formData.value.predict_complete_at" />前
      </hs-cell>
    </view>
    <view class="card_form">
      <hs-cell-textarea title="备注说明" placeholder="请输入备注" v-model:valueModel="useModel.formData.value.assign_remark" />
    </view>
    <hs-footer btnParimaryName="提交" @handleParmaryClick="method?.handleSubmit" />
  </view>
</template>

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

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

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