Commit 1d0c04e5 authored by 黄卓's avatar 黄卓

customerId类型问题

parent 01fef0b3
...@@ -134,7 +134,7 @@ export default { ...@@ -134,7 +134,7 @@ export default {
*/ */
name: "CustomerFollow", name: "CustomerFollow",
props: { props: {
customerId: String customerId: Number
}, },
data() { data() {
return { return {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<h2>查看</h2> <h2>查看</h2>
<div> <div>
<el-button type="primary" size="small">添加优惠</el-button> <el-button type="primary" size="small">添加优惠</el-button>
<el-button type="primary" size="small" @click="$router.push('/customer/edit/' + customerId)">编辑</el-button> <el-button type="primary" size="small" @click="$router.push('/customer/edit/' + id)">编辑</el-button>
<el-button type="primary" size="small">报价</el-button> <el-button type="primary" size="small">报价</el-button>
<el-button type="primary" size="small" @click="$refs['customerFollow'].customerFollow.dialogVisible = true">跟进</el-button> <el-button type="primary" size="small" @click="$refs['customerFollow'].customerFollow.dialogVisible = true">跟进</el-button>
<el-button type="primary" size="small" @click="$refs['customerComplaint'].handleAdd()">客诉</el-button> <el-button type="primary" size="small" @click="$refs['customerComplaint'].handleAdd()">客诉</el-button>
...@@ -144,10 +144,10 @@ ...@@ -144,10 +144,10 @@
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="跟进"> <el-tab-pane label="跟进">
<customer-follow ref="customerFollow" :customer-id="customerId"></customer-follow> <customer-follow ref="customerFollow" :customer-id="id"></customer-follow>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="客户投诉"> <el-tab-pane label="客户投诉">
<customer-complaint ref="customerComplaint" :customer-id="customerId" hidden-search></customer-complaint> <customer-complaint ref="customerComplaint" :customer-id="id" hidden-search></customer-complaint>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="账单"> <el-tab-pane label="账单">
...@@ -197,10 +197,10 @@ export default { ...@@ -197,10 +197,10 @@ export default {
getNodeList().then(r => { getNodeList().then(r => {
this.nodeList = r.data this.nodeList = r.data
}) })
getCustomer(this.customerId).then(response => { getCustomer(this.id).then(response => {
this.customer = { ...this.customer, ...response.data } this.customer = { ...this.customer, ...response.data }
getCustomerContactsListByCustomer({customerId: this.customerId}).then(r => { getCustomerContactsListByCustomer({customerId: this.id}).then(r => {
this.customerContacts = r.data this.customerContacts = r.data
}) })
}) })
...@@ -278,6 +278,9 @@ export default { ...@@ -278,6 +278,9 @@ export default {
}, },
customerService() { customerService() {
return this.serviceUserList.find(e => e.id === this.customer.customerService)?.nickname || '' return this.serviceUserList.find(e => e.id === this.customer.customerService)?.nickname || ''
},
id() {
return this.customerId ? parseInt(this.customerId) : undefined
} }
} }
} }
......
...@@ -149,7 +149,7 @@ export default { ...@@ -149,7 +149,7 @@ export default {
* 作为组件时要传入 customerId,用于限制范围和隐藏搜索筛选 * 作为组件时要传入 customerId,用于限制范围和隐藏搜索筛选
*/ */
props: { props: {
customerId: String customerId: Number
}, },
components: { components: {
CustomerFollow CustomerFollow
......
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