<template>
  <SysDialog
    class="formula-modle"
    :title="getBindValue.title"
    :width="getBindValue.width"
    :height="getBindValue.height"
    :visible="dialog.visible"
    @onClose="hanleOnClose"
    @onConfirm="confirm"
  >
    <template #content>
      <!-- 重算-账单 -->
      <el-form
        class="el-oreder-form"
        :model="state.form"
        :inline="true"
      >
        <el-input
          v-model="state.form.textarea"
          maxlength="1000"
          placeholder="请入订单号/运单号"
          show-word-limit
          type="textarea"
        />
      </el-form>
    </template>
  </SysDialog>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import SysDialog from '@/components/SysDialog.vue';
import useDialog from '@/hooks/useDialog';
import useAddBillMainOrder from '@/composables/business/billmain/useAddBillMainOrder';

// 弹框一些配置
const getBindValue = ref<Recordable>({
    title: "运单号/提单号",
    width: 460,
    height: 300
})
 
//声明事件
const emit = defineEmits(['saveOrder']);


//弹框属性
const { dialog, onClose, onShow } = useDialog()

// 基础数据处理
const { show, confirm, hanleOnClose, state } = useAddBillMainOrder(onClose, onShow, emit)


//父组件调用子组件显示弹框
//暴露出去给外部使用
defineExpose({
    show
})
</script>
      
<style lang="scss" scoped>
.el-oreder-form {
    height: 100%;
    .el-textarea {
        height: 100%;
        :deep(.el-textarea__inner) {
            height: 100%;
        }
    }
}
</style>