Commit 67935d71 authored by 全洪江's avatar 全洪江

客户主数据主页和tab页面修改

parent ef6d89c1
......@@ -133,7 +133,7 @@ export default {
name: 'Account',
dicts: ['sys_yes_no'],
props: {
clientId: {type: Number | undefined, default: undefined},
clientCode: {type: String | undefined, default: undefined},
},
data() {
return {
......@@ -159,7 +159,7 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
clientId: this.clientId, bank: null, bankAccount: null, accountName: null, enableFlag: null
clientCode: this.clientCode, bank: null, bankAccount: null, accountName: null, enableFlag: null
},
// 表单参数
form: {},
......@@ -172,7 +172,7 @@ export default {
getList() {
this.accountList = []
this.total = 0
if (!this.queryParams.clientId) return
if (!this.queryParams.clientCode) return
this.loading = true
pageAccount(this.queryParams).then(response => {
this.accountList = response.data.records
......@@ -189,7 +189,7 @@ export default {
reset() {
this.form = {
id: null,
clientId: this.clientId,
clientCode: this.clientCode,
bank: null,
bankAccount: null,
accountName: null,
......@@ -235,7 +235,7 @@ export default {
},
/** 提交按钮 */
submitForm() {
if (!this.form.clientId) return this.$message.error("请先创建客户")
if (!this.form.clientCode) return this.$message.error("请先创建客户")
this.$refs['form'].validate(valid => {
if (valid) {
if (this.form.id != null) {
......@@ -246,7 +246,7 @@ export default {
})
} else {
addAccount(this.form).then(response => {
this.form.clientId = this.clientId
this.form.clientCode = this.clientCode
this.$modal.msgSuccess('新增成功')
this.open = false
this.getList()
......@@ -273,8 +273,8 @@ export default {
}, `account_${new Date().getTime()}.xlsx`)
},
init(form) {
if (!form.clientId) return
this.queryParams.clientId = form.clientId
if (!form.clientCode) return
this.queryParams.clientCode = form.clientCode
this.getList()
}
}
......
......@@ -137,7 +137,7 @@ import {listBrandByCondition} from '@/api/mes/md/brand'
export default {
props: {
clientId: {type: Number | undefined, default: undefined},
clientCode: {type: String | undefined, default: undefined},
},
data() {
return {
......@@ -174,7 +174,7 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
clientId: null,
clientCode: null,
},
// 表单参数
form: {},
......@@ -203,7 +203,7 @@ export default {
/** 查询客户联系人列表 */
getList() {
this.loading = true
this.queryParams.clientId = this.clientId
this.queryParams.clientCode = this.clientCode
listContact(this.queryParams).then(response => {
console.log(response, 111)
this.contactList = response.rows
......@@ -219,7 +219,7 @@ export default {
reset() {
this.form = {
id: null,
clientId: this.clientId,
clientCode: this.clientCode,
brandName: null,
position: null,
......@@ -279,7 +279,7 @@ export default {
this.getList()
})
} else {
this.form.clientId = this.clientId
this.form.clientCode = this.clientCode
addContact(this.form).then(response => {
this.$modal.msgSuccess('新增成功')
this.open = false
......@@ -307,8 +307,8 @@ export default {
}, `contact_${new Date().getTime()}.xlsx`)
},
init(form) {
if (!form.clientId) return
this.queryParams.clientId = form.clientId
if (!form.clientCode) return
this.queryParams.clientCode = form.clientCode
this.getList()
},
/** 远程搜索 */
......
......@@ -92,7 +92,7 @@ import { listClient } from '@/api/mes/md/client'
export default {
name: "Relation",
props: {
clientId: {type: Number | undefined, default: undefined},
clientCode: {type: String | undefined, default: undefined},
},
data() {
return {
......@@ -118,8 +118,8 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
clientId: null,
relatedClientId: null,
clientCode: null,
relatedClientCode: null,
},
// 表单参数
form: {},
......@@ -136,7 +136,7 @@ export default {
/** 查询客户付款信息关联列表 */
getList() {
this.loading = true;
this.queryParams.clientId = this.clientId
this.queryParams.clientCode = this.clientCode
listRelation(this.queryParams).then(response => {
this.relationList = response.rows;
this.total = response.total;
......@@ -152,8 +152,8 @@ export default {
reset() {
this.form = {
id: null,
clientId: this.clientId,
relatedClientId: null,
clientCode: this.clientCode,
relatedClientCode: null,
createBy: null,
createTime: null,
updateBy: null,
......@@ -204,7 +204,7 @@ export default {
this.getList();
});
} else {
this.form.clientId = this.clientId
this.form.clientCode = this.clientCode
addRelation(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
......@@ -236,8 +236,8 @@ export default {
listClient({ clientName: key, pageNum: 1, pageSize: 100 }).then(res => this.clientList = res.rows)
},
init(form) {
if (!form.clientId) return
this.queryParams.clientId = form.clientId
if (!form.clientCode) return
this.queryParams.clientCode = form.clientCode
this.getList()
}
}
......
......@@ -108,7 +108,7 @@ export default {
name: 'Email',
dicts: ['sys_yes_no'],
props: {
clientId: {type: Number | undefined, default: undefined},
clientCode: {type: String | undefined, default: undefined},
},
data() {
return {
......@@ -134,7 +134,7 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
clientId: null,
clientCode: null,
email: null, contact: null, enableFlag: null
},
// 表单参数
......@@ -157,7 +157,7 @@ export default {
/** 查询催货款通知邮箱列表 */
getList() {
this.loading = true
this.queryParams.clientId = this.clientId
this.queryParams.clientCode = this.clientCode
listEmail(this.queryParams).then(response => {
this.emailList = response.rows
this.total = response.total
......@@ -173,7 +173,7 @@ export default {
reset() {
this.form = {
id: null,
clientId: this.clientId,
clientCode: this.clientCode,
email: null,
contact: null,
enableFlag: null,
......@@ -227,7 +227,7 @@ export default {
this.getList()
})
} else {
this.form.clientId = this.clientId
this.form.clientCode = this.clientCode
addEmail(this.form).then(response => {
this.$modal.msgSuccess('新增成功')
this.open = false
......@@ -255,8 +255,8 @@ export default {
}, `email_${new Date().getTime()}.xlsx`)
},
init(form) {
if (!form.clientId) return
this.queryParams.clientId = form.clientId
if (!form.clientCode) return
this.queryParams.clientCode = form.clientCode
this.getList()
}
}
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment