|
@@ -5,20 +5,11 @@
|
|
<el-row>
|
|
<el-row>
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
<div class="top">
|
|
<div class="top">
|
|
- <el-input placeholder="用户名" class="input-demo" v-model="userName"></el-input>
|
|
|
|
- <el-input placeholder="联系电话" class="input-demo" v-model="phone"></el-input>
|
|
|
|
- <el-input placeholder="税号" class="input-demo" v-model="dutyParagraph"></el-input>
|
|
|
|
- </div>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
-
|
|
|
|
- <el-row>
|
|
|
|
- <el-col :span="24">
|
|
|
|
- <div class="top">
|
|
|
|
- <el-input placeholder="发票抬头" class="input-demo" v-model="company"></el-input>
|
|
|
|
|
|
+ <el-input placeholder="联系电话" class="input-demo" v-model="companyLeaderPhone"></el-input>
|
|
|
|
+ <el-input placeholder="税号" class="input-demo" v-model="companyReferencenum"></el-input>
|
|
|
|
+ <el-input placeholder="发票抬头" class="input-demo" v-model="companyName"></el-input>
|
|
<el-button type="success" style="margin-left: 1%;" @click="addList = true;">新增</el-button>
|
|
<el-button type="success" style="margin-left: 1%;" @click="addList = true;">新增</el-button>
|
|
<el-button type="success" style="margin-left: 1%;" @click="queryLook">查询</el-button>
|
|
<el-button type="success" style="margin-left: 1%;" @click="queryLook">查询</el-button>
|
|
- <!-- <el-button type="info" style="margin-left: 1%;">重置</el-button> -->
|
|
|
|
</div>
|
|
</div>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
@@ -36,46 +27,46 @@
|
|
tooltip-effect="dark">
|
|
tooltip-effect="dark">
|
|
<el-table-column
|
|
<el-table-column
|
|
label="用户名"
|
|
label="用户名"
|
|
- prop="userName"
|
|
|
|
|
|
+ prop="customerName"
|
|
show-overflow-tooltip>
|
|
show-overflow-tooltip>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
label="用户手机号"
|
|
label="用户手机号"
|
|
- prop="userPhone"
|
|
|
|
|
|
+ prop="companyLeaderPhone"
|
|
show-overflow-tooltip>
|
|
show-overflow-tooltip>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="userCompany"
|
|
|
|
|
|
+ prop="companyName"
|
|
label="用户所在公司"
|
|
label="用户所在公司"
|
|
show-overflow-tooltip>
|
|
show-overflow-tooltip>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="buyerTel"
|
|
|
|
|
|
+ prop="companyPhone"
|
|
label="联系电话"
|
|
label="联系电话"
|
|
show-overflow-tooltip>
|
|
show-overflow-tooltip>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="dutyParagraph"
|
|
|
|
|
|
+ prop="companyReferencenum"
|
|
label="税号"
|
|
label="税号"
|
|
show-overflow-tooltip>
|
|
show-overflow-tooltip>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="company"
|
|
|
|
|
|
+ prop="companyName"
|
|
label="发票抬头"
|
|
label="发票抬头"
|
|
show-overflow-tooltip>
|
|
show-overflow-tooltip>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="bankNumber"
|
|
|
|
|
|
+ prop="companyOpenbankAcc"
|
|
label="银行账号"
|
|
label="银行账号"
|
|
show-overflow-tooltip>
|
|
show-overflow-tooltip>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="bankAddress"
|
|
|
|
|
|
+ prop="companyOpenbank"
|
|
label="开户行"
|
|
label="开户行"
|
|
show-overflow-tooltip>
|
|
show-overflow-tooltip>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="address"
|
|
|
|
|
|
+ prop="companyAdress"
|
|
label="公司地址"
|
|
label="公司地址"
|
|
show-overflow-tooltip>
|
|
show-overflow-tooltip>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -110,39 +101,39 @@
|
|
ref="ruleForm"
|
|
ref="ruleForm"
|
|
:model="formUserList">
|
|
:model="formUserList">
|
|
<el-form-item label="用户名">
|
|
<el-form-item label="用户名">
|
|
- <el-input v-model="formUserList.userName" :disabled="true" auto-complete="off" placeholder="请输入用户名"></el-input>
|
|
|
|
|
|
+ <el-input v-model="formUserList.customerName" :disabled="true" auto-complete="off" placeholder="请输入用户名"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="税号" prop="dutyParagraph">
|
|
|
|
- <el-input v-model="formUserList.dutyParagraph" auto-complete="off" placeholder="税号"></el-input>
|
|
|
|
|
|
+ <el-form-item label="税号" prop="companyReferencenum">
|
|
|
|
+ <el-input v-model="formUserList.companyReferencenum" auto-complete="off" placeholder="税号"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="发票抬头" prop="company">
|
|
|
|
- <el-input v-model="formUserList.company" auto-complete="off" placeholder="发票抬头"></el-input>
|
|
|
|
|
|
+ <el-form-item label="发票抬头" prop="companyName">
|
|
|
|
+ <el-input v-model="formUserList.companyName" auto-complete="off" placeholder="发票抬头"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="开户行" prop="bankAddress">
|
|
|
|
- <el-input v-model="formUserList.bankAddress" auto-complete="off" placeholder="开户行"></el-input>
|
|
|
|
|
|
+ <el-form-item label="开户行" prop="companyOpenbank">
|
|
|
|
+ <el-input v-model="formUserList.companyOpenbank" auto-complete="off" placeholder="开户行"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="银行账号" prop="bankNumber">
|
|
|
|
- <el-input v-model="formUserList.bankNumber" auto-complete="off" placeholder="银行账号"></el-input>
|
|
|
|
|
|
+ <el-form-item label="银行账号" prop="companyOpenbankAcc">
|
|
|
|
+ <el-input v-model="formUserList.companyOpenbankAcc" auto-complete="off" placeholder="银行账号"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="购方电话" prop="buyerTel">
|
|
|
|
- <el-input v-model="formUserList.buyerTel" auto-complete="off" placeholder="购方电话"></el-input>
|
|
|
|
|
|
+ <el-form-item label="购方电话" prop="companyPhone">
|
|
|
|
+ <el-input v-model="formUserList.companyPhone" auto-complete="off" placeholder="购方电话"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="公司地址" prop="address">
|
|
|
|
- <el-input v-model="formUserList.address" auto-complete="off" placeholder="公司地址"></el-input>
|
|
|
|
|
|
+ <el-form-item label="公司地址" prop="companyAdress">
|
|
|
|
+ <el-input v-model="formUserList.companyAdress" auto-complete="off" placeholder="公司地址"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="联系人" prop="contact">
|
|
|
|
- <el-input v-model="formUserList.contact" auto-complete="off" placeholder="联系人"></el-input>
|
|
|
|
|
|
+ <el-form-item label="联系人" prop="companyLeader">
|
|
|
|
+ <el-input v-model="formUserList.companyLeader" auto-complete="off" placeholder="联系人"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="联系电话" prop="contactTel">
|
|
|
|
- <el-input v-model="formUserList.contactTel" auto-complete="off" placeholder="联系电话"></el-input>
|
|
|
|
|
|
+ <el-form-item label="联系电话" prop="companyLeaderPhone">
|
|
|
|
+ <el-input v-model="formUserList.companyLeaderPhone" auto-complete="off" placeholder="联系电话"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="经营范围" prop="operatingRangeType">
|
|
<el-form-item label="经营范围" prop="operatingRangeType">
|
|
@@ -174,33 +165,33 @@
|
|
return {
|
|
return {
|
|
loading: false,
|
|
loading: false,
|
|
rules: {
|
|
rules: {
|
|
- bankNumber: [
|
|
|
|
|
|
+ companyOpenbankAcc: [
|
|
{ required: true, message: '请输入银行账号', trigger: 'blur' },
|
|
{ required: true, message: '请输入银行账号', trigger: 'blur' },
|
|
{ min: 9, max: 30, message: '长度在 9 到 30 个字符', trigger: 'blur' }
|
|
{ min: 9, max: 30, message: '长度在 9 到 30 个字符', trigger: 'blur' }
|
|
],
|
|
],
|
|
- address: [
|
|
|
|
|
|
+ companyAdress: [
|
|
{ required: true, message: '请输入公司地址', trigger: 'blur' },
|
|
{ required: true, message: '请输入公司地址', trigger: 'blur' },
|
|
],
|
|
],
|
|
- bankAddress : [
|
|
|
|
|
|
+ companyOpenbank : [
|
|
{ required: true, message: '请输入开户行', trigger: 'blur' },
|
|
{ required: true, message: '请输入开户行', trigger: 'blur' },
|
|
],
|
|
],
|
|
- contactTel: [
|
|
|
|
|
|
+ companyLeaderPhone: [
|
|
{ required: true, message: '请输入正确联系方式', trigger: 'blur' },
|
|
{ required: true, message: '请输入正确联系方式', trigger: 'blur' },
|
|
],
|
|
],
|
|
- dutyParagraph:[
|
|
|
|
|
|
+ companyReferencenum:[
|
|
{ required: true, message: '请输入税号', trigger: 'blur' },
|
|
{ required: true, message: '请输入税号', trigger: 'blur' },
|
|
{ min: 15, max: 30, message: '长度在 15 到 30 个字符', trigger: 'blur' }
|
|
{ min: 15, max: 30, message: '长度在 15 到 30 个字符', trigger: 'blur' }
|
|
],
|
|
],
|
|
- company: [
|
|
|
|
|
|
+ companyName: [
|
|
{ required: true, message: '请输入发票抬头', trigger: 'blur' },
|
|
{ required: true, message: '请输入发票抬头', trigger: 'blur' },
|
|
],
|
|
],
|
|
operatingRangeType: [
|
|
operatingRangeType: [
|
|
{ required: true, message: '请选择经营范围', trigger: 'change' }
|
|
{ required: true, message: '请选择经营范围', trigger: 'change' }
|
|
],
|
|
],
|
|
- contact: [
|
|
|
|
|
|
+ companyLeader: [
|
|
{required: true, message: '请输入联系人', trigger: 'blur'},
|
|
{required: true, message: '请输入联系人', trigger: 'blur'},
|
|
],
|
|
],
|
|
- buyerTel: [
|
|
|
|
|
|
+ companyPhone: [
|
|
{required: true, message: '请输入正确的购方电话', trigger: 'blur'},
|
|
{required: true, message: '请输入正确的购方电话', trigger: 'blur'},
|
|
],
|
|
],
|
|
},
|
|
},
|
|
@@ -228,24 +219,23 @@
|
|
pagesize: 8,
|
|
pagesize: 8,
|
|
total: 0,
|
|
total: 0,
|
|
usertable: [],
|
|
usertable: [],
|
|
- userName: "",
|
|
|
|
- phone: "",
|
|
|
|
- dutyParagraph: "",
|
|
|
|
- company: "",
|
|
|
|
|
|
+ customerName: "",
|
|
|
|
+ companyLeaderPhone: "",
|
|
|
|
+ companyReferencenum: "",
|
|
|
|
+ companyName: "",
|
|
formUserList: {
|
|
formUserList: {
|
|
- "userName":"",
|
|
|
|
- "phone": "",
|
|
|
|
- "dutyParagraph":"",
|
|
|
|
- "company":"",
|
|
|
|
- "bankNumber":"",
|
|
|
|
- "bankAddress":"",
|
|
|
|
- "address":"",
|
|
|
|
|
|
+ "customerName":"",
|
|
|
|
+ "companyReferencenum":"",
|
|
|
|
+ "companyName":"",
|
|
|
|
+ "companyOpenbankAcc":"",
|
|
|
|
+ "companyOpenbank":"",
|
|
|
|
+ "companyAdress":"",
|
|
"userId":"",
|
|
"userId":"",
|
|
"operatingRangeType": "",
|
|
"operatingRangeType": "",
|
|
- "roleId": "",
|
|
|
|
- "contact": "",
|
|
|
|
- "contactTel": "",
|
|
|
|
- "buyerTel": ""
|
|
|
|
|
|
+ "bussinessType": "",
|
|
|
|
+ "companyLeader": "",
|
|
|
|
+ "companyLeaderPhone": "",
|
|
|
|
+ "companyPhone": ""
|
|
},
|
|
},
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -255,14 +245,16 @@
|
|
methods: {
|
|
methods: {
|
|
// 列表展示
|
|
// 列表展示
|
|
async loadData() {
|
|
async loadData() {
|
|
- this.formUserList.userName = sessionStorage.getItem('userName');
|
|
|
|
|
|
+ this.customerName = sessionStorage.getItem('userName');
|
|
|
|
+ this.formUserList.customerName = sessionStorage.getItem('userName');
|
|
this.formUserList.userId = sessionStorage.getItem('userId');
|
|
this.formUserList.userId = sessionStorage.getItem('userId');
|
|
- this.formUserList.roleId = sessionStorage.getItem('roleId');
|
|
|
|
- if(this.formUserList.roleId == 1) {
|
|
|
|
|
|
+ this.formUserList.bussinessType = sessionStorage.getItem('roleId');
|
|
|
|
+ debugger
|
|
|
|
+ if(this.formUserList.bussinessType == 1) {
|
|
const formData = new FormData();
|
|
const formData = new FormData();
|
|
formData.append('current', this.current);
|
|
formData.append('current', this.current);
|
|
formData.append('size', this.pagesize);
|
|
formData.append('size', this.pagesize);
|
|
- const response = await this.$http.post(`invoice/list`, formData);
|
|
|
|
|
|
+ const response = await this.$http.post(`customer/customeRecQueryListByPage`, formData);
|
|
if (response.data.code === 0) {
|
|
if (response.data.code === 0) {
|
|
this.loading = false;
|
|
this.loading = false;
|
|
this.usertable = response.data.data.records;
|
|
this.usertable = response.data.data.records;
|
|
@@ -272,8 +264,8 @@
|
|
const formData = new FormData();
|
|
const formData = new FormData();
|
|
formData.append('current', this.current);
|
|
formData.append('current', this.current);
|
|
formData.append('size', this.pagesize);
|
|
formData.append('size', this.pagesize);
|
|
- formData.append('userId', this.formUserList.userId);
|
|
|
|
- const response = await this.$http.post(`invoice/list`, formData);
|
|
|
|
|
|
+ formData.append('customerName', this.formUserList.customerName);
|
|
|
|
+ const response = await this.$http.post(`customer/customeRecQueryListByPage`, formData);
|
|
if (response.data.code === 0) {
|
|
if (response.data.code === 0) {
|
|
this.loading = false;
|
|
this.loading = false;
|
|
this.usertable = response.data.data.records;
|
|
this.usertable = response.data.data.records;
|
|
@@ -283,15 +275,15 @@
|
|
},
|
|
},
|
|
|
|
|
|
async queryLook(){
|
|
async queryLook(){
|
|
- if(this.formUserList.roleId == 1) {
|
|
|
|
|
|
+ if(this.formUserList.bussinessType == 1) {
|
|
const formData = new FormData();
|
|
const formData = new FormData();
|
|
formData.append('current', this.current);
|
|
formData.append('current', this.current);
|
|
formData.append('size', this.pagesize);
|
|
formData.append('size', this.pagesize);
|
|
- formData.append('userName', this.userName);
|
|
|
|
- formData.append('phone', this.phone);
|
|
|
|
- formData.append('dutyParagraph', this.dutyParagraph);
|
|
|
|
- formData.append('company', this.company);
|
|
|
|
- const response = await this.$http.post(`invoice/list`, formData);
|
|
|
|
|
|
+ formData.append('customerName', this.customerName);
|
|
|
|
+ formData.append('companyLeaderPhone', this.companyLeaderPhone);
|
|
|
|
+ formData.append('companyReferencenum', this.companyReferencenum);
|
|
|
|
+ formData.append('companyName', this.companyName);
|
|
|
|
+ const response = await this.$http.post(`customer/customeRecQueryListByPage`, formData);
|
|
if (response.data.code === 0) {
|
|
if (response.data.code === 0) {
|
|
this.loading = false;
|
|
this.loading = false;
|
|
this.usertable = response.data.data.records;
|
|
this.usertable = response.data.data.records;
|
|
@@ -303,11 +295,11 @@
|
|
formData.append('current', this.current);
|
|
formData.append('current', this.current);
|
|
formData.append('size', this.pagesize);
|
|
formData.append('size', this.pagesize);
|
|
formData.append('userId', this.formUserList.userId);
|
|
formData.append('userId', this.formUserList.userId);
|
|
- formData.append('userName', this.userName);
|
|
|
|
- formData.append('phone', this.phone);
|
|
|
|
- formData.append('dutyParagraph', this.dutyParagraph);
|
|
|
|
- formData.append('company', this.company);
|
|
|
|
- const response = await this.$http.post(`invoice/list`, formData);
|
|
|
|
|
|
+ formData.append('customerName', this.customerName);
|
|
|
|
+ formData.append('companyLeaderPhone', this.companyLeaderPhone);
|
|
|
|
+ formData.append('companyReferencenum', this.companyReferencenum);
|
|
|
|
+ formData.append('companyName', this.companyName);
|
|
|
|
+ const response = await this.$http.post(`customer/customeRecQueryListByPage`, formData);
|
|
if (response.data.code === 0) {
|
|
if (response.data.code === 0) {
|
|
this.loading = false;
|
|
this.loading = false;
|
|
this.usertable = response.data.data.records;
|
|
this.usertable = response.data.data.records;
|
|
@@ -319,7 +311,7 @@
|
|
addData(formName) {
|
|
addData(formName) {
|
|
this.$refs[formName].validate(async (valid) => {
|
|
this.$refs[formName].validate(async (valid) => {
|
|
if(valid) {
|
|
if(valid) {
|
|
- const response = await this.$http.post(`invoice/add`, this.formUserList);
|
|
|
|
|
|
+ const response = await this.$http.post(`customer/customerRecAdd`, this.formUserList);
|
|
if(response.data.code === 0) {
|
|
if(response.data.code === 0) {
|
|
this.loadData();
|
|
this.loadData();
|
|
this.addList = false;
|
|
this.addList = false;
|
|
@@ -348,12 +340,12 @@
|
|
for (var key in this.formUserList) {
|
|
for (var key in this.formUserList) {
|
|
this.formUserList[key] = '';
|
|
this.formUserList[key] = '';
|
|
};
|
|
};
|
|
- this.formUserList.userName = sessionStorage.getItem('userName');
|
|
|
|
|
|
+ this.formUserList.customerName = sessionStorage.getItem('userName');
|
|
},
|
|
},
|
|
// 分页方法
|
|
// 分页方法
|
|
handleSizeChange(val) {
|
|
handleSizeChange(val) {
|
|
this.pagesize = val;
|
|
this.pagesize = val;
|
|
- if(this.userName !== '' || this.phone !== '' || this.dutyParagraph !== '' || this.company !== '') {
|
|
|
|
|
|
+ if(this.customerName !== '' || this.companyLeaderPhone !== '' || this.companyReferencenum !== '' || this.companyName !== '') {
|
|
this.queryLook();
|
|
this.queryLook();
|
|
}else{
|
|
}else{
|
|
this.loadData();
|
|
this.loadData();
|
|
@@ -362,7 +354,7 @@
|
|
},
|
|
},
|
|
handleCurrentChange(val) {
|
|
handleCurrentChange(val) {
|
|
this.current = val;
|
|
this.current = val;
|
|
- if(this.userName !== '' || this.phone !== '' || this.dutyParagraph !== '' || this.company !== '') {
|
|
|
|
|
|
+ if(this.customerName !== '' || this.companyLeaderPhone !== '' || this.companyReferencenum !== '' || this.companyName !== '') {
|
|
this.queryLook();
|
|
this.queryLook();
|
|
}else{
|
|
}else{
|
|
this.loadData();
|
|
this.loadData();
|