|
|
@ -1,266 +1,388 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<a-modal
|
|
|
|
<!-- <a-modal
|
|
|
|
title="编辑客户信息"
|
|
|
|
title="新增客户信息"
|
|
|
|
:width="1100"
|
|
|
|
:width="1100"
|
|
|
|
:visible="visible"
|
|
|
|
:visible="visible"
|
|
|
|
:confirmLoading="confirmLoading"
|
|
|
|
:confirmLoading="confirmLoading"
|
|
|
|
@ok="handleSubmit"
|
|
|
|
@ok="handleSubmit"
|
|
|
|
@cancel="handleCancel"
|
|
|
|
@cancel="handleCancel"
|
|
|
|
>
|
|
|
|
> -->
|
|
|
|
<a-spin :spinning="confirmLoading">
|
|
|
|
<!-- <a-spin :spinning="confirmLoading"> -->
|
|
|
|
<a-form :form="form">
|
|
|
|
<a-form :form="form" class="CsForm">
|
|
|
|
<a-row>
|
|
|
|
<a-row type="flex" justify="end">
|
|
|
|
<a-col :span="8">
|
|
|
|
<a-col :span="1">
|
|
|
|
<a-form-item label="简称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
<a-button type="primary" @click="handleSubmit">
|
|
|
|
<a-input
|
|
|
|
保存
|
|
|
|
placeholder="请输入简称"
|
|
|
|
</a-button>
|
|
|
|
v-decorator="['shortName', { rules: [{ required: true, message: '请输入简称!' }] }]"
|
|
|
|
</a-col>
|
|
|
|
/>
|
|
|
|
</a-row>
|
|
|
|
</a-form-item>
|
|
|
|
<a-row>
|
|
|
|
</a-col>
|
|
|
|
<p class="CsFormTitle"><span>基本信息</span></p>
|
|
|
|
<a-col :span="8">
|
|
|
|
<a-col :span="6">
|
|
|
|
<a-form-item label="全称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
<a-form-item label="助记码" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
<a-input
|
|
|
|
<a-input
|
|
|
|
placeholder="请输入全称"
|
|
|
|
placeholder="请输入助记码"
|
|
|
|
v-decorator="['fullName', { rules: [{ required: true, message: '请输入全称!' }] }]"
|
|
|
|
v-decorator="['codeName', { rules: [{ required: true, message: '请输入助记码!' }] }]"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</a-form-item>
|
|
|
|
</a-form-item>
|
|
|
|
</a-col>
|
|
|
|
</a-col>
|
|
|
|
<a-col :span="8">
|
|
|
|
<a-col :span="6">
|
|
|
|
<a-form-item label="负责人" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
<a-form-item label="简称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
<a-input
|
|
|
|
<a-input
|
|
|
|
placeholder="请输入负责人"
|
|
|
|
placeholder="请输入简称"
|
|
|
|
v-decorator="['chief', { rules: [{ required: true, message: '请输入负责人!' }] }]"
|
|
|
|
v-decorator="['shortName', { rules: [{ required: true, message: '请输入简称!' }] }]"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</a-form-item>
|
|
|
|
</a-form-item>
|
|
|
|
</a-col>
|
|
|
|
</a-col>
|
|
|
|
</a-row>
|
|
|
|
<a-col :span="6">
|
|
|
|
<a-row>
|
|
|
|
<a-form-item label="全称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
<a-col :span="8">
|
|
|
|
<a-input
|
|
|
|
<a-form-item label="电话" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
placeholder="请输入全称"
|
|
|
|
<a-input
|
|
|
|
v-decorator="['fullName', { rules: [{ required: true, message: '请输入全称!' }] }]"
|
|
|
|
placeholder="请输入电话"
|
|
|
|
/>
|
|
|
|
v-decorator="['tel', { rules: [{ required: true, message: '请输入电话!' }] }]"
|
|
|
|
</a-form-item>
|
|
|
|
/>
|
|
|
|
</a-col>
|
|
|
|
</a-form-item>
|
|
|
|
<a-col :span="6">
|
|
|
|
</a-col>
|
|
|
|
<a-form-item label="负责人" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
<a-col :span="8">
|
|
|
|
<a-input
|
|
|
|
<a-form-item label="邮箱" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
placeholder="请输入负责人"
|
|
|
|
<a-input
|
|
|
|
v-decorator="['chief', { rules: [{ required: true, message: '请输入负责人!' }] }]"
|
|
|
|
placeholder="请输入邮箱"
|
|
|
|
/>
|
|
|
|
v-decorator="['email', { rules: [{ required: true, message: '请输入邮箱!' }] }]"
|
|
|
|
</a-form-item>
|
|
|
|
/>
|
|
|
|
</a-col>
|
|
|
|
</a-form-item>
|
|
|
|
</a-row>
|
|
|
|
</a-col>
|
|
|
|
<a-row>
|
|
|
|
<a-col :span="8">
|
|
|
|
<a-col :span="6">
|
|
|
|
<a-form-item label="QQ" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
<a-form-item label="电话" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
<a-input
|
|
|
|
<a-input
|
|
|
|
placeholder="请输入QQ"
|
|
|
|
placeholder="请输入电话"
|
|
|
|
v-decorator="['qq', { rules: [{ required: true, message: '请输入QQ!' }] }]"
|
|
|
|
v-decorator="['tel', { rules: [{ required: true, message: '请输入电话!' }] }]"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</a-form-item>
|
|
|
|
</a-form-item>
|
|
|
|
</a-col>
|
|
|
|
</a-col>
|
|
|
|
</a-row>
|
|
|
|
<a-col :span="6">
|
|
|
|
<a-row>
|
|
|
|
<a-form-item label="邮箱" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
<a-col :span="8">
|
|
|
|
<a-input
|
|
|
|
<a-form-item label="网址" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
placeholder="请输入邮箱"
|
|
|
|
<a-input
|
|
|
|
v-decorator="['email', { rules: [{ required: true, message: '请输入邮箱!' }] }]"
|
|
|
|
placeholder="请输入网址"
|
|
|
|
/>
|
|
|
|
v-decorator="['webUrl', { rules: [{ required: true, message: '请输入网址!' }] }]"
|
|
|
|
</a-form-item>
|
|
|
|
/>
|
|
|
|
</a-col>
|
|
|
|
</a-form-item>
|
|
|
|
<a-col :span="6">
|
|
|
|
</a-col>
|
|
|
|
<a-form-item label="QQ" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
<a-col :span="8">
|
|
|
|
<a-input
|
|
|
|
<a-form-item label="省份" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
placeholder="请输入QQ"
|
|
|
|
<a-input
|
|
|
|
v-decorator="['qq', { rules: [{ required: true, message: '请输入QQ!' }] }]"
|
|
|
|
placeholder="请输入省份"
|
|
|
|
/>
|
|
|
|
v-decorator="['province', { rules: [{ required: true, message: '请输入省份!' }] }]"
|
|
|
|
</a-form-item>
|
|
|
|
/>
|
|
|
|
</a-col>
|
|
|
|
</a-form-item>
|
|
|
|
<a-col :span="6">
|
|
|
|
</a-col>
|
|
|
|
<a-form-item label="网址" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
<a-col :span="8">
|
|
|
|
<a-input
|
|
|
|
<a-form-item label="城市" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
placeholder="请输入网址"
|
|
|
|
<a-input
|
|
|
|
v-decorator="['webUrl', { rules: [{ required: true, message: '请输入网址!' }] }]"
|
|
|
|
placeholder="请输入城市"
|
|
|
|
/>
|
|
|
|
v-decorator="['city', { rules: [{ required: true, message: '请输入城市!' }] }]"
|
|
|
|
</a-form-item>
|
|
|
|
/>
|
|
|
|
</a-col>
|
|
|
|
</a-form-item>
|
|
|
|
</a-row>
|
|
|
|
</a-col>
|
|
|
|
<a-row>
|
|
|
|
</a-row>
|
|
|
|
<a-col :span="6">
|
|
|
|
<a-row>
|
|
|
|
<a-form-item label="省份" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
<a-col :span="8">
|
|
|
|
<a-input
|
|
|
|
<a-form-item label="地址" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
placeholder="请输入省份"
|
|
|
|
<a-input
|
|
|
|
v-decorator="['province', { rules: [{ required: true, message: '请输入省份!' }] }]"
|
|
|
|
placeholder="请输入地址"
|
|
|
|
/>
|
|
|
|
v-decorator="['addr', { rules: [{ required: true, message: '请输入地址!' }] }]"
|
|
|
|
</a-form-item>
|
|
|
|
/>
|
|
|
|
</a-col>
|
|
|
|
</a-form-item>
|
|
|
|
<a-col :span="6">
|
|
|
|
</a-col>
|
|
|
|
<a-form-item label="城市" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
<a-col :span="8">
|
|
|
|
<a-input
|
|
|
|
<a-form-item label="英文全名" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
placeholder="请输入城市"
|
|
|
|
<a-input
|
|
|
|
v-decorator="['city', { rules: [{ required: true, message: '请输入城市!' }] }]"
|
|
|
|
placeholder="请输入英文全名"
|
|
|
|
/>
|
|
|
|
v-decorator="['fullNameEN', { rules: [{ required: true, message: '请输入英文全名!' }] }]"
|
|
|
|
</a-form-item>
|
|
|
|
/>
|
|
|
|
</a-col>
|
|
|
|
</a-form-item>
|
|
|
|
<a-col :span="12">
|
|
|
|
</a-col>
|
|
|
|
<a-form-item label="地址" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
|
|
|
|
<a-col :span="8">
|
|
|
|
<a-input
|
|
|
|
<a-form-item label="英文地址" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
placeholder="请输入地址"
|
|
|
|
<a-input
|
|
|
|
v-decorator="['addr', { rules: [{ required: true, message: '请输入地址!' }] }]"
|
|
|
|
placeholder="请输入英文地址"
|
|
|
|
/>
|
|
|
|
v-decorator="['addrEN', { rules: [{ required: true, message: '请输入英文地址!' }] }]"
|
|
|
|
</a-form-item>
|
|
|
|
/>
|
|
|
|
</a-col>
|
|
|
|
</a-form-item>
|
|
|
|
</a-row>
|
|
|
|
</a-col>
|
|
|
|
<a-row>
|
|
|
|
</a-row>
|
|
|
|
<a-col :span="12">
|
|
|
|
<a-row>
|
|
|
|
<a-form-item label="英文全名" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
|
|
|
|
<a-col :span="8">
|
|
|
|
<a-input
|
|
|
|
<a-form-item label="发票抬头" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
placeholder="请输入英文全名"
|
|
|
|
<a-input
|
|
|
|
v-decorator="['fullNameEN', { rules: [{ required: true, message: '请输入英文全名!' }] }]"
|
|
|
|
placeholder="请输入发票抬头"
|
|
|
|
/>
|
|
|
|
v-decorator="['invTitle', { rules: [{ required: true, message: '请输入发票抬头!' }] }]"
|
|
|
|
</a-form-item>
|
|
|
|
/>
|
|
|
|
</a-col>
|
|
|
|
</a-form-item>
|
|
|
|
<a-col :span="12">
|
|
|
|
</a-col>
|
|
|
|
<a-form-item label="英文地址" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
|
|
|
|
<a-col :span="8">
|
|
|
|
<a-input
|
|
|
|
<a-form-item label="纳税人识别号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
placeholder="请输入英文地址"
|
|
|
|
<a-input
|
|
|
|
v-decorator="['addrEN', { rules: [{ required: true, message: '请输入英文地址!' }] }]"
|
|
|
|
placeholder="请输入纳税人识别号"
|
|
|
|
/>
|
|
|
|
v-decorator="['taxNO', { rules: [{ required: true, message: '请输入纳税人识别号!' }] }]"
|
|
|
|
</a-form-item>
|
|
|
|
/>
|
|
|
|
</a-col>
|
|
|
|
</a-form-item>
|
|
|
|
</a-row>
|
|
|
|
</a-col>
|
|
|
|
<p class="CsFormTitle"><span>联系人信息</span></p>
|
|
|
|
<a-col :span="8">
|
|
|
|
<vxe-toolbar>
|
|
|
|
<a-form-item label="发票地址电话" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
<template #buttons>
|
|
|
|
<a-input
|
|
|
|
<vxe-button icon="vxe-icon-square-plus" @click="insertEvent()">新增</vxe-button>
|
|
|
|
placeholder="请输入发票地址电话"
|
|
|
|
<vxe-button @click="removeCheckboxRow()">删除选中</vxe-button>
|
|
|
|
v-decorator="['invAddrTel', { rules: [{ required: true, message: '请输入发票地址电话!' }] }]"
|
|
|
|
</template>
|
|
|
|
/>
|
|
|
|
</vxe-toolbar>
|
|
|
|
</a-form-item>
|
|
|
|
<vxe-table
|
|
|
|
</a-col>
|
|
|
|
ref="xTable"
|
|
|
|
</a-row>
|
|
|
|
border
|
|
|
|
<a-row>
|
|
|
|
resizable
|
|
|
|
<a-col :span="8">
|
|
|
|
show-overflow
|
|
|
|
<a-form-item label="人民币开户行" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
:data="ContactsData"
|
|
|
|
<a-input
|
|
|
|
:edit-config="{ trigger: 'click', mode: 'cell' }"
|
|
|
|
placeholder="请输入人民币开户行"
|
|
|
|
>
|
|
|
|
v-decorator="['rmbBank', { rules: [{ required: true, message: '请输入人民币开户行!' }] }]"
|
|
|
|
<vxe-column type="checkbox" width="60"></vxe-column>
|
|
|
|
/>
|
|
|
|
<vxe-column type="seq" width="60"></vxe-column>
|
|
|
|
</a-form-item>
|
|
|
|
<vxe-column field="roleCode" title="角色" :edit-render="{}">
|
|
|
|
</a-col>
|
|
|
|
<template #default="{ row }">
|
|
|
|
<a-col :span="8">
|
|
|
|
<span>{{ formatRole(row.roleCode) }}</span>
|
|
|
|
<a-form-item label="人民币账号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
</template>
|
|
|
|
<a-input
|
|
|
|
<template #edit="{ row }">
|
|
|
|
placeholder="请输入人民币账号"
|
|
|
|
<vxe-select v-model="row.roleCode" transfer>
|
|
|
|
v-decorator="['rmbAccount', { rules: [{ required: true, message: '请输入人民币账号!' }] }]"
|
|
|
|
<vxe-option v-for="item in TypeData" :key="item.code" :value="item.code" :label="item.value"></vxe-option>
|
|
|
|
/>
|
|
|
|
</vxe-select>
|
|
|
|
</a-form-item>
|
|
|
|
</template>
|
|
|
|
</a-col>
|
|
|
|
</vxe-column>
|
|
|
|
</a-row>
|
|
|
|
<vxe-column field="name" title="姓名" :edit-render="{}">
|
|
|
|
<a-row>
|
|
|
|
<template #edit="{ row }">
|
|
|
|
<a-col :span="8">
|
|
|
|
<vxe-input v-model="row.name" type="text" placeholder="请输入姓名"></vxe-input>
|
|
|
|
<a-form-item label="美元开户行" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
</template>
|
|
|
|
<a-input
|
|
|
|
</vxe-column>
|
|
|
|
placeholder="请输入美元开户行"
|
|
|
|
<vxe-column field="email" title="邮箱" :edit-render="{}">
|
|
|
|
v-decorator="['usdBank', { rules: [{ required: true, message: '请输入美元开户行!' }] }]"
|
|
|
|
<template #edit="{ row }">
|
|
|
|
/>
|
|
|
|
<vxe-input v-model="row.email" type="text" placeholder="请输入邮箱"></vxe-input>
|
|
|
|
</a-form-item>
|
|
|
|
</template>
|
|
|
|
</a-col>
|
|
|
|
</vxe-column>
|
|
|
|
<a-col :span="8">
|
|
|
|
<vxe-column field="tel" title="电话" :edit-render="{}">
|
|
|
|
<a-form-item label="美元账号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
<template #edit="{ row }">
|
|
|
|
<a-input
|
|
|
|
<vxe-input v-model="row.tel" type="text" placeholder="请输入电话"></vxe-input>
|
|
|
|
placeholder="请输入美元账号"
|
|
|
|
</template>
|
|
|
|
v-decorator="['usdAccount', { rules: [{ required: true, message: '请输入美元账号!' }] }]"
|
|
|
|
</vxe-column>
|
|
|
|
/>
|
|
|
|
<vxe-column field="qq" title="QQ" :edit-render="{}">
|
|
|
|
</a-form-item>
|
|
|
|
<template #edit="{ row }">
|
|
|
|
</a-col>
|
|
|
|
<vxe-input v-model="row.qq" type="text" placeholder="请输入QQ" transfer></vxe-input>
|
|
|
|
</a-row>
|
|
|
|
</template>
|
|
|
|
</a-form>
|
|
|
|
</vxe-column>
|
|
|
|
</a-spin>
|
|
|
|
<vxe-column field="remark" title="备注" :edit-render="{}">
|
|
|
|
</a-modal>
|
|
|
|
<template #edit="{ row }">
|
|
|
|
|
|
|
|
<vxe-input v-model="row.remark" type="text" placeholder="请输入备注" transfer></vxe-input>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</vxe-column>
|
|
|
|
|
|
|
|
</vxe-table>
|
|
|
|
|
|
|
|
<p class="CsFormTitle" :style="{ marginTop: '10px' }"><span>财务信息</span></p>
|
|
|
|
|
|
|
|
<a-row>
|
|
|
|
|
|
|
|
<a-col :span="12">
|
|
|
|
|
|
|
|
<a-form-item label="发票抬头" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
|
|
|
|
|
|
|
|
<a-input
|
|
|
|
|
|
|
|
placeholder="请输入发票抬头"
|
|
|
|
|
|
|
|
v-decorator="['invTitle', { rules: [{ required: true, message: '请输入发票抬头!' }] }]"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</a-form-item>
|
|
|
|
|
|
|
|
</a-col>
|
|
|
|
|
|
|
|
<a-col :span="12">
|
|
|
|
|
|
|
|
<a-form-item label="纳税人识别号" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
|
|
|
|
|
|
|
|
<a-input
|
|
|
|
|
|
|
|
placeholder="请输入纳税人识别号"
|
|
|
|
|
|
|
|
v-decorator="['taxNO', { rules: [{ required: true, message: '请输入纳税人识别号!' }] }]"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</a-form-item>
|
|
|
|
|
|
|
|
</a-col>
|
|
|
|
|
|
|
|
<a-col :span="18">
|
|
|
|
|
|
|
|
<a-form-item label="发票地址电话" :labelCol="labelCol3" :wrapperCol="wrapperCol3" has-feedback>
|
|
|
|
|
|
|
|
<a-input
|
|
|
|
|
|
|
|
placeholder="请输入发票地址电话"
|
|
|
|
|
|
|
|
v-decorator="['invAddrTel', { rules: [{ required: true, message: '请输入发票地址电话!' }] }]"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</a-form-item>
|
|
|
|
|
|
|
|
</a-col>
|
|
|
|
|
|
|
|
</a-row>
|
|
|
|
|
|
|
|
<a-row>
|
|
|
|
|
|
|
|
<a-col :span="12">
|
|
|
|
|
|
|
|
<a-form-item label="人民币开户行" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
|
|
|
|
|
|
|
|
<a-input
|
|
|
|
|
|
|
|
placeholder="请输入人民币开户行"
|
|
|
|
|
|
|
|
v-decorator="['rmbBank', { rules: [{ required: true, message: '请输入人民币开户行!' }] }]"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</a-form-item>
|
|
|
|
|
|
|
|
</a-col>
|
|
|
|
|
|
|
|
<a-col :span="12">
|
|
|
|
|
|
|
|
<a-form-item label="人民币账号" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
|
|
|
|
|
|
|
|
<a-input
|
|
|
|
|
|
|
|
placeholder="请输入人民币账号"
|
|
|
|
|
|
|
|
v-decorator="['rmbAccount', { rules: [{ required: true, message: '请输入人民币账号!' }] }]"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</a-form-item>
|
|
|
|
|
|
|
|
</a-col>
|
|
|
|
|
|
|
|
</a-row>
|
|
|
|
|
|
|
|
<a-row>
|
|
|
|
|
|
|
|
<a-col :span="12">
|
|
|
|
|
|
|
|
<a-form-item label="美元开户行" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
|
|
|
|
|
|
|
|
<a-input
|
|
|
|
|
|
|
|
placeholder="请输入美元开户行"
|
|
|
|
|
|
|
|
v-decorator="['usdBank', { rules: [{ required: true, message: '请输入美元开户行!' }] }]"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</a-form-item>
|
|
|
|
|
|
|
|
</a-col>
|
|
|
|
|
|
|
|
<a-col :span="12">
|
|
|
|
|
|
|
|
<a-form-item label="美元账号" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
|
|
|
|
|
|
|
|
<a-input
|
|
|
|
|
|
|
|
placeholder="请输入美元账号"
|
|
|
|
|
|
|
|
v-decorator="['usdAccount', { rules: [{ required: true, message: '请输入美元账号!' }] }]"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</a-form-item>
|
|
|
|
|
|
|
|
</a-col>
|
|
|
|
|
|
|
|
</a-row>
|
|
|
|
|
|
|
|
</a-form>
|
|
|
|
|
|
|
|
<!-- </a-spin>
|
|
|
|
|
|
|
|
</a-modal> -->
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { DjyCustomerEdit } from '@/api/modular/main/CustomerInformationManagement'
|
|
|
|
import { DjyCustomerEdit, DjyCustomerDetail } from '@/api/modular/main/CustomerInformationManagement'
|
|
|
|
|
|
|
|
import { sysDictDataPage } from '@/api/modular/system/dictDataManage'
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
|
|
|
|
props: ['RowData'],
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
|
|
|
|
sexList: [
|
|
|
|
|
|
|
|
{ label: '', value: '' },
|
|
|
|
|
|
|
|
{ label: '男', value: '1' },
|
|
|
|
|
|
|
|
{ label: '女', value: '0' }
|
|
|
|
|
|
|
|
],
|
|
|
|
labelCol: {
|
|
|
|
labelCol: {
|
|
|
|
xs: { span: 24 },
|
|
|
|
xs: { span: 24 },
|
|
|
|
sm: { span: 7 }
|
|
|
|
sm: { span: 6 }
|
|
|
|
},
|
|
|
|
},
|
|
|
|
wrapperCol: {
|
|
|
|
labelCol2: {
|
|
|
|
|
|
|
|
xs: { span: 24 },
|
|
|
|
|
|
|
|
sm: { span: 3 }
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
labelCol3: {
|
|
|
|
xs: { span: 24 },
|
|
|
|
xs: { span: 24 },
|
|
|
|
sm: { span: 15 }
|
|
|
|
sm: { span: 2 }
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
wrapperCol: {
|
|
|
|
|
|
|
|
xs: { span: 25 },
|
|
|
|
|
|
|
|
sm: { span: 16 }
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
wrapperCol2: {
|
|
|
|
|
|
|
|
xs: { span: 25 },
|
|
|
|
|
|
|
|
sm: { span: 20 }
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
wrapperCol3: {
|
|
|
|
|
|
|
|
xs: { span: 25 },
|
|
|
|
|
|
|
|
sm: { span: 22 }
|
|
|
|
},
|
|
|
|
},
|
|
|
|
typeData: [],
|
|
|
|
|
|
|
|
visible: false,
|
|
|
|
visible: false,
|
|
|
|
confirmLoading: false,
|
|
|
|
confirmLoading: false,
|
|
|
|
form: this.$form.createForm(this)
|
|
|
|
form: this.$form.createForm(this),
|
|
|
|
|
|
|
|
ContactsData: [],
|
|
|
|
|
|
|
|
Data: {},
|
|
|
|
|
|
|
|
TypeData: []
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
mounted() {
|
|
|
|
|
|
|
|
DjyCustomerDetail({ id: this.RowData.id }).then(res => {
|
|
|
|
|
|
|
|
this.Data = res.data
|
|
|
|
|
|
|
|
this.form.setFieldsValue({
|
|
|
|
|
|
|
|
...res.data
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
res.data.contacts.forEach((item, index) => {
|
|
|
|
|
|
|
|
item.WebKey = index
|
|
|
|
|
|
|
|
this.ContactsData.push(item)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
sysDictDataPage({ pageNo: 1, pageSize: 999, typeId: '346103538081861' }).then(res => {
|
|
|
|
|
|
|
|
this.TypeData = res.data.rows
|
|
|
|
|
|
|
|
console.log(this.TypeData)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
removeCheckboxRow() {
|
|
|
|
|
|
|
|
this.$refs.xTable.selection.forEach(item => {
|
|
|
|
|
|
|
|
this.ContactsData.forEach((item2, index2) => {
|
|
|
|
|
|
|
|
if (item.WebKey == item2.WebKey) {
|
|
|
|
|
|
|
|
this.ContactsData.splice(index2, 1)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
insertEvent() {
|
|
|
|
|
|
|
|
this.ContactsData.push({
|
|
|
|
|
|
|
|
WebKey: this.ContactsData.length ? this.ContactsData[this.ContactsData.length - 1].WebKey + 1 : 1,
|
|
|
|
|
|
|
|
roleName: '',
|
|
|
|
|
|
|
|
name: '',
|
|
|
|
|
|
|
|
tel: '',
|
|
|
|
|
|
|
|
email: '',
|
|
|
|
|
|
|
|
qq: '',
|
|
|
|
|
|
|
|
remark: ''
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
formatRole(value) {
|
|
|
|
|
|
|
|
let RData = ''
|
|
|
|
|
|
|
|
this.TypeData.forEach(item => {
|
|
|
|
|
|
|
|
console.log(item.code, value)
|
|
|
|
|
|
|
|
if (item.code == value) {
|
|
|
|
|
|
|
|
RData = item.value
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return RData
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
formatSex(value) {
|
|
|
|
|
|
|
|
if (value === '1') {
|
|
|
|
|
|
|
|
return '男'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (value === '0') {
|
|
|
|
|
|
|
|
return '女'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return ''
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
formatMultiSex(values) {
|
|
|
|
|
|
|
|
if (values) {
|
|
|
|
|
|
|
|
return values.map(val => this.formatSex(val)).join(',')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return ''
|
|
|
|
|
|
|
|
},
|
|
|
|
// 初始化方法
|
|
|
|
// 初始化方法
|
|
|
|
edit(record) {
|
|
|
|
add(record) {
|
|
|
|
console.log(record)
|
|
|
|
|
|
|
|
this.visible = true
|
|
|
|
this.visible = true
|
|
|
|
const typeOption = this.$options
|
|
|
|
|
|
|
|
this.typeData = typeOption.filters['dictData']('edi_type')
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
|
|
this.form.setFieldsValue({
|
|
|
|
|
|
|
|
addr: record.addr,
|
|
|
|
|
|
|
|
addrEN: record.addrEN,
|
|
|
|
|
|
|
|
chief: record.chief,
|
|
|
|
|
|
|
|
city: record.city,
|
|
|
|
|
|
|
|
createdTime: record.createdTime,
|
|
|
|
|
|
|
|
createdUserId: record.createdUserId,
|
|
|
|
|
|
|
|
createdUserName: record.createdUserName,
|
|
|
|
|
|
|
|
email: record.email,
|
|
|
|
|
|
|
|
fullName: record.fullName,
|
|
|
|
|
|
|
|
fullNameEN: record.fullNameEN,
|
|
|
|
|
|
|
|
id: record.id,
|
|
|
|
|
|
|
|
invAddrTel: record.invAddrTel,
|
|
|
|
|
|
|
|
invTitle: record.invTitle,
|
|
|
|
|
|
|
|
isDeleted: record.isDeleted,
|
|
|
|
|
|
|
|
province: record.province,
|
|
|
|
|
|
|
|
qq: record.qq,
|
|
|
|
|
|
|
|
rmbAccount: record.rmbAccount,
|
|
|
|
|
|
|
|
rmbBank: record.rmbBank,
|
|
|
|
|
|
|
|
shortName: record.shortName,
|
|
|
|
|
|
|
|
taxNO: record.taxNO,
|
|
|
|
|
|
|
|
tel: record.tel,
|
|
|
|
|
|
|
|
tenantId: record.tenantId,
|
|
|
|
|
|
|
|
usdAccount: record.usdAccount,
|
|
|
|
|
|
|
|
usdBank: record.usdBank,
|
|
|
|
|
|
|
|
webUrl: record.webUrl
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
console.log(this.form.getFieldsValue())
|
|
|
|
|
|
|
|
}, 100)
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 提交表单
|
|
|
|
|
|
|
|
*/
|
|
|
|
handleSubmit() {
|
|
|
|
handleSubmit() {
|
|
|
|
const {
|
|
|
|
const {
|
|
|
|
form: { validateFields }
|
|
|
|
form: { validateFields }
|
|
|
|
} = this
|
|
|
|
} = this
|
|
|
|
this.confirmLoading = true
|
|
|
|
this.confirmLoading = true
|
|
|
|
validateFields((errors, values) => {
|
|
|
|
validateFields((errors, values) => {
|
|
|
|
console.log(errors, values)
|
|
|
|
|
|
|
|
if (!errors) {
|
|
|
|
if (!errors) {
|
|
|
|
for (const key in values) {
|
|
|
|
for (const key in values) {
|
|
|
|
console.log(key, 1)
|
|
|
|
|
|
|
|
if (typeof values[key] === 'object' && !(values[key] === null)) {
|
|
|
|
if (typeof values[key] === 'object' && !(values[key] === null)) {
|
|
|
|
values[key] = JSON.stringify(values[key])
|
|
|
|
values[key] = JSON.stringify(values[key])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
console.log(this.form, values.id)
|
|
|
|
DjyCustomerEdit({ ...this.Data, ...values, contacts: this.ContactsData })
|
|
|
|
DjyCustomerEdit(values)
|
|
|
|
|
|
|
|
.then(res => {
|
|
|
|
.then(res => {
|
|
|
|
if (res.success) {
|
|
|
|
if (res.success) {
|
|
|
|
this.$message.success('编辑成功')
|
|
|
|
this.$message.success('新增成功')
|
|
|
|
this.confirmLoading = false
|
|
|
|
this.confirmLoading = false
|
|
|
|
this.$emit('ok', values)
|
|
|
|
this.$emit('ok', values)
|
|
|
|
this.handleCancel()
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.$message.error('编辑失败') // + res.message
|
|
|
|
this.$message.error('新增失败') // + res.message
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.finally(res => {
|
|
|
|
.finally(res => {
|
|
|
@ -278,3 +400,16 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
|
|
.CsForm {
|
|
|
|
|
|
|
|
background: #fff;
|
|
|
|
|
|
|
|
padding: 25px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.CsFormTitle {
|
|
|
|
|
|
|
|
border-bottom: 1px solid #c9c9c9;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.CsFormTitle > span {
|
|
|
|
|
|
|
|
padding: 0.25rem 0.5rem 0 0.5rem;
|
|
|
|
|
|
|
|
/* border: 1px solid #c9c9c9; */
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|
|
|
|