|  | @@ -0,0 +1,496 @@
 | 
	
		
			
				|  |  | +<template>
 | 
	
		
			
				|  |  | +  <a-modal
 | 
	
		
			
				|  |  | +    :title="title"
 | 
	
		
			
				|  |  | +    :width="1200"
 | 
	
		
			
				|  |  | +    :visible="visible"
 | 
	
		
			
				|  |  | +    :maskClosable="false"
 | 
	
		
			
				|  |  | +    :confirmLoading="confirmLoading"
 | 
	
		
			
				|  |  | +    @ok="handleOk"
 | 
	
		
			
				|  |  | +    @cancel="handleCancel">
 | 
	
		
			
				|  |  | +    <a-spin :spinning="confirmLoading">
 | 
	
		
			
				|  |  | +      <!-- 主表单区域 -->
 | 
	
		
			
				|  |  | +      <a-form :form="form">
 | 
	
		
			
				|  |  | +        <a-row>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'accidentData', validatorRules.accidentData]" placeholder="请输入日期"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="质量事故单主题" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'accidentTheme', validatorRules.accidentTheme]" placeholder="请输入质量事故单主题"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="事故责任人" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'accidentPersonLiable', validatorRules.accidentPersonLiable]" placeholder="请输入事故责任人"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="供应商" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'supplier', validatorRules.supplier]" placeholder="请输入供应商"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="责任人" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'personLiable', validatorRules.personLiable]" placeholder="请输入责任人"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="质量事故单号" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'accidentNumber', validatorRules.accidentNumber]" placeholder="请输入质量事故单号"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="客户" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'customer', validatorRules.customer]" placeholder="请输入客户"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="工厂" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'factory', validatorRules.factory]" placeholder="请输入工厂"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="责任人1" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'responsibilityPerson1', validatorRules.responsibilityPerson1]" placeholder="请输入责任人1"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="责任人2" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'responsibilityPerson2', validatorRules.responsibilityPerson2]" placeholder="请输入责任人2"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="责任人3" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'responsibilityPerson3', validatorRules.responsibilityPerson3]" placeholder="请输入责任人3"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="责任人4" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'responsibilityPerson4', validatorRules.responsibilityPerson4]" placeholder="请输入责任人4"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="责任人5" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'responsibilityPerson5', validatorRules.responsibilityPerson5]" placeholder="请输入责任人5"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="金额1" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'sum1', validatorRules.sum1]" placeholder="请输入金额1"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="金额2" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'sum2', validatorRules.sum2]" placeholder="请输入金额2"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="金额3" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'sum3', validatorRules.sum3]" placeholder="请输入金额3"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="金额4" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'sum4', validatorRules.sum4]" placeholder="请输入金额4"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="金额5" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'sum5', validatorRules.sum5]" placeholder="请输入金额5"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="责任单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'responsibilityCompany', validatorRules.responsibilityCompany]" placeholder="请输入责任单位"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="币种" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'moneyType', validatorRules.moneyType]" placeholder="请输入币种"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="总金额" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'totalMoney', validatorRules.totalMoney]" placeholder="请输入总金额"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="业务类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'businessType', validatorRules.businessType]" placeholder="请输入业务类型"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="成衣销售订单号" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'garmentSalesOrder', validatorRules.garmentSalesOrder]" placeholder="请输入成衣销售订单号"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="款号" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'styleNumber', validatorRules.styleNumber]" placeholder="请输入款号"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="物料" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'material', validatorRules.material]" placeholder="请输入物料"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="计划员" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'planPersonnel', validatorRules.planPersonnel]" placeholder="请输入计划员"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="业务员" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <j-dict-select-tag type="list" v-decorator="['businessPeople', validatorRules.businessPeople]" :trigger-change="true" dictCode="sys_user,realname,username" placeholder="请选择业务员"/>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="QC" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'qualityControl', validatorRules.qualityControl]" placeholder="请输入QC"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="计划单号(主)" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'planNumber', validatorRules.planNumber]" placeholder="请输入计划单号(主)"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="事故类型(主)" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'accidentType', validatorRules.accidentType]" placeholder="请输入事故类型(主)"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="事故金额(主)" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'accidentSum', validatorRules.accidentSum]" placeholder="请输入事故金额(主)"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="情况说明" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'presentationCondition', validatorRules.presentationCondition]" placeholder="请输入情况说明"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="附件上传" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'accessory', validatorRules.accessory]" placeholder="请输入附件上传"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="填报人" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <j-dict-select-tag type="list" v-decorator="['informant', validatorRules.informant]" :trigger-change="true" dictCode="sys_user ,realname,username" placeholder="请选择填报人"/>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="工厂签章" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'factorySignature', validatorRules.factorySignature]" placeholder="请输入工厂签章"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="财务备注" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'financeRemark', validatorRules.financeRemark]" placeholder="请输入财务备注"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="添加附件" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'accessory2', validatorRules.accessory2]" placeholder="请输入添加附件"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="是否部门负责人" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'isLeaders', validatorRules.isLeaders]" placeholder="请输入是否部门负责人"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="森_工厂质量事故单(子)" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'incidentTicketId', validatorRules.incidentTicketId]" placeholder="请输入森_工厂质量事故单(子)"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +          <a-col :span="12">
 | 
	
		
			
				|  |  | +            <a-form-item label="子表控件" :labelCol="labelCol" :wrapperCol="wrapperCol">
 | 
	
		
			
				|  |  | +              <a-input v-decorator="[ 'tableNameChildren', validatorRules.tableNameChildren]" placeholder="请输入子表控件"></a-input>
 | 
	
		
			
				|  |  | +            </a-form-item>
 | 
	
		
			
				|  |  | +          </a-col>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        </a-row>
 | 
	
		
			
				|  |  | +      </a-form>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      <!-- 子表单区域 -->
 | 
	
		
			
				|  |  | +      <a-tabs v-model="activeKey" @change="handleChangeTabs">
 | 
	
		
			
				|  |  | +        <a-tab-pane tab="森_工厂质量事故单-子表" :key="refKeys[0]" :forceRender="true">
 | 
	
		
			
				|  |  | +          <j-editable-table
 | 
	
		
			
				|  |  | +            :ref="refKeys[0]"
 | 
	
		
			
				|  |  | +            :loading="incidentTicketChildrenTable.loading"
 | 
	
		
			
				|  |  | +            :columns="incidentTicketChildrenTable.columns"
 | 
	
		
			
				|  |  | +            :dataSource="incidentTicketChildrenTable.dataSource"
 | 
	
		
			
				|  |  | +            :maxHeight="300"
 | 
	
		
			
				|  |  | +            :rowNumber="true"
 | 
	
		
			
				|  |  | +            :rowSelection="true"
 | 
	
		
			
				|  |  | +            :actionButton="true"/>
 | 
	
		
			
				|  |  | +        </a-tab-pane>
 | 
	
		
			
				|  |  | +        
 | 
	
		
			
				|  |  | +      </a-tabs>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    </a-spin>
 | 
	
		
			
				|  |  | +  </a-modal>
 | 
	
		
			
				|  |  | +</template>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +<script>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  import pick from 'lodash.pick'
 | 
	
		
			
				|  |  | +  import { FormTypes,getRefPromise } from '@/utils/JEditableTableUtil'
 | 
	
		
			
				|  |  | +  import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
 | 
	
		
			
				|  |  | +  import { validateDuplicateValue } from '@/utils/util'
 | 
	
		
			
				|  |  | +  import JDictSelectTag from "@/components/dict/JDictSelectTag"
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  export default {
 | 
	
		
			
				|  |  | +    name: 'IncidentTicketModal',
 | 
	
		
			
				|  |  | +    mixins: [JEditableTableMixin],
 | 
	
		
			
				|  |  | +    components: {
 | 
	
		
			
				|  |  | +      JDictSelectTag,
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    data() {
 | 
	
		
			
				|  |  | +      return {
 | 
	
		
			
				|  |  | +        labelCol: {
 | 
	
		
			
				|  |  | +          span: 6
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        wrapperCol: {
 | 
	
		
			
				|  |  | +          span: 16
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        labelCol2: {
 | 
	
		
			
				|  |  | +          span: 3
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        wrapperCol2: {
 | 
	
		
			
				|  |  | +          span: 20
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        // 新增时子表默认添加几行空数据
 | 
	
		
			
				|  |  | +        addDefaultRowNum: 1,
 | 
	
		
			
				|  |  | +        validatorRules: {
 | 
	
		
			
				|  |  | +          accidentData: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          accidentTheme: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          accidentPersonLiable: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          supplier: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          personLiable: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          accidentNumber: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          customer: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          factory: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          responsibilityPerson1: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          responsibilityPerson2: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          responsibilityPerson3: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          responsibilityPerson4: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          responsibilityPerson5: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          sum1: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          sum2: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          sum3: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          sum4: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          sum5: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          responsibilityCompany: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          moneyType: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          totalMoney: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          businessType: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          garmentSalesOrder: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          styleNumber: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          material: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          planPersonnel: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          businessPeople: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          qualityControl: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          planNumber: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          accidentType: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          accidentSum: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          presentationCondition: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          accessory: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          informant: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          factorySignature: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          financeRemark: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          accessory2: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          isLeaders: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          incidentTicketId: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +          tableNameChildren: {rules: [
 | 
	
		
			
				|  |  | +          ]},
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        refKeys: ['incidentTicketChildren', ],
 | 
	
		
			
				|  |  | +        tableKeys:['incidentTicketChildren', ],
 | 
	
		
			
				|  |  | +        activeKey: 'incidentTicketChildren',
 | 
	
		
			
				|  |  | +        // 森_工厂质量事故单-子表
 | 
	
		
			
				|  |  | +        incidentTicketChildrenTable: {
 | 
	
		
			
				|  |  | +          loading: false,
 | 
	
		
			
				|  |  | +          dataSource: [],
 | 
	
		
			
				|  |  | +          columns: [
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +              title: '计划单号',
 | 
	
		
			
				|  |  | +              key: 'planNumber',
 | 
	
		
			
				|  |  | +              type: FormTypes.input,
 | 
	
		
			
				|  |  | +              width:"200px",
 | 
	
		
			
				|  |  | +              placeholder: '请输入${title}',
 | 
	
		
			
				|  |  | +              defaultValue: '',
 | 
	
		
			
				|  |  | +            },
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +              title: '事故类型',
 | 
	
		
			
				|  |  | +              key: 'accidentType',
 | 
	
		
			
				|  |  | +              type: FormTypes.input,
 | 
	
		
			
				|  |  | +              width:"200px",
 | 
	
		
			
				|  |  | +              placeholder: '请输入${title}',
 | 
	
		
			
				|  |  | +              defaultValue: '',
 | 
	
		
			
				|  |  | +            },
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +              title: '事故金额',
 | 
	
		
			
				|  |  | +              key: 'accidentSum',
 | 
	
		
			
				|  |  | +              type: FormTypes.input,
 | 
	
		
			
				|  |  | +              width:"200px",
 | 
	
		
			
				|  |  | +              placeholder: '请输入${title}',
 | 
	
		
			
				|  |  | +              defaultValue: '',
 | 
	
		
			
				|  |  | +            },
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +              title: '汇率',
 | 
	
		
			
				|  |  | +              key: 'exchangeRate',
 | 
	
		
			
				|  |  | +              type: FormTypes.input,
 | 
	
		
			
				|  |  | +              width:"200px",
 | 
	
		
			
				|  |  | +              placeholder: '请输入${title}',
 | 
	
		
			
				|  |  | +              defaultValue: '',
 | 
	
		
			
				|  |  | +            },
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +              title: '实际事故金额',
 | 
	
		
			
				|  |  | +              key: 'practicalSum',
 | 
	
		
			
				|  |  | +              type: FormTypes.input,
 | 
	
		
			
				|  |  | +              width:"200px",
 | 
	
		
			
				|  |  | +              placeholder: '请输入${title}',
 | 
	
		
			
				|  |  | +              defaultValue: '',
 | 
	
		
			
				|  |  | +            },
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +              title: 'U8生成运费发票号',
 | 
	
		
			
				|  |  | +              key: 'u8Invoice',
 | 
	
		
			
				|  |  | +              type: FormTypes.input,
 | 
	
		
			
				|  |  | +              width:"200px",
 | 
	
		
			
				|  |  | +              placeholder: '请输入${title}',
 | 
	
		
			
				|  |  | +              defaultValue: '',
 | 
	
		
			
				|  |  | +            },
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +              title: '账套号',
 | 
	
		
			
				|  |  | +              key: 'zhanghaoId',
 | 
	
		
			
				|  |  | +              type: FormTypes.input,
 | 
	
		
			
				|  |  | +              width:"200px",
 | 
	
		
			
				|  |  | +              placeholder: '请输入${title}',
 | 
	
		
			
				|  |  | +              defaultValue: '',
 | 
	
		
			
				|  |  | +            },
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +              title: '备注',
 | 
	
		
			
				|  |  | +              key: 'remark',
 | 
	
		
			
				|  |  | +              type: FormTypes.input,
 | 
	
		
			
				|  |  | +              width:"200px",
 | 
	
		
			
				|  |  | +              placeholder: '请输入${title}',
 | 
	
		
			
				|  |  | +              defaultValue: '',
 | 
	
		
			
				|  |  | +            },
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +              title: '是否部门负责人',
 | 
	
		
			
				|  |  | +              key: 'isLeaders',
 | 
	
		
			
				|  |  | +              type: FormTypes.input,
 | 
	
		
			
				|  |  | +              width:"200px",
 | 
	
		
			
				|  |  | +              placeholder: '请输入${title}',
 | 
	
		
			
				|  |  | +              defaultValue: '',
 | 
	
		
			
				|  |  | +            },
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +              title: '主表id',
 | 
	
		
			
				|  |  | +              key: 'incidentTicketId',
 | 
	
		
			
				|  |  | +              type: FormTypes.input,
 | 
	
		
			
				|  |  | +              width:"200px",
 | 
	
		
			
				|  |  | +              placeholder: '请输入${title}',
 | 
	
		
			
				|  |  | +              defaultValue: '',
 | 
	
		
			
				|  |  | +            },
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +              title: '报错字段sort',
 | 
	
		
			
				|  |  | +              key: 'sort',
 | 
	
		
			
				|  |  | +              type: FormTypes.input,
 | 
	
		
			
				|  |  | +              width:"200px",
 | 
	
		
			
				|  |  | +              placeholder: '请输入${title}',
 | 
	
		
			
				|  |  | +              defaultValue: '',
 | 
	
		
			
				|  |  | +            },
 | 
	
		
			
				|  |  | +          ]
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        url: {
 | 
	
		
			
				|  |  | +          add: "/oa/incidentTicket/add",
 | 
	
		
			
				|  |  | +          edit: "/oa/incidentTicket/edit",
 | 
	
		
			
				|  |  | +          incidentTicketChildren: {
 | 
	
		
			
				|  |  | +            list: '/oa/incidentTicket/queryIncidentTicketChildrenByMainId'
 | 
	
		
			
				|  |  | +          },
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    methods: {
 | 
	
		
			
				|  |  | +      getAllTable() {
 | 
	
		
			
				|  |  | +        let values = this.tableKeys.map(key => getRefPromise(this, key))
 | 
	
		
			
				|  |  | +        return Promise.all(values)
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      /** 调用完edit()方法之后会自动调用此方法 */
 | 
	
		
			
				|  |  | +      editAfter() {
 | 
	
		
			
				|  |  | +        let fieldval = pick(this.model,'accidentData','accidentTheme','accidentPersonLiable','supplier','personLiable','accidentNumber','customer','factory','responsibilityPerson1','responsibilityPerson2','responsibilityPerson3','responsibilityPerson4','responsibilityPerson5','sum1','sum2','sum3','sum4','sum5','responsibilityCompany','moneyType','totalMoney','businessType','garmentSalesOrder','styleNumber','material','planPersonnel','businessPeople','qualityControl','planNumber','accidentType','accidentSum','presentationCondition','accessory','informant','factorySignature','financeRemark','accessory2','isLeaders','incidentTicketId','tableNameChildren')
 | 
	
		
			
				|  |  | +        this.$nextTick(() => {
 | 
	
		
			
				|  |  | +          this.form.setFieldsValue(fieldval)
 | 
	
		
			
				|  |  | +        })
 | 
	
		
			
				|  |  | +        // 加载子表数据
 | 
	
		
			
				|  |  | +        if (this.model.id) {
 | 
	
		
			
				|  |  | +          let params = { id: this.model.id }
 | 
	
		
			
				|  |  | +          this.requestSubTableData(this.url.incidentTicketChildren.list, params, this.incidentTicketChildrenTable)
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      /** 整理成formData */
 | 
	
		
			
				|  |  | +      classifyIntoFormData(allValues) {
 | 
	
		
			
				|  |  | +        let main = Object.assign(this.model, allValues.formValue)
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        return {
 | 
	
		
			
				|  |  | +          ...main, // 展开
 | 
	
		
			
				|  |  | +          incidentTicketChildrenList: allValues.tablesValue[0].values,
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      validateError(msg){
 | 
	
		
			
				|  |  | +        this.$message.error(msg)
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +     popupCallback(row){
 | 
	
		
			
				|  |  | +       this.form.setFieldsValue(pick(row,'accidentData','accidentTheme','accidentPersonLiable','supplier','personLiable','accidentNumber','customer','factory','responsibilityPerson1','responsibilityPerson2','responsibilityPerson3','responsibilityPerson4','responsibilityPerson5','sum1','sum2','sum3','sum4','sum5','responsibilityCompany','moneyType','totalMoney','businessType','garmentSalesOrder','styleNumber','material','planPersonnel','businessPeople','qualityControl','planNumber','accidentType','accidentSum','presentationCondition','accessory','informant','factorySignature','financeRemark','accessory2','isLeaders','incidentTicketId','tableNameChildren'))
 | 
	
		
			
				|  |  | +     },
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +</script>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +<style scoped>
 | 
	
		
			
				|  |  | +</style>
 |