|
@@ -6,9 +6,9 @@
|
|
|
finish-status="success"
|
|
|
class="public-margin-t-20 public-margin-b-20"
|
|
|
>
|
|
|
- <el-step title="客户信息" @click="handleStep(0)"></el-step>
|
|
|
- <el-step title="客户联系人" @click="handleStep(1)"></el-step>
|
|
|
- <el-step title="账户信息" @click="handleStep(2)"></el-step>
|
|
|
+ <el-step title="客户信息"></el-step>
|
|
|
+ <el-step title="客户联系人"></el-step>
|
|
|
+ <el-step title="账户信息"></el-step>
|
|
|
</el-steps>
|
|
|
|
|
|
<!-- 客户信息 -->
|
|
@@ -36,7 +36,7 @@
|
|
|
<el-input
|
|
|
v-model="formData.customerCode"
|
|
|
placeholder="请输入客户编号"
|
|
|
- clearable
|
|
|
+ disabled
|
|
|
:style="{ width: '100%' }"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
@@ -46,7 +46,7 @@
|
|
|
<el-input
|
|
|
v-model="formData.dhrmCompanyId"
|
|
|
placeholder="请输入申请公司"
|
|
|
- clearable
|
|
|
+ disabled
|
|
|
:style="{ width: '100%' }"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
@@ -65,6 +65,8 @@
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="账期(月)" prop="stockCode">
|
|
|
<el-input
|
|
|
+ type="number"
|
|
|
+ onkeyup="value=value.replace(/[^\d]/g,0)"
|
|
|
v-model="formData.stockCode"
|
|
|
placeholder="请输入账期(月)"
|
|
|
clearable
|
|
@@ -76,6 +78,8 @@
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="年营业额(万元)" prop="yearBusiness">
|
|
|
<el-input
|
|
|
+ type="number"
|
|
|
+ oninput="if(value.length>12)value=value.slice(0,12)"
|
|
|
v-model="formData.yearBusiness"
|
|
|
placeholder="请输入年营业额(万元)"
|
|
|
clearable
|
|
@@ -86,6 +90,7 @@
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="预计项目毛利率(%)" prop="connectedEntities">
|
|
|
<el-input
|
|
|
+ type="number"
|
|
|
v-model="formData.connectedEntities"
|
|
|
placeholder="请输入预计项目毛利率(%)"
|
|
|
clearable
|
|
@@ -95,12 +100,13 @@
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="客户成立时间" prop="registDate">
|
|
|
- <el-input
|
|
|
+ <el-date-picker
|
|
|
v-model="formData.registDate"
|
|
|
+ type="date"
|
|
|
placeholder="请输入客户成立时间"
|
|
|
- clearable
|
|
|
:style="{ width: '100%' }"
|
|
|
- ></el-input>
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
@@ -123,6 +129,7 @@
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="注册资本金(万元)" prop="capital">
|
|
|
<el-input
|
|
|
+ type="number"
|
|
|
v-model="formData.capital"
|
|
|
placeholder="请输入注册资本金(万元)"
|
|
|
clearable
|
|
@@ -144,8 +151,9 @@
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="员工人数" prop="workforce">
|
|
|
<el-input
|
|
|
+ type="number"
|
|
|
v-model="formData.workforce"
|
|
|
- placeholder="请输入员工人数"
|
|
|
+ placeholder="请输入员工人数(单位:人)"
|
|
|
clearable
|
|
|
:style="{ width: '100%' }"
|
|
|
>
|
|
@@ -174,7 +182,7 @@
|
|
|
<el-input
|
|
|
v-model="formData.responsibleDept"
|
|
|
placeholder="请输入申请部门"
|
|
|
- clearable
|
|
|
+ disabled
|
|
|
:style="{ width: '100%' }"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
@@ -240,8 +248,18 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="其他性质" prop="otherNature">
|
|
|
+ <el-col :span="12" v-if="formData.customerNature === '9'">
|
|
|
+ <el-form-item
|
|
|
+ label="其他性质"
|
|
|
+ prop="otherNature"
|
|
|
+ :rules="[
|
|
|
+ {
|
|
|
+ required: formData.customerNature === '9',
|
|
|
+ message: '请输入其他性质',
|
|
|
+ trigger: 'blur',
|
|
|
+ },
|
|
|
+ ]"
|
|
|
+ >
|
|
|
<el-input
|
|
|
v-model="formData.otherNature"
|
|
|
placeholder="请输入其他性质"
|
|
@@ -251,7 +269,17 @@
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="12">
|
|
|
+ <el-col
|
|
|
+ :span="12"
|
|
|
+ v-if="formData.customerType === '4'"
|
|
|
+ :rules="[
|
|
|
+ {
|
|
|
+ required: formData.customerType === '4',
|
|
|
+ message: '请输入其他类型',
|
|
|
+ trigger: 'blur',
|
|
|
+ },
|
|
|
+ ]"
|
|
|
+ >
|
|
|
<el-form-item label="其他类型" prop="otherCategory">
|
|
|
<el-input
|
|
|
v-model="formData.otherCategory"
|
|
@@ -263,7 +291,7 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
- <el-form-item label="相关资料" prop="fileMap" required>
|
|
|
+ <el-form-item label="相关资料" prop="fileMap">
|
|
|
<el-upload
|
|
|
ref="fileMap"
|
|
|
:file-list="fileMapfileList"
|
|
@@ -294,6 +322,7 @@
|
|
|
<div style="width: 94%; margin-left: 65px">
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
+ v-preventReClick
|
|
|
@click="handleAdd"
|
|
|
icon="el-icon-plus"
|
|
|
class="public-margin-b-20"
|
|
@@ -397,6 +426,7 @@
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-edit"
|
|
|
+ v-preventReClick
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
v-hasPermi="['system:file:edit']"
|
|
|
>修改</el-button
|
|
@@ -405,6 +435,7 @@
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-delete"
|
|
|
+ v-preventReClick
|
|
|
@click="handleDelete(scope.row)"
|
|
|
v-hasPermi="['system:file:remove']"
|
|
|
>删除</el-button
|
|
@@ -431,7 +462,7 @@
|
|
|
<el-form
|
|
|
ref="addUserForm"
|
|
|
:model="addUserForm"
|
|
|
- :rules="rules"
|
|
|
+ :rules="UserFormRules"
|
|
|
label-width="120px"
|
|
|
>
|
|
|
<el-row :gutter="30">
|
|
@@ -534,8 +565,10 @@
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
- <el-button @click="cancel">取 消</el-button>
|
|
|
+ <el-button type="primary" v-preventReClick @click="submitAddUserForm"
|
|
|
+ >确 定</el-button
|
|
|
+ >
|
|
|
+ <el-button @click="cancel" v-preventReClick>取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</el-row>
|
|
@@ -611,11 +644,11 @@
|
|
|
:style="{ width: '100%' }"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="dict in dict.type.SUPPLIER_TAXRATE"
|
|
|
- :key='`${dict.value}${dict.label}`'
|
|
|
- :label="dict.label"
|
|
|
- :value="dict.value"
|
|
|
- />
|
|
|
+ v-for="dict in dict.type.SUPPLIER_TAXRATE"
|
|
|
+ :key="`${dict.value}${dict.label}`"
|
|
|
+ :label="dict.label"
|
|
|
+ :value="dict.value"
|
|
|
+ />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -635,9 +668,16 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<div class="public-flex-end public-padded-b-30">
|
|
|
- <!-- <el-button type="primary" @click="last" v-show="active !== 0"> 上一步 </el-button> -->
|
|
|
- <el-button type="primary" @click="next"> 下一步 </el-button>
|
|
|
- <!-- v-show="active !== 2" -->
|
|
|
+ <div v-show="active < 2">
|
|
|
+ <el-button type="primary" @click="last" v-preventReClick v-show="active !== 0">
|
|
|
+ 上一步
|
|
|
+ </el-button>
|
|
|
+ <el-button type="primary" @click="next" v-preventReClick> 下一步 </el-button>
|
|
|
+ </div>
|
|
|
+ <div v-show="active >= 2">
|
|
|
+ <el-button type="primary" @click="submitForm(1)" v-preventReClick>提交</el-button>
|
|
|
+ <el-button type="primary" @click="submitForm(0)" v-preventReClick>暂存</el-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</el-form>
|
|
|
</section>
|
|
@@ -655,12 +695,13 @@ export default {
|
|
|
"CUSTOMER_TRADE", //客户行业
|
|
|
"currency_of_registered_capital", //注册资本金币种
|
|
|
"PROJECT_TYPE", //类型
|
|
|
- "SUPPLIER_TAXRATE"//税率
|
|
|
+ "SUPPLIER_TAXRATE", //税率
|
|
|
],
|
|
|
data() {
|
|
|
return {
|
|
|
active: 0,
|
|
|
formData: {
|
|
|
+ // 客户信息
|
|
|
customerName: undefined,
|
|
|
customerCode: undefined,
|
|
|
dhrmCompanyId: undefined,
|
|
@@ -681,7 +722,18 @@ export default {
|
|
|
status: undefined,
|
|
|
fileMap: null,
|
|
|
mark: undefined,
|
|
|
- currency: undefined,
|
|
|
+ otherNature: null,
|
|
|
+ otherCategory: null,
|
|
|
+ // 账户信息
|
|
|
+ accountName: null,
|
|
|
+ companyTaxNum: null,
|
|
|
+ bankOfDeposit: null,
|
|
|
+ bankAccount: null,
|
|
|
+ compAddress: null,
|
|
|
+ companyPhone: null,
|
|
|
+ taxpayer: null,
|
|
|
+ customerTaxrate: null,
|
|
|
+ imageFile: null,
|
|
|
},
|
|
|
rules: {
|
|
|
customerName: [
|
|
@@ -691,13 +743,6 @@ export default {
|
|
|
trigger: "blur",
|
|
|
},
|
|
|
],
|
|
|
- customerCode: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: "请输入客户编号",
|
|
|
- trigger: "blur",
|
|
|
- },
|
|
|
- ],
|
|
|
dhrmCompanyId: [
|
|
|
{
|
|
|
required: true,
|
|
@@ -705,15 +750,9 @@ export default {
|
|
|
trigger: "blur",
|
|
|
},
|
|
|
],
|
|
|
- website: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: "请输入网址",
|
|
|
- trigger: "blur",
|
|
|
- },
|
|
|
- ],
|
|
|
stockCode: [
|
|
|
{
|
|
|
+ // pattern: /^[0-9]*$/,
|
|
|
required: true,
|
|
|
message: "请输入账期(月)",
|
|
|
trigger: "blur",
|
|
@@ -824,60 +863,50 @@ export default {
|
|
|
trigger: "blur",
|
|
|
},
|
|
|
],
|
|
|
+ fileMap: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "请上传相关资料",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ UserFormRules: {
|
|
|
+ name: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "请输入客户联系人",
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ phone: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "请输入客户客户手机",
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ pattern: /^1[3456789]\d{9}$/,
|
|
|
+ message: "请输入正确的手机号",
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ department: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "请输入客户所属部门",
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ officeAddress: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "请输入客户办公地址",
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
imageFileAction: "https://jsonplaceholder.typicode.com/posts/",
|
|
|
fileMapfileList: [],
|
|
|
-
|
|
|
- tradeOptions: [
|
|
|
- {
|
|
|
- label: "选项一",
|
|
|
- value: 1,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "选项二",
|
|
|
- value: 2,
|
|
|
- },
|
|
|
- ],
|
|
|
- responsibleDeptOptions: [
|
|
|
- {
|
|
|
- label: "选项一",
|
|
|
- value: 1,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "选项二",
|
|
|
- value: 2,
|
|
|
- },
|
|
|
- ],
|
|
|
- customerNatureOptions: [
|
|
|
- {
|
|
|
- label: "选项一",
|
|
|
- value: 1,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "选项二",
|
|
|
- value: 2,
|
|
|
- },
|
|
|
- ],
|
|
|
- customerTypeOptions: [
|
|
|
- {
|
|
|
- label: "选项一",
|
|
|
- value: 1,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "选项二",
|
|
|
- value: 2,
|
|
|
- },
|
|
|
- ],
|
|
|
- statusOptions: [
|
|
|
- {
|
|
|
- label: "选项一",
|
|
|
- value: 1,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "选项二",
|
|
|
- value: 2,
|
|
|
- },
|
|
|
- ],
|
|
|
imageFilefileList: [],
|
|
|
// 添加客户信息
|
|
|
// 选中数组
|
|
@@ -956,7 +985,6 @@ export default {
|
|
|
};
|
|
|
this.resetForm("addUserForm");
|
|
|
},
|
|
|
- submitForm() {},
|
|
|
getList() {},
|
|
|
// 取消按钮
|
|
|
cancel() {
|
|
@@ -973,17 +1001,29 @@ export default {
|
|
|
if (this.active-- <= 0) this.active = 0;
|
|
|
},
|
|
|
next() {
|
|
|
- this.$refs["elForm"].validate((valid) => {
|
|
|
- if (valid) {
|
|
|
- alert("submit!");
|
|
|
- if (this.active++ >= 2) this.active = 0;
|
|
|
- } else {
|
|
|
- console.log("error submit!!");
|
|
|
- return false;
|
|
|
- }
|
|
|
+ this.active++;
|
|
|
+ // this.$refs["elForm"].validate((valid) => {
|
|
|
+ // if (valid) {
|
|
|
+ // alert("submit!");
|
|
|
+ // if (this.active++ >= 2) this.active = 0;
|
|
|
+ // } else {
|
|
|
+ // console.log("error submit!!");
|
|
|
+ // return false;
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ },
|
|
|
+ // 新增客户联系人
|
|
|
+ submitAddUserForm() {
|
|
|
+ let that = this;
|
|
|
+ this.$refs["addUserForm"].validate((valid) => {
|
|
|
+ if (!valid) return;
|
|
|
+ // 提交表单
|
|
|
+ that.myUserList.push(that.addUserForm);
|
|
|
+ that.cancel();
|
|
|
});
|
|
|
},
|
|
|
- submitForm() {
|
|
|
+ submitForm(type) {
|
|
|
+ // type=0 暂存 type=1提交
|
|
|
this.$refs["elForm"].validate((valid) => {
|
|
|
if (!valid) return;
|
|
|
// TODO 提交表单
|