|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<a-modal
|
|
|
- :title="title"
|
|
|
- :width="1200"
|
|
|
+ title="编辑"
|
|
|
+ width="85%"
|
|
|
:visible="visible"
|
|
|
:maskClosable="false"
|
|
|
:confirmLoading="confirmLoading"
|
|
@@ -9,217 +9,65 @@
|
|
|
@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>
|
|
|
+ <div class="table-page-search-wrapper">
|
|
|
+
|
|
|
|
|
|
- </a-row>
|
|
|
- </a-form>
|
|
|
|
|
|
<!-- 子表单区域 -->
|
|
|
- <a-tabs v-model="activeKey" @change="handleChangeTabs">
|
|
|
- <a-tab-pane tab="森_工厂质量事故单-子表" :key="refKeys[0]" :forceRender="true">
|
|
|
- <j-editable-table
|
|
|
+ <!-- <a-button type="primary" @click="addList" style="margin-bottom: 1%;">增行</a-button> -->
|
|
|
+ <a-table
|
|
|
+ bordered
|
|
|
+ :columns="incidentTicketChildrenTable.columns"
|
|
|
+ :data-source="incidentTicketChildrenTable.dataSource"
|
|
|
+ :loading="incidentTicketChildrenTable.loading"
|
|
|
+ :scroll="{x: 2000,y:300 }"
|
|
|
+ :pagination="false"
|
|
|
+ >
|
|
|
+ <!-- 汇率 -->
|
|
|
+ <span slot="exchangeRate" slot-scope="text, record, index">
|
|
|
+ <a-input placeholder="请输入" v-model="record.exchangeRate" />
|
|
|
+ </span>
|
|
|
+ <!-- 实际事故金额 -->
|
|
|
+ <span slot="practicalSum" slot-scope="text, record, index">
|
|
|
+ <a-input placeholder="请输入" v-model="record.practicalSum" />
|
|
|
+ </span>
|
|
|
+ <!-- U8生成运费发票号 -->
|
|
|
+ <span slot="u8Invoice" slot-scope="text, record, index">
|
|
|
+ <a-input placeholder="请输入" v-model="record.u8Invoice" />
|
|
|
+ </span>
|
|
|
+ <!-- 账套号 -->
|
|
|
+ <span slot="zhanghaoId" slot-scope="text, record, index">
|
|
|
+ <a-input placeholder="请输入" v-model="record.zhanghaoId" />
|
|
|
+ </span>
|
|
|
+ <!-- 备注 -->
|
|
|
+ <span slot="remark" slot-scope="text, record, index">
|
|
|
+ <a-input placeholder="请输入" v-model="record.remark" />
|
|
|
+ </span>
|
|
|
+ </a-table>
|
|
|
+
|
|
|
+ <a-form-model layout="inline" ref="form" :model="formState" :rules="validatorRules">
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="24" style="height: 110px;">
|
|
|
+ <a-form-model-item label="财务备注" prop="financeRemark" class="nresume">
|
|
|
+ <a-input v-model="formState.financeRemark" type="textarea" placeholder="请输入"></a-input>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+
|
|
|
+ </a-row>
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="8">
|
|
|
+ <a-form-model-item label="添加附件" prop="accessory2">
|
|
|
+ <a-input v-model="formState.accessory2" placeholder="请输入"></a-input>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="8">
|
|
|
+ <a-form-model-item label="通知人" prop="Noticer">
|
|
|
+ <a-input v-model="formState.Noticer" placeholder="请输入"></a-input>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-form-model>
|
|
|
+ <!-- <j-editable-table
|
|
|
:ref="refKeys[0]"
|
|
|
:loading="incidentTicketChildrenTable.loading"
|
|
|
:columns="incidentTicketChildrenTable.columns"
|
|
@@ -227,11 +75,21 @@
|
|
|
:maxHeight="300"
|
|
|
:rowNumber="true"
|
|
|
:rowSelection="true"
|
|
|
- :actionButton="true"/>
|
|
|
- </a-tab-pane>
|
|
|
+ :actionButton="true"/> -->
|
|
|
+ <!-- <div class="table-page-search-wrapper">
|
|
|
+ <a-form-model layout="inline" ref="form" :model="formState" :rules="validatorRules">
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :md="24" :sm="8">
|
|
|
+ <a-form-model-item label="财务备注" class="nresume" style="height:100px !important">
|
|
|
+ <a-input type="textarea" placeholder="请输入" v-model="formState.demo"/>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-form-model>
|
|
|
+ </div> -->
|
|
|
+ <!-- </a-tab-pane> -->
|
|
|
|
|
|
- </a-tabs>
|
|
|
-
|
|
|
+ </div>
|
|
|
</a-spin>
|
|
|
</a-modal>
|
|
|
</template>
|
|
@@ -243,7 +101,7 @@
|
|
|
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
|
|
|
import { validateDuplicateValue } from '@/utils/util'
|
|
|
import JDictSelectTag from "@/components/dict/JDictSelectTag"
|
|
|
-
|
|
|
+ import { putAction,getAction } from '@/api/manage'
|
|
|
export default {
|
|
|
name: 'IncidentTicketModal',
|
|
|
mixins: [JEditableTableMixin],
|
|
@@ -253,7 +111,7 @@
|
|
|
data() {
|
|
|
return {
|
|
|
labelCol: {
|
|
|
- span: 6
|
|
|
+ span: 8
|
|
|
},
|
|
|
wrapperCol: {
|
|
|
span: 16
|
|
@@ -264,6 +122,7 @@
|
|
|
wrapperCol2: {
|
|
|
span: 20
|
|
|
},
|
|
|
+ formState:{},
|
|
|
// 新增时子表默认添加几行空数据
|
|
|
addDefaultRowNum: 1,
|
|
|
validatorRules: {
|
|
@@ -356,94 +215,64 @@
|
|
|
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: '',
|
|
|
- },
|
|
|
+ {
|
|
|
+ title: '计划单号',
|
|
|
+ align: "center",
|
|
|
+ dataIndex: 'planNumber',
|
|
|
+ width: 140,
|
|
|
+ // scopedSlots: { customRender: 'planNumber' },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '事故类型',
|
|
|
+ align: "center",
|
|
|
+ dataIndex: 'accidentType',
|
|
|
+ width: 140,
|
|
|
+ // scopedSlots: { customRender: 'accidentType' },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '事故金额',
|
|
|
+ align: "center",
|
|
|
+ dataIndex: 'accidentSum',
|
|
|
+ width: 140,
|
|
|
+ // scopedSlots: { customRender: 'accidentSum' },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '汇率',
|
|
|
+ align: "center",
|
|
|
+ dataIndex: 'exchangeRate',
|
|
|
+ width: 140,
|
|
|
+ scopedSlots: { customRender: 'exchangeRate' },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '实际事故金额',
|
|
|
+ align: "center",
|
|
|
+ dataIndex: 'practicalSum',
|
|
|
+ width: 140,
|
|
|
+ scopedSlots: { customRender: 'practicalSum' },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: 'U8生成运费发票号',
|
|
|
+ align: "center",
|
|
|
+ dataIndex: 'u8Invoice',
|
|
|
+ width: 140,
|
|
|
+ scopedSlots: { customRender: 'u8Invoice' },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '账套号',
|
|
|
+ align: "center",
|
|
|
+ dataIndex: 'zhanghaoId',
|
|
|
+ width: 140,
|
|
|
+ scopedSlots: { customRender: 'zhanghaoId' },
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ title: '备注',
|
|
|
+ align: "center",
|
|
|
+ dataIndex: 'remark',
|
|
|
+ width: 140,
|
|
|
+ scopedSlots: { customRender: 'remark' },
|
|
|
+ },
|
|
|
+
|
|
|
]
|
|
|
},
|
|
|
url: {
|
|
@@ -456,22 +285,82 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- getAllTable() {
|
|
|
- let values = this.tableKeys.map(key => getRefPromise(this, key))
|
|
|
- return Promise.all(values)
|
|
|
+ getHeaderList(id){
|
|
|
+ getAction('/oa/incidentTicket/queryById', {id:id}).then((res) => {
|
|
|
+ if(res.success){
|
|
|
+ var zhuId = '' //主表id
|
|
|
+ this.formState=res.result //详情
|
|
|
+ zhuId = res.result.id
|
|
|
+ this.getTable(zhuId)
|
|
|
+ this.getNotifier(zhuId)
|
|
|
+ }else{
|
|
|
+ this.$message.warning(res.message)
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
- /** 调用完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)
|
|
|
+ getTable(id){
|
|
|
+ getAction('/oa/incidentTicket/queryIncidentTicketChildrenByMainId', {id:id}).then((res) => {
|
|
|
+ if(res.success){
|
|
|
+ this.incidentTicketChildrenTable.dataSource = res.result
|
|
|
+ }else{
|
|
|
+ this.$message.warning(res.message)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getNotifier(id){
|
|
|
+ getAction('/oa/incidentTicketMsg/queryByMainId', {id:id}).then((res) => {
|
|
|
+ if(res.success){
|
|
|
+ var noticeList =[]
|
|
|
+ res.result.map(item=>{
|
|
|
+ noticeList.push(item.userName)
|
|
|
+ })
|
|
|
+ this.formState.Noticer = noticeList.toString()
|
|
|
+ console.log(this.formState.Noticer)
|
|
|
+ this.$forceUpdate()
|
|
|
+ }
|
|
|
})
|
|
|
- // 加载子表数据
|
|
|
- if (this.model.id) {
|
|
|
- let params = { id: this.model.id }
|
|
|
- this.requestSubTableData(this.url.incidentTicketChildren.list, params, this.incidentTicketChildrenTable)
|
|
|
- }
|
|
|
},
|
|
|
+ handleOk(){
|
|
|
+ this.$refs.form.validate(async valid => {
|
|
|
+ if(valid){
|
|
|
+ var obj = this.formState
|
|
|
+ obj.incidentTicketChildrenList = this.incidentTicketChildrenTable.dataSource
|
|
|
+ putAction('/oa/incidentTicket/edit', obj).then((res) => {
|
|
|
+ if(res.success){
|
|
|
+ this.$message.success('编辑成功')
|
|
|
+ this.handleCancel()
|
|
|
+ this.$emit('close')
|
|
|
+ }else{
|
|
|
+ this.$message.warning(res.message)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+ //关闭
|
|
|
+ handleCancel(){
|
|
|
+ this.incidentTicketChildrenTable.dataSource =[]
|
|
|
+ this.formState = {}
|
|
|
+ this.visible = false
|
|
|
+ this.$emit('close')
|
|
|
+ },
|
|
|
+ // 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)
|
|
@@ -492,5 +381,11 @@
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style scoped>
|
|
|
+<style lang="less" scoped>
|
|
|
+/deep/ .ant-table-wrapper{
|
|
|
+ margin-bottom: 2%;
|
|
|
+}
|
|
|
+/deep/ .nresume .ant-input{
|
|
|
+ height: 100px !important;
|
|
|
+}
|
|
|
</style>
|