|
@@ -14,71 +14,71 @@
|
|
|
<el-col :span="24">
|
|
|
<el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="status === 'audit' || status === 'taskFormDetail'"
|
|
|
label-width="135px" @submit.native.prevent>
|
|
|
- <el-divider v-if="commonJS.isNotEmpty(inputForm.contractId) && formReadOnly" content-position="left">
|
|
|
- <el-link type="primary" :underline="false" icon="el-icon-document" @click="viewContract(inputForm.contractId)"><b>查看合同详情</b></el-link>
|
|
|
- </el-divider>
|
|
|
- <el-divider v-else content-position="left"><i class="el-icon-document"></i> 选择合同</el-divider>
|
|
|
- <el-row :gutter="15">
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item label="合同名称" prop="contractName"
|
|
|
- :rules="[
|
|
|
+ <el-divider v-if="commonJS.isNotEmpty(inputForm.contractId) && formReadOnly" content-position="left">
|
|
|
+ <el-link type="primary" :underline="false" icon="el-icon-document" @click="viewContract(inputForm.contractId)"><b>查看合同详情</b></el-link>
|
|
|
+ </el-divider>
|
|
|
+ <el-divider v-else content-position="left"><i class="el-icon-document"></i> 选择合同</el-divider>
|
|
|
+ <el-row :gutter="15">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="合同名称" prop="contractName"
|
|
|
+ :rules="[
|
|
|
]">
|
|
|
- <el-input size="medium" :readonly="true" @focus="openContract()" v-model="inputForm.contractName" placeholder="请选择合同">
|
|
|
- <el-button slot="append" icon="el-icon-search" @click="openContract()"></el-button>
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="合同金额(元)" prop="contractAmount"
|
|
|
- :rules="[
|
|
|
+ <el-input size="medium" :readonly="true" @focus="openContract()" v-model="inputForm.contractName" placeholder="请选择合同">
|
|
|
+ <el-button slot="append" icon="el-icon-search" @click="openContract()"></el-button>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="合同金额(元)" prop="contractAmount"
|
|
|
+ :rules="[
|
|
|
]">
|
|
|
- <el-input :disabled="true" v-model="inputForm.contractAmount" placeholder="请填写合同金额"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
-<!-- <el-col :span="12">-->
|
|
|
-<!-- <el-form-item label="合同份数" prop="contractNum"-->
|
|
|
-<!-- :rules="[-->
|
|
|
-<!-- ]">-->
|
|
|
-<!-- <el-input :disabled="true" v-model="inputForm.contractNum" placeholder="请填写合同份数"></el-input>-->
|
|
|
-<!-- </el-form-item>-->
|
|
|
-<!-- </el-col>-->
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="委托人" prop="clientContactsName"
|
|
|
- :rules="[
|
|
|
+ <el-input :disabled="true" v-model="inputForm.contractAmount" placeholder="请填写合同金额"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <!-- <el-col :span="12">-->
|
|
|
+ <!-- <el-form-item label="合同份数" prop="contractNum"-->
|
|
|
+ <!-- :rules="[-->
|
|
|
+ <!-- ]">-->
|
|
|
+ <!-- <el-input :disabled="true" v-model="inputForm.contractNum" placeholder="请填写合同份数"></el-input>-->
|
|
|
+ <!-- </el-form-item>-->
|
|
|
+ <!-- </el-col>-->
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="委托人" prop="clientContactsName"
|
|
|
+ :rules="[
|
|
|
]">
|
|
|
- <el-input :disabled="true" v-model="inputForm.clientContactsName" placeholder="请填写委托人"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="付款主体" prop="payerSubject"
|
|
|
- :rules="[
|
|
|
+ <el-input :disabled="true" v-model="inputForm.clientContactsName" placeholder="请填写委托人"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="付款主体" prop="payerSubject"
|
|
|
+ :rules="[
|
|
|
]">
|
|
|
- <el-select :disabled="true" v-model="inputForm.payerSubject" placeholder="请选择付款主体" style="width:100%;">
|
|
|
- <el-option
|
|
|
- v-for="item in $dictUtils.getDictList('cw_payment_subject')"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="付款方式" prop="paymentMethod"
|
|
|
- :rules="[
|
|
|
+ <el-select :disabled="true" v-model="inputForm.payerSubject" placeholder="请选择付款主体" style="width:100%;">
|
|
|
+ <el-option
|
|
|
+ v-for="item in $dictUtils.getDictList('cw_payment_subject')"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="付款方式" prop="paymentMethod"
|
|
|
+ :rules="[
|
|
|
]">
|
|
|
- <el-select :disabled="true" v-model="inputForm.paymentMethod" placeholder="请选择付款方式" style="width:100%;">
|
|
|
- <el-option
|
|
|
- v-for="item in $dictUtils.getDictList('cw_payment_method')"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-divider content-position="left"><i class="el-icon-document"></i> 项目信息</el-divider>
|
|
|
+ <el-select :disabled="true" v-model="inputForm.paymentMethod" placeholder="请选择付款方式" style="width:100%;">
|
|
|
+ <el-option
|
|
|
+ v-for="item in $dictUtils.getDictList('cw_payment_method')"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-divider content-position="left"><i class="el-icon-document"></i> 项目信息</el-divider>
|
|
|
<el-row :gutter="15">
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="项目名称" prop="projectName"
|
|
@@ -114,13 +114,13 @@
|
|
|
@getValue="(value) => {inputForm.officeId=value}"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="业务类型" prop="businessTypeName"
|
|
|
- :rules="[
|
|
|
- ]">
|
|
|
- <el-input :readonly="true" @focus="openBusinessTypeForm" v-model="inputForm.businessTypeName" placeholder="请填写业务类型" clearable></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
+<!-- <el-col :span="12">-->
|
|
|
+<!-- <el-form-item label="业务类型" prop="businessTypeName"-->
|
|
|
+<!-- :rules="[-->
|
|
|
+<!-- ]">-->
|
|
|
+<!-- <el-input :readonly="true" @focus="openBusinessTypeForm" v-model="inputForm.businessTypeName" placeholder="请填写业务类型" clearable></el-input>-->
|
|
|
+<!-- </el-form-item>-->
|
|
|
+<!-- </el-col>-->
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="风险等级" prop="riskLevel"
|
|
|
:rules="[
|
|
@@ -136,7 +136,7 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="项目收费金额(元)" prop="projectMoney"
|
|
|
+ <el-form-item label="项目规模(元)" prop="projectMoney"
|
|
|
:rules="[
|
|
|
]">
|
|
|
<el-input-number
|
|
@@ -147,7 +147,7 @@
|
|
|
:max="9999999999"
|
|
|
:step="0.01"
|
|
|
:min="0"
|
|
|
- placeholder="请填写项目收费金额"
|
|
|
+ placeholder="请填写项目规模"
|
|
|
:controls="false"
|
|
|
clearable>
|
|
|
</el-input-number>
|
|
@@ -241,62 +241,136 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- </el-form>
|
|
|
- <el-tabs v-model="activeName" type="border-card" @tab-click="tabHandleClick">
|
|
|
- <el-tab-pane label="被服务单位" name="client">
|
|
|
- <span slot="label"><span style="color: red;border-top: 20px">*</span> 被服务单位</span>
|
|
|
- <el-row :gutter="15">
|
|
|
- <el-button type="primary" style="margin-bottom: 15px" size="mini" :disabled="status === 'audit' || status === 'taskFormDetail'" @click="openWorkClient">
|
|
|
- 新增被服务单位
|
|
|
- </el-button>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="15">
|
|
|
- <el-form :disabled="status === 'audit' || status === 'taskFormDetail'">
|
|
|
- <vxe-table
|
|
|
- border
|
|
|
- show-overflow
|
|
|
- show-footer
|
|
|
- :column-config="{resizable: true}"
|
|
|
- ref="clientTable"
|
|
|
- :key="tableKeyClient"
|
|
|
- class="vxe-table-element"
|
|
|
- :data="inputForm.cwProjectClientInfoDTOList"
|
|
|
- style=""
|
|
|
- @cell-click=""
|
|
|
- @edit-closed=""
|
|
|
- highlight-current-row
|
|
|
- :edit-config="{trigger: 'click', mode: 'row', showStatus: false, autoClear: false}"
|
|
|
- >
|
|
|
- <vxe-table-column align="center" field="name" title="客户名称" :edit-render="{}">
|
|
|
- <template v-slot:edit="scope">
|
|
|
- <el-input :readonly="true" v-model="scope.row.name" placeholder="客户名称" clearable></el-input>
|
|
|
- </template>
|
|
|
- </vxe-table-column>
|
|
|
- <vxe-table-column align="center" field="no" title="客户编号" :edit-render="{}">
|
|
|
- <template v-slot:edit="scope">
|
|
|
- <el-input :readonly="true" v-model="scope.row.no" placeholder="客户编号" clearable></el-input>
|
|
|
- </template>
|
|
|
- </vxe-table-column>
|
|
|
-<!-- <vxe-table-column align="center" field="companyLevel" title="层级" :edit-render="{}">-->
|
|
|
-<!-- <template v-slot:edit="scope">-->
|
|
|
-<!-- <el-input :readonly="true" v-model="scope.row.companyLevel" placeholder="层级" clearable></el-input>-->
|
|
|
-<!-- </template>-->
|
|
|
-<!-- </vxe-table-column>-->
|
|
|
- <vxe-table-column align="center" title="操作" width="100">
|
|
|
- <template v-slot="scope">
|
|
|
- <el-button size="mini" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'client')">删除</el-button>
|
|
|
- </template>
|
|
|
- </vxe-table-column>
|
|
|
- </vxe-table>
|
|
|
- </el-form>
|
|
|
- </el-row>
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane label="附件" name="files">
|
|
|
- <!-- 附件-->
|
|
|
- <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
|
|
|
- </el-tab-pane>
|
|
|
+ <el-tabs v-model="activeName" type="border-card" @tab-click="tabHandleClick">
|
|
|
+ <el-tab-pane label="被服务单位" name="client">
|
|
|
+ <span slot="label"><span style="color: red;border-top: 20px">*</span> 被服务单位</span>
|
|
|
+ <el-row :gutter="15">
|
|
|
+ <el-button type="primary" style="margin-bottom: 15px" size="mini" :disabled="status === 'audit' || status === 'taskFormDetail'" @click="openWorkClient">
|
|
|
+ 新增被服务单位
|
|
|
+ </el-button>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="15">
|
|
|
+ <el-form :disabled="status === 'audit' || status === 'taskFormDetail'">
|
|
|
+ <vxe-table
|
|
|
+ border
|
|
|
+ show-overflow
|
|
|
+ show-footer
|
|
|
+ :column-config="{resizable: true}"
|
|
|
+ ref="clientTable"
|
|
|
+ :key="tableKeyClient"
|
|
|
+ class="vxe-table-element"
|
|
|
+ :data="inputForm.cwProjectClientInfoDTOList"
|
|
|
+ style=""
|
|
|
+ @cell-click=""
|
|
|
+ @edit-closed=""
|
|
|
+ highlight-current-row
|
|
|
+ >
|
|
|
+ <vxe-table-column align="center" field="name" title="客户名称" :edit-render="{}"></vxe-table-column>
|
|
|
+ <vxe-table-column align="center" field="no" title="客户编号" :edit-render="{}"></vxe-table-column>
|
|
|
+ <vxe-table-column align="center" title="操作" width="100">
|
|
|
+ <template v-slot="scope">
|
|
|
+ <el-button size="mini" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'client')">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </vxe-table-column>
|
|
|
+ </vxe-table>
|
|
|
+ </el-form>
|
|
|
+ </el-row>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="客户联系人" name="contact">
|
|
|
+ <span slot="label"><span style="color: red;border-top: 20px">*</span> 客户联系人</span>
|
|
|
+ <el-row :gutter="15">
|
|
|
+ <el-button type="primary" style="margin-bottom: 15px" size="mini" :disabled="status === 'audit' || status === 'taskFormDetail'" @click="insertEvent('contact')">
|
|
|
+ 新增客户联系人
|
|
|
+ </el-button>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="15">
|
|
|
+ <el-form :disabled="status === 'audit' || status === 'taskFormDetail'">
|
|
|
+ <vxe-table
|
|
|
+ border
|
|
|
+ show-overflow
|
|
|
+ show-footer
|
|
|
+ :column-config="{resizable: true}"
|
|
|
+ ref="contactTable"
|
|
|
+ :key="tableKeyContact"
|
|
|
+ class="vxe-table-element"
|
|
|
+ :data="inputForm.cwProjectClientContactDTOList"
|
|
|
+ style=""
|
|
|
+ @cell-click=""
|
|
|
+ @edit-closed=""
|
|
|
+ highlight-current-row
|
|
|
+ :edit-rules="validContactRules"
|
|
|
+ :edit-config="{trigger: 'click', mode: 'row', showStatus: false, autoClear: true, icon: '-'}"
|
|
|
+ >
|
|
|
+ <vxe-table-column align="center" field="name" title="姓名" :edit-render="{}">
|
|
|
+ <template v-slot:edit="scope">
|
|
|
+ <el-input v-model="scope.row.name" placeholder="姓名" clearable></el-input>
|
|
|
+ </template>
|
|
|
+ </vxe-table-column>
|
|
|
+ <vxe-table-column align="center" field="sex" title="性别" :edit-render="{name: '$select', options: $dictUtils.getDictList('sex')}">
|
|
|
+ <template v-slot:edit="scope">
|
|
|
+ <vxe-select :disabled="status === 'audit' || status === 'taskFormDetail'" v-model="scope.row.sex" placeholder="性别" clearable style="width: 100%;" transfer>
|
|
|
+ <vxe-option
|
|
|
+ v-for="item in $dictUtils.getDictList('sex')"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value">
|
|
|
+ </vxe-option>
|
|
|
+ </vxe-select>
|
|
|
+ </template>
|
|
|
+ </vxe-table-column>
|
|
|
+ <vxe-table-column align="center" field="officeId" title="部门" :edit-render="{}">
|
|
|
+ <template v-slot:edit="scope">
|
|
|
+ <el-input v-model="scope.row.officeId" placeholder="部门" clearable></el-input>
|
|
|
+ </template>
|
|
|
+ </vxe-table-column>
|
|
|
+ <vxe-table-column align="center" field="position" title="职务" :edit-render="{}">
|
|
|
+ <template v-slot:edit="scope">
|
|
|
+ <el-input v-model="scope.row.position" placeholder="职务" clearable></el-input>
|
|
|
+ </template>
|
|
|
+ </vxe-table-column>
|
|
|
+ <vxe-table-column align="center" field="contactFirst" title="联系方式1" :edit-render="{}">
|
|
|
+ <template v-slot:edit="scope">
|
|
|
+ <el-input v-model="scope.row.contactFirst" oninput="value=value.replace(/[^\d]/g,'')" placeholder="联系方式1" clearable></el-input>
|
|
|
+ </template>
|
|
|
+ </vxe-table-column>
|
|
|
+ <vxe-table-column align="center" field="contactSecond" title="联系方式2" :edit-render="{}">
|
|
|
+ <template v-slot:edit="scope">
|
|
|
+ <el-input v-model="scope.row.contactSecond" oninput="value=value.replace(/[^\d]/g,'')" placeholder="联系方式2" clearable></el-input>
|
|
|
+ </template>
|
|
|
+ </vxe-table-column>
|
|
|
+ <vxe-table-column align="center" field="fax" title="传真" :edit-render="{}">
|
|
|
+ <template v-slot:edit="scope">
|
|
|
+ <el-input v-model="scope.row.fax" placeholder="传真" clearable></el-input>
|
|
|
+ </template>
|
|
|
+ </vxe-table-column>
|
|
|
+ <vxe-table-column align="center" field="email" title="邮箱" :edit-render="{}">
|
|
|
+ <template v-slot:edit="scope">
|
|
|
+ <el-input v-model="scope.row.email" @change="$forceUpdate()" @blur="blurEmail(scope.$rowIndex)" placeholder="邮箱" clearable></el-input>
|
|
|
+ </template>
|
|
|
+ </vxe-table-column>
|
|
|
+ <vxe-table-column align="center" field="remarks" title="备注" :edit-render="{}">
|
|
|
+ <template v-slot:edit="scope">
|
|
|
+ <el-input maxlength="500" v-model="scope.row.remarks" placeholder="备注" clearable></el-input>
|
|
|
+ </template>
|
|
|
+ </vxe-table-column>
|
|
|
+ <vxe-table-column align="center" title="操作" width="100">
|
|
|
+ <template v-slot="scope">
|
|
|
+ <el-button size="mini" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'contact')">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </vxe-table-column>
|
|
|
+ </vxe-table>
|
|
|
+ </el-form>
|
|
|
+ </el-row>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="附件" name="files">
|
|
|
+ <!-- 附件-->
|
|
|
+ <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
|
|
|
+ </el-tab-pane>
|
|
|
+
|
|
|
|
|
|
- </el-tabs>
|
|
|
+ </el-tabs>
|
|
|
+
|
|
|
+ </el-form>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
@@ -379,13 +453,32 @@
|
|
|
planDate: [],
|
|
|
realHeader: '',
|
|
|
clientContactsName: '',
|
|
|
- reportType: ''
|
|
|
+ reportType: '',
|
|
|
+ cwProjectClientContactDTOList: []
|
|
|
},
|
|
|
keyWatch: '',
|
|
|
activeName: 'client',
|
|
|
tableKey: '',
|
|
|
tableKeyClient: '1',
|
|
|
- visible: false
|
|
|
+ tableKeyContact: '2',
|
|
|
+ visible: false,
|
|
|
+ validContactRules: {
|
|
|
+ name: [
|
|
|
+ {required: true, message: '姓名不可以为空'}
|
|
|
+ ],
|
|
|
+ sex: [
|
|
|
+ {required: true, message: '性别不可以为空'}
|
|
|
+ ],
|
|
|
+ officeId: [
|
|
|
+ {required: true, message: '部门不可以为空'}
|
|
|
+ ],
|
|
|
+ position: [
|
|
|
+ {required: true, message: '职务不可以为空'}
|
|
|
+ ],
|
|
|
+ contactFirst: [
|
|
|
+ {required: true, message: '联系方式1不可以为空'}
|
|
|
+ ]
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
projectRecordsService: null,
|
|
@@ -484,7 +577,8 @@
|
|
|
planDate: [],
|
|
|
realHeader: '',
|
|
|
clientContactsName: '',
|
|
|
- reportType: ''
|
|
|
+ reportType: '',
|
|
|
+ cwProjectClientContactDTOList: []
|
|
|
}
|
|
|
this.inputForm.id = id
|
|
|
this.loading = false
|
|
@@ -498,6 +592,9 @@
|
|
|
if (this.commonJS.isEmpty(this.inputForm.workAttachmentDtoList)) {
|
|
|
this.inputForm.workAttachmentDtoList = []
|
|
|
}
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.cwProjectClientContactDTOList)) {
|
|
|
+ this.inputForm.cwProjectClientContactDTOList = []
|
|
|
+ }
|
|
|
if (this.commonJS.isEmpty(this.inputForm.createDate)) {
|
|
|
this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
|
|
}
|
|
@@ -526,6 +623,12 @@
|
|
|
this.$refs['inputForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
|
this.loading = true
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.cwProjectClientContactDTOList)) {
|
|
|
+ this.loading = false
|
|
|
+ this.$message.error('“客户联系人”中至少填写一条信息')
|
|
|
+ throw new Error('“客户联系人”中至少填写一条信息')
|
|
|
+ }
|
|
|
+ this.contactSubmit()
|
|
|
if (this.commonJS.isEmpty(this.inputForm.projectMasterId) && this.commonJS.isEmpty(this.inputForm.realHeader)) {
|
|
|
this.loading = false
|
|
|
this.$message.error('“项目经理1”与“项目经理2”至少填写一项')
|
|
@@ -547,7 +650,9 @@
|
|
|
this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
|
|
}
|
|
|
this.projectRecordsService.saveForm(this.inputForm).then(({data}) => {
|
|
|
+ this.$emit('refreshList')
|
|
|
this.loading = false
|
|
|
+ this.close()
|
|
|
}).catch(() => {
|
|
|
this.loading = false
|
|
|
})
|
|
@@ -589,7 +694,8 @@
|
|
|
planDate: [],
|
|
|
realHeader: '',
|
|
|
clientContactsName: '',
|
|
|
- reportType: ''
|
|
|
+ reportType: '',
|
|
|
+ cwProjectClientContactDTOList: []
|
|
|
}
|
|
|
this.$refs.uploadComponent.clearUpload()
|
|
|
this.$refs.inputForm.resetFields()
|
|
@@ -614,6 +720,25 @@
|
|
|
this.inputForm.cwProjectClientInfoDTOList.push(d)
|
|
|
this.tableKeyClient = Math.random()
|
|
|
}
|
|
|
+ if (type === 'contact') {
|
|
|
+ let d = {
|
|
|
+ contactFirst: '',
|
|
|
+ contactSecond: '',
|
|
|
+ email: '',
|
|
|
+ fax: '',
|
|
|
+ name: '',
|
|
|
+ officeId: '',
|
|
|
+ position: '',
|
|
|
+ remarks: '',
|
|
|
+ sex: ''
|
|
|
+ }
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.cwProjectClientContactDTOList)) {
|
|
|
+ this.inputForm.cwProjectClientContactDTOList = []
|
|
|
+ }
|
|
|
+ this.$refs.contactTable.insertAt(d)
|
|
|
+ this.inputForm.cwProjectClientContactDTOList.push(d)
|
|
|
+ this.tableKeyContact = Math.random()
|
|
|
+ }
|
|
|
},
|
|
|
// 删除
|
|
|
removeEvent (row, rowIndex, type) {
|
|
@@ -621,6 +746,10 @@
|
|
|
this.$refs.clientTable.remove(row)
|
|
|
this.inputForm.cwProjectClientInfoDTOList.splice(rowIndex, 1)
|
|
|
}
|
|
|
+ if (type === 'contact') {
|
|
|
+ this.$refs.contactTable.remove(row)
|
|
|
+ this.inputForm.cwProjectClientContactDTOList.splice(rowIndex, 1)
|
|
|
+ }
|
|
|
},
|
|
|
// 打开客户选择组件
|
|
|
openWorkClient () {
|
|
@@ -767,6 +896,51 @@
|
|
|
} else {
|
|
|
this.inputForm.realHeader = value
|
|
|
}
|
|
|
+ },
|
|
|
+ blurEmail (index) {
|
|
|
+ if (this.commonJS.isNotEmpty(this.inputForm.cwProjectClientContactDTOList[index].email)) {
|
|
|
+ if (!this.validateXG.isEmail(this.inputForm.cwProjectClientContactDTOList[index].email)) {
|
|
|
+ this.$message.error('客户联系人中,第' + (index + 1) + '条数据的“邮箱”填写错误,请重新填写')
|
|
|
+ this.inputForm.cwProjectClientContactDTOList[index].email = ''
|
|
|
+ throw new Error('客户联系人中,第' + (index + 1) + '条数据的“邮箱”填写错误,请重新填写')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ contactSubmit () {
|
|
|
+ this.inputForm.cwProjectClientContactDTOList.forEach((item, index) => {
|
|
|
+ if (this.commonJS.isNotEmpty(item.email)) {
|
|
|
+ if (!this.validateXG.isEmail(item.email)) {
|
|
|
+ this.$message.error('客户联系人中,第' + (index + 1) + '条数据的“邮箱”填写错误')
|
|
|
+ this.loading = false
|
|
|
+ throw new Error('客户联系人中,第' + (index + 1) + '条数据的“邮箱”填写错误')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.commonJS.isEmpty(item.name)) {
|
|
|
+ this.$message.error('客户联系人中,第' + (index + 1) + '条数据的“姓名”未填写')
|
|
|
+ this.loading = false
|
|
|
+ throw new Error('客户联系人中,第' + (index + 1) + '条数据的“姓名”未填写')
|
|
|
+ }
|
|
|
+ if (this.commonJS.isEmpty(item.sex)) {
|
|
|
+ this.$message.error('客户联系人中,第' + (index + 1) + '条数据的“性别”未填写')
|
|
|
+ this.loading = false
|
|
|
+ throw new Error('客户联系人中,第' + (index + 1) + '条数据的“性别”未填写')
|
|
|
+ }
|
|
|
+ if (this.commonJS.isEmpty(item.officeId)) {
|
|
|
+ this.$message.error('客户联系人中,第' + (index + 1) + '条数据的“部门”未填写')
|
|
|
+ this.loading = false
|
|
|
+ throw new Error('客户联系人中,第' + (index + 1) + '条数据的“部门”未填写')
|
|
|
+ }
|
|
|
+ if (this.commonJS.isEmpty(item.position)) {
|
|
|
+ this.$message.error('客户联系人中,第' + (index + 1) + '条数据的“职务”未填写')
|
|
|
+ this.loading = false
|
|
|
+ throw new Error('客户联系人中,第' + (index + 1) + '条数据的“职务”未填写')
|
|
|
+ }
|
|
|
+ if (this.commonJS.isEmpty(item.contactFirst)) {
|
|
|
+ this.$message.error('客户联系人中,第' + (index + 1) + '条数据的“联系方式1”未填写')
|
|
|
+ this.loading = false
|
|
|
+ throw new Error('客户联系人中,第' + (index + 1) + '条数据的“联系方式1”未填写')
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|