<template>
  <a-spin :spinning="loading">
    <JFormContainer :disabled="disabled">
      <template #detail>
        <a-form v-bind="formItemLayout" name="DirectiveOrderForm" ref="formRef">
          <a-row>
						<a-col :span="24">
							<a-form-item label="单号" v-bind="validateInfos.orderNo" id="DirectiveOrderForm-orderNo" name="orderNo">
								<a-input v-model:value="formData.orderNo" placeholder="请输入单号"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="工单类型 1护理;2医疗:3仓库;4行政" v-bind="validateInfos.orderType" id="DirectiveOrderForm-orderType" name="orderType">
								<a-input v-model:value="formData.orderType" placeholder="请输入工单类型 1护理;2医疗:3仓库;4行政"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="执行类型 1单人 2协助 3转单" v-bind="validateInfos.optType" id="DirectiveOrderForm-optType" name="optType">
								<a-input v-model:value="formData.optType" placeholder="请输入执行类型 1单人 2协助 3转单"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="数据池主表ID，nu_biz_nu_directive_data_pool.id" v-bind="validateInfos.poolId" id="DirectiveOrderForm-poolId" name="poolId">
								<a-input v-model:value="formData.poolId" placeholder="请输入数据池主表ID，nu_biz_nu_directive_data_pool.id"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="服务指令计划ID,nu_biz_nu_customer_care_server.id;即时指令计划ID,nu_biz_nu_customer_care_server_instant.id" v-bind="validateInfos.bizId" id="DirectiveOrderForm-bizId" name="bizId">
								<a-input v-model:value="formData.bizId" placeholder="请输入服务指令计划ID,nu_biz_nu_customer_care_server.id;即时指令计划ID,nu_biz_nu_customer_care_server_instant.id"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="业务类型" v-bind="validateInfos.bizType" id="DirectiveOrderForm-bizType" name="bizType">
								<a-input v-model:value="formData.bizType" placeholder="请输入业务类型"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="护理单元名称" v-bind="validateInfos.nuName" id="DirectiveOrderForm-nuName" name="nuName">
								<a-input v-model:value="formData.nuName" placeholder="请输入护理单元名称"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="长者ID，nu_biz_elder_info.id" v-bind="validateInfos.elderId" id="DirectiveOrderForm-elderId" name="elderId">
								<a-input v-model:value="formData.elderId" placeholder="请输入长者ID，nu_biz_elder_info.id"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="长者名称" v-bind="validateInfos.elderName" id="DirectiveOrderForm-elderName" name="elderName">
								<a-input v-model:value="formData.elderName" placeholder="请输入长者名称"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="员工ID" v-bind="validateInfos.employeeId" id="DirectiveOrderForm-employeeId" name="employeeId">
								<a-input v-model:value="formData.employeeId" placeholder="请输入员工ID"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="员工姓名" v-bind="validateInfos.employeeName" id="DirectiveOrderForm-employeeName" name="employeeName">
								<a-input v-model:value="formData.employeeName" placeholder="请输入员工姓名"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="服务指令ID，nu_config_service_directive.id" v-bind="validateInfos.directiveId" id="DirectiveOrderForm-directiveId" name="directiveId">
								<a-input v-model:value="formData.directiveId" placeholder="请输入服务指令ID，nu_config_service_directive.id"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="服务指令名称" v-bind="validateInfos.directiveName" id="DirectiveOrderForm-directiveName" name="directiveName">
								<a-input v-model:value="formData.directiveName" placeholder="请输入服务指令名称"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="周期类型ID" v-bind="validateInfos.cycleTypeId" id="DirectiveOrderForm-cycleTypeId" name="cycleTypeId">
								<a-input v-model:value="formData.cycleTypeId" placeholder="请输入周期类型ID"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="周期类型" v-bind="validateInfos.cycleType" id="DirectiveOrderForm-cycleType" name="cycleType">
								<a-input v-model:value="formData.cycleType" placeholder="请输入周期类型"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="周期值" v-bind="validateInfos.cycleValue" id="DirectiveOrderForm-cycleValue" name="cycleValue">
								<a-input v-model:value="formData.cycleValue" placeholder="请输入周期值"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="服务指令图片大图" v-bind="validateInfos.previewFile" id="DirectiveOrderForm-previewFile" name="previewFile">
								<a-input v-model:value="formData.previewFile" placeholder="请输入服务指令图片大图"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="服务指令图片小图" v-bind="validateInfos.previewFileSmall" id="DirectiveOrderForm-previewFileSmall" name="previewFileSmall">
								<a-input v-model:value="formData.previewFileSmall" placeholder="请输入服务指令图片小图"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="语音文件" v-bind="validateInfos.mp3File" id="DirectiveOrderForm-mp3File" name="mp3File">
								<a-input v-model:value="formData.mp3File" placeholder="请输入语音文件"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="视频文件" v-bind="validateInfos.mp4File" id="DirectiveOrderForm-mp4File" name="mp4File">
								<a-input v-model:value="formData.mp4File" placeholder="请输入视频文件"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="服务时长（分钟）" v-bind="validateInfos.serviceDuration" id="DirectiveOrderForm-serviceDuration" name="serviceDuration">
								<a-input v-model:value="formData.serviceDuration" placeholder="请输入服务时长（分钟）"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="服务说明" v-bind="validateInfos.serviceContent" id="DirectiveOrderForm-serviceContent" name="serviceContent">
								<a-input v-model:value="formData.serviceContent" placeholder="请输入服务说明"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="是否是服务指令包 Y是 N否" v-bind="validateInfos.izPackage" id="DirectiveOrderForm-izPackage" name="izPackage">
								<a-input v-model:value="formData.izPackage" placeholder="请输入是否是服务指令包 Y是 N否"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="收费价格" v-bind="validateInfos.tollPrice" id="DirectiveOrderForm-tollPrice" name="tollPrice">
								<a-input-number v-model:value="formData.tollPrice" placeholder="请输入收费价格" style="width: 100%" />
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="提成价格" v-bind="validateInfos.comPrice" id="DirectiveOrderForm-comPrice" name="comPrice">
								<a-input-number v-model:value="formData.comPrice" placeholder="请输入提成价格" style="width: 100%" />
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="实际提成价格" v-bind="validateInfos.realComPrice" id="DirectiveOrderForm-realComPrice" name="realComPrice">
								<a-input-number v-model:value="formData.realComPrice" placeholder="请输入实际提成价格" style="width: 100%" />
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="开始时间" v-bind="validateInfos.startTime" id="DirectiveOrderForm-startTime" name="startTime">
								<a-date-picker placeholder="请选择开始时间"  v-model:value="formData.startTime" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"  allow-clear />
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="结束时间" v-bind="validateInfos.endTime" id="DirectiveOrderForm-endTime" name="endTime">
								<a-date-picker placeholder="请选择结束时间"  v-model:value="formData.endTime" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"  allow-clear />
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="实际开始员工" v-bind="validateInfos.beginEmp" id="DirectiveOrderForm-beginEmp" name="beginEmp">
								<a-input v-model:value="formData.beginEmp" placeholder="请输入实际开始员工"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="实际开始时间" v-bind="validateInfos.beginTime" id="DirectiveOrderForm-beginTime" name="beginTime">
								<a-date-picker placeholder="请选择实际开始时间"  v-model:value="formData.beginTime" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"  allow-clear />
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="实际结束员工" v-bind="validateInfos.finishEmp" id="DirectiveOrderForm-finishEmp" name="finishEmp">
								<a-input v-model:value="formData.finishEmp" placeholder="请输入实际结束员工"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="实际结束时间" v-bind="validateInfos.finishTime" id="DirectiveOrderForm-finishTime" name="finishTime">
								<a-date-picker placeholder="请选择实际结束时间"  v-model:value="formData.finishTime" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"  allow-clear />
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="是否开始 Y是 N否" v-bind="validateInfos.izStart" id="DirectiveOrderForm-izStart" name="izStart">
								<a-input v-model:value="formData.izStart" placeholder="请输入是否开始 Y是 N否"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="是否完成 Y是 N否" v-bind="validateInfos.izFinish" id="DirectiveOrderForm-izFinish" name="izFinish">
								<a-input v-model:value="formData.izFinish" placeholder="请输入是否完成 Y是 N否"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="发起人ID" v-bind="validateInfos.initiatorId" id="DirectiveOrderForm-initiatorId" name="initiatorId">
								<a-input v-model:value="formData.initiatorId" placeholder="请输入发起人ID"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="发起人姓名" v-bind="validateInfos.initiatorName" id="DirectiveOrderForm-initiatorName" name="initiatorName">
								<a-input v-model:value="formData.initiatorName" placeholder="请输入发起人姓名"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="创建人" v-bind="validateInfos.createEmp" id="DirectiveOrderForm-createEmp" name="createEmp">
								<a-input v-model:value="formData.createEmp" placeholder="请输入创建人"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="创建人" v-bind="validateInfos.createBy" id="DirectiveOrderForm-createBy" name="createBy">
								<a-input v-model:value="formData.createBy" placeholder="请输入创建人"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="创建日期" v-bind="validateInfos.createTime" id="DirectiveOrderForm-createTime" name="createTime">
								<a-date-picker placeholder="请选择创建日期"  v-model:value="formData.createTime" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"  allow-clear />
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="更新人" v-bind="validateInfos.updateEmp" id="DirectiveOrderForm-updateEmp" name="updateEmp">
								<a-input v-model:value="formData.updateEmp" placeholder="请输入更新人"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="更新人" v-bind="validateInfos.updateBy" id="DirectiveOrderForm-updateBy" name="updateBy">
								<a-input v-model:value="formData.updateBy" placeholder="请输入更新人"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="更新日期" v-bind="validateInfos.updateTime" id="DirectiveOrderForm-updateTime" name="updateTime">
								<a-date-picker placeholder="请选择更新日期"  v-model:value="formData.updateTime" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"  allow-clear />
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="备注" v-bind="validateInfos.remarks" id="DirectiveOrderForm-remarks" name="remarks">
								<a-input v-model:value="formData.remarks" placeholder="请输入备注"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="服务容错时长（end_time + 这个时间） 小于 begin_time算超时" v-bind="validateInfos.timeoutDuration" id="DirectiveOrderForm-timeoutDuration" name="timeoutDuration">
								<a-input v-model:value="formData.timeoutDuration" placeholder="请输入服务容错时长（end_time + 这个时间） 小于 begin_time算超时"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="是否超时 Y超时 N未超时" v-bind="validateInfos.izTimeout" id="DirectiveOrderForm-izTimeout" name="izTimeout">
								<a-input v-model:value="formData.izTimeout" placeholder="请输入是否超时 Y超时 N未超时"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="实际执行人id（多个）； 主要执行人+协助人" v-bind="validateInfos.optIds" id="DirectiveOrderForm-optIds" name="optIds">
								<a-input v-model:value="formData.optIds" placeholder="请输入实际执行人id（多个）； 主要执行人+协助人"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="实际执行人名称（多个）； 主要执行人+协助人" v-bind="validateInfos.optNames" id="DirectiveOrderForm-optNames" name="optNames">
								<a-input v-model:value="formData.optNames" placeholder="请输入实际执行人名称（多个）； 主要执行人+协助人"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="手动拍照" v-bind="validateInfos.manuallyPicPath" id="DirectiveOrderForm-manuallyPicPath" name="manuallyPicPath">
								<a-textarea v-model:value="formData.manuallyPicPath" :rows="4" placeholder="请输入手动拍照" />
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="手动录制" v-bind="validateInfos.manuallyMp4Path" id="DirectiveOrderForm-manuallyMp4Path" name="manuallyMp4Path">
								<a-textarea v-model:value="formData.manuallyMp4Path" :rows="4" placeholder="请输入手动录制" />
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="考核状态 0未考核 1通过 2未通过" v-bind="validateInfos.appraisalStatus" id="DirectiveOrderForm-appraisalStatus" name="appraisalStatus">
								<j-dict-select-tag v-model:value="formData.appraisalStatus" dictCode="appraisal_status" placeholder="请选择考核状态 0未考核 1通过 2未通过"  allow-clear />
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="考核时间" v-bind="validateInfos.appraisalTime" id="DirectiveOrderForm-appraisalTime" name="appraisalTime">
								<a-date-picker placeholder="请选择考核时间"  v-model:value="formData.appraisalTime" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%"  allow-clear />
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="考核人ID" v-bind="validateInfos.appraisalId" id="DirectiveOrderForm-appraisalId" name="appraisalId">
								<a-input v-model:value="formData.appraisalId" placeholder="请输入考核人ID"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
						<a-col :span="24">
							<a-form-item label="考核人" v-bind="validateInfos.appraisalName" id="DirectiveOrderForm-appraisalName" name="appraisalName">
								<a-input v-model:value="formData.appraisalName" placeholder="请输入考核人"  allow-clear ></a-input>
							</a-form-item>
						</a-col>
          </a-row>
        </a-form>
      </template>
    </JFormContainer>

		<!-- 子表单区域 -->
    <a-tabs v-model:activeKey="activeKey" animated style="overflow:hidden;">
      <a-tab-pane tab="nu_biz_nu_directive_order_sub" key="nuBizNuDirectiveOrderSub" :forceRender="true">
        <j-vxe-table
          :keep-source="true"
          resizable
          ref="nuBizNuDirectiveOrderSubTableRef"
          :loading="nuBizNuDirectiveOrderSubTable.loading"
          :columns="nuBizNuDirectiveOrderSubTable.columns"
          :dataSource="nuBizNuDirectiveOrderSubTable.dataSource"
          :height="340"
          :disabled="disabled"
          :rowNumber="true"
          :rowSelection="true"
          :toolbar="true"/>
      </a-tab-pane>
    </a-tabs>
  </a-spin>
</template>

<script lang="ts">
  import { defineComponent, ref, reactive, computed, toRaw, onMounted } from 'vue';
  import { defHttp } from '/@/utils/http/axios';
  import { useValidateAntFormAndTable } from '/@/hooks/system/useJvxeMethods';
  import { queryAppraisalSubByMainId, queryDataById, saveOrUpdate } from '../appraisal.api';
  import { JVxeTable } from '/@/components/jeecg/JVxeTable';
  import {subColumns} from '../appraisal.data';
  import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
  import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
  import { Form } from 'ant-design-vue';
  const useForm = Form.useForm;

  export default defineComponent({
    name: "DirectiveOrderForm",
    components:{
      JDictSelectTag,
      JVxeTable,
			JFormContainer,
    },
    props:{
      formDisabled:{
        type: Boolean,
        default: false
      },
      formData: { type: Object, default: ()=>{} },
      formBpm: { type: Boolean, default: true }
    },
    emits:['success'],
    setup(props, {emit}) {
      const loading = ref(false);
      const formRef = ref();
      const nuBizNuDirectiveOrderSubTableRef = ref();
      const nuBizNuDirectiveOrderSubTable = reactive<Record<string, any>>({
        loading: false,
        columns: subColumns,
        dataSource: []
      });
      const activeKey = ref('nuBizNuDirectiveOrderSub');
      const formData = reactive<Record<string, any>>({
        id: '',
        orderNo: '',
        orderType: '',
        optType: '',
        poolId: '',
        bizId: '',
        bizType: '',
        nuName: '',
        elderId: '',
        elderName: '',
        employeeId: '',
        employeeName: '',
        directiveId: '',
        directiveName: '',
        cycleTypeId: '',
        cycleType: '',
        cycleValue: '',
        previewFile: '',
        previewFileSmall: '',
        mp3File: '',
        mp4File: '',
        serviceDuration: '',
        serviceContent: '',
        izPackage: '',
        tollPrice: undefined,
        comPrice: undefined,
        realComPrice: undefined,
        startTime: '',
        endTime: '',
        beginEmp: '',
        beginTime: '',
        finishEmp: '',
        finishTime: '',
        izStart: '',
        izFinish: '',
        initiatorId: '',
        initiatorName: '',
        createEmp: '',
        createBy: '',
        createTime: '',
        updateEmp: '',
        updateBy: '',
        updateTime: '',
        delFlag: '',
        remarks: '',
        timeoutDuration: '',
        izTimeout: '',
        optIds: '',
        optNames: '',
        manuallyPicPath: '',
        manuallyMp4Path: '',
        appraisalStatus: '',
        appraisalTime: '',
        appraisalId: '',
        appraisalName: '',
      });

      //表单验证
      const validatorRules = reactive({
      });
      const {resetFields, validate, validateInfos} = useForm(formData, validatorRules, {immediate: false});
      const dbData = {};
      const formItemLayout = {
        labelCol: {xs: {span: 24}, sm: {span: 5}},
        wrapperCol: {xs: {span: 24}, sm: {span: 16}},
      };

      // 表单禁用
      const disabled = computed(()=>{
        if(props.formBpm === true){
          if(props.formData.disabled === false){
            return false;
          }else{
            return true;
          }
        }
        return props.formDisabled;
      });



      function add() {
        resetFields();
        nuBizNuDirectiveOrderSubTable.dataSource = [];
      }

      async function edit(row) {
        //主表数据
        await queryMainData(row.id);
        //子表数据
        const nuBizNuDirectiveOrderSubDataList = await queryAppraisalSubByMainId(row['id']);
        nuBizNuDirectiveOrderSubTable.dataSource = [...nuBizNuDirectiveOrderSubDataList];
      }

      async function queryMainData(id) {
        const row = await queryDataById(id);
        resetFields();
        const tmpData = {};
        Object.keys(formData).forEach((key) => {
          if(row.hasOwnProperty(key)){
            tmpData[key] = row[key]
          }
        })
        //赋值
        Object.assign(formData,tmpData);
      }

      const {getSubFormAndTableData, transformData} = useValidateAntFormAndTable(activeKey, {
        'nuBizNuDirectiveOrderSub': nuBizNuDirectiveOrderSubTableRef,
      });

      async function getFormData() {
        try {
          // 触发表单验证
          await validate();
        } catch ({ errorFields }) {
          if (errorFields) {
            const firstField = errorFields[0];
            if (firstField) {
              formRef.value.scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
            }
          }
          return Promise.reject(errorFields);
        }
        return transformData(toRaw(formData))
      }

      async function submitForm() {
        const mainData = await getFormData();
        const subData = await getSubFormAndTableData();
        const values = Object.assign({}, dbData, mainData, subData);
        console.log('表单提交数据', values)
        const isUpdate = values.id ? true : false
        await saveOrUpdate(values, isUpdate);
        //关闭弹窗
        emit('success');
      }

      function setFieldsValue(values) {
        if(values){
          Object.keys(values).map(k=>{
            formData[k] = values[k];
          });
        }
      }

      /**
       * 值改变事件触发-树控件回调
       * @param key
       * @param value
       */
      function handleFormChange(key, value) {
        formData[key] = value;
      }


      return {
        nuBizNuDirectiveOrderSubTableRef,
        nuBizNuDirectiveOrderSubTable,
        validatorRules,
        validateInfos,
        activeKey,
        loading,
        formData,
        setFieldsValue,
        handleFormChange,
        formItemLayout,
        disabled,
        getFormData,
        submitForm,
        add,
        edit,
        formRef,
      }
    }
  });
</script>
<style lang="less" scoped>
  .ant-tabs-tabpane.sub-one-form {
    max-height: 340px;
    overflow: auto;
  }
</style>
