|
|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="edit-view">
|
|
|
- <page-title>
|
|
|
+ <page-title :name="pageName">
|
|
|
<el-button @click="$router.go(-1)">取消</el-button>
|
|
|
<el-button @click="del" :loading="$store.state.fetchingData" type="danger" v-if="formData.id">
|
|
|
删除
|
|
|
@@ -14,12 +14,13 @@
|
|
|
:model="formData"
|
|
|
:rules="rules"
|
|
|
ref="form"
|
|
|
- label-width="136px"
|
|
|
+ label-width="110px"
|
|
|
label-position="right"
|
|
|
size="small"
|
|
|
- style="max-width: 500px;"
|
|
|
+ style="max-width: 760px;"
|
|
|
+ class="line"
|
|
|
>
|
|
|
- <el-form-item prop="type" label="type">
|
|
|
+ <el-form-item prop="type" label="type" v-if="!formData.type">
|
|
|
<el-select v-model="formData.type" clearable filterable placeholder="请选择">
|
|
|
<el-option
|
|
|
v-for="item in typeOptions"
|
|
|
@@ -30,7 +31,41 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item prop="supplierType" label="供应商类型">
|
|
|
+
|
|
|
+ <el-row type="flex">
|
|
|
+ <el-col :span="12" :offset="0">
|
|
|
+ <el-form-item prop="type" label="序号">
|
|
|
+ <el-input v-model="formData.id"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12" :offset="0">
|
|
|
+ <el-form-item prop="code" :label="`${formData.type === 'CLIENT' ? '客户' : '供应商'}代码`">
|
|
|
+ <el-input v-model="formData.code" placeholder="仅限大写字母,5字以内"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <el-form-item prop="name" label="个人/企业名称" class="input-pre-zh">
|
|
|
+ <el-input v-model="formData.name" placeholder="请输入中文名称">
|
|
|
+ <template #prepend>中</template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="enName" label="" class="input-pre-en">
|
|
|
+ <el-input v-model="formData.enName" placeholder="请输入英文名称">
|
|
|
+ <template #prepend>英</template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="address" label="注册地址" class="input-pre-zh">
|
|
|
+ <el-input v-model="formData.address" placeholder="请输入中文地址">
|
|
|
+ <template #prepend>中</template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="enAddress" label="" class="input-pre-en">
|
|
|
+ <el-input v-model="formData.enAddress" placeholder="请输入英文地址">
|
|
|
+ <template #prepend>英</template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="supplierType" label="供应商类型" v-if="formData.type === 'SUPPLIER'">
|
|
|
<el-select v-model="formData.supplierType" clearable filterable placeholder="请选择">
|
|
|
<el-option
|
|
|
v-for="item in supplierTypeOptions"
|
|
|
@@ -41,42 +76,50 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item prop="code" label="客户代码">
|
|
|
- <el-input v-model="formData.code"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item prop="name" label="个人/企业名称中">
|
|
|
- <el-input v-model="formData.name"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item prop="enName" label="个人/企业名称英">
|
|
|
- <el-input v-model="formData.enName"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item prop="address" label="注册地址中">
|
|
|
- <el-input v-model="formData.address"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item prop="enAddress" label="注册地址英">
|
|
|
- <el-input v-model="formData.enAddress"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item prop="uscc" label="统一社会信用代码">
|
|
|
- <el-input v-model="formData.uscc"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item prop="billingName" label="开票名称">
|
|
|
- <el-input v-model="formData.billingName"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item prop="taxID" label="税号">
|
|
|
- <el-input v-model="formData.taxID"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item prop="billingAddress" label="开票地址">
|
|
|
- <el-input v-model="formData.billingAddress"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item prop="billingPhone" label="开票电话">
|
|
|
- <el-input v-model="formData.billingPhone"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item prop="accountBank" label="开户行">
|
|
|
- <el-input v-model="formData.accountBank"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item prop="account" label="账号">
|
|
|
- <el-input v-model="formData.account"></el-input>
|
|
|
+ <el-form-item prop="uscc" label="统一社会信用代码" class="input1">
|
|
|
+ <el-input v-model="formData.uscc" placeholder="请输入"></el-input>
|
|
|
</el-form-item>
|
|
|
+ <divider>
|
|
|
+ 开票信息
|
|
|
+ </divider>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12" :offset="0">
|
|
|
+ <el-form-item prop="billingName" label="名称">
|
|
|
+ <el-input v-model="formData.billingName" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12" :offset="0">
|
|
|
+ <el-form-item prop="taxID" label="税号">
|
|
|
+ <el-input v-model="formData.taxID" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12" :offset="0">
|
|
|
+ <el-form-item prop="billingAddress" label="地址">
|
|
|
+ <el-input v-model="formData.billingAddress" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12" :offset="0">
|
|
|
+ <el-form-item prop="billingPhone" label="电话">
|
|
|
+ <el-input v-model="formData.billingPhone" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12" :offset="0">
|
|
|
+ <el-form-item prop="accountBank" label="开户行">
|
|
|
+ <el-input v-model="formData.accountBank" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12" :offset="0">
|
|
|
+ <el-form-item prop="account" label="账号">
|
|
|
+ <el-input v-model="formData.account" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
<el-form-item class="form-submit">
|
|
|
<el-button @click="onSave" :loading="saving" size="default" type="primary">保存 </el-button>
|
|
|
<el-button @click="onDelete" :loading="saving" size="default" type="danger" v-if="formData.id"
|
|
|
@@ -104,6 +147,14 @@ export default {
|
|
|
this.$message.error(e.error);
|
|
|
});
|
|
|
}
|
|
|
+ this.$nextTick(() => {
|
|
|
+ if (this.$route.query.type === 'CLIENT') {
|
|
|
+ this.pageName = '客户管理编辑';
|
|
|
+ } else {
|
|
|
+ this.pageName = '供应商管理编辑';
|
|
|
+ }
|
|
|
+ this.formData.type = this.$route.query.type || '';
|
|
|
+ });
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -117,7 +168,8 @@ export default {
|
|
|
supplierTypeOptions: [
|
|
|
{ label: '境内', value: 'DOMESTIC' },
|
|
|
{ label: '境外', value: 'ABROAD' }
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ pageName: ''
|
|
|
};
|
|
|
},
|
|
|
methods: {
|