Commit 82586dbc authored by 黄卓's avatar 黄卓

客户联系人区号

parent 1d0c04e5
import request from '@/utils/request'
// 创建国家区号
export function createCountry(data) {
return request({
url: '/ecw/country/create',
method: 'post',
data: data
})
}
// 更新国家区号
export function updateCountry(data) {
return request({
url: '/ecw/country/update',
method: 'put',
data: data
})
}
// 删除国家区号
export function deleteCountry(id) {
return request({
url: '/ecw/country/delete?id=' + id,
method: 'delete'
})
}
// 获得国家区号
export function getCountry(id) {
return request({
url: '/ecw/country/get?id=' + id,
method: 'get'
})
}
// 获得所有国家区号
export function getCountryListAll() {
return request({
url: '/ecw/country/list-all',
method: 'get'
})
}
// 获得国家区号分页
export function getCountryPage(query) {
return request({
url: '/ecw/country/page',
method: 'get',
params: query
})
}
// 导出国家区号 Excel
export function exportCountryExcel(query) {
return request({
url: '/ecw/country/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}
...@@ -243,9 +243,9 @@ ...@@ -243,9 +243,9 @@
区号 <span style="color: #ff0000">*</span> 区号 <span style="color: #ff0000">*</span>
</template> </template>
<template v-slot="{row}"> <template v-slot="{row}">
<el-select v-model="row.areaCode" placeholder="请选择区号"> <el-select v-model="row.areaCode" placeholder="请选择区号" filterable>
<el-option v-for="dict in getDictDatas(DICT_TYPE.AREA_CODE)" <el-option v-for="(item, index) in countryList"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" /> :key="index" :label="item.nameShort + item.nameZh + '(' + item.tel + ')'" :value="item.tel" />
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
...@@ -381,6 +381,7 @@ import {getCustomerSelect} from "@/api/ecw/customer" ...@@ -381,6 +381,7 @@ import {getCustomerSelect} from "@/api/ecw/customer"
import {listServiceUser} from "@/api/system/user" import {listServiceUser} from "@/api/system/user"
import {getZhongPaoPage} from '@/api/ecw/zhongPao' import {getZhongPaoPage} from '@/api/ecw/zhongPao'
import { getCustomerContactsListByCustomer } from '@/api/ecw/customerContacts' import { getCustomerContactsListByCustomer } from '@/api/ecw/customerContacts'
import { getCountryListAll } from '@/api/ecw/country'
export default { export default {
name: "edit", name: "edit",
...@@ -422,6 +423,9 @@ export default { ...@@ -422,6 +423,9 @@ export default {
listServiceUser().then(r => { listServiceUser().then(r => {
this.serviceUserList = r.data this.serviceUserList = r.data
}) })
getCountryListAll().then(r => {
this.countryList = r.data
})
this.getZhongPao() this.getZhongPao()
}, },
...@@ -456,6 +460,7 @@ export default { ...@@ -456,6 +460,7 @@ export default {
importCityList: [], // 进口地址 importCityList: [], // 进口地址
customerSelect: [], customerSelect: [],
serviceUserList: [], serviceUserList: [],
countryList: [],
zhongLines: [], // 重货线路 zhongLines: [], // 重货线路
paoLines: [], // 泡货线路 paoLines: [], // 泡货线路
...@@ -483,7 +488,7 @@ export default { ...@@ -483,7 +488,7 @@ export default {
updateCustomer(this.form).then(response => { updateCustomer(this.form).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); // this.getList();
}); });
return; return;
} }
...@@ -491,7 +496,7 @@ export default { ...@@ -491,7 +496,7 @@ export default {
createCustomer(this.form).then(response => { createCustomer(this.form).then(response => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); // this.getList();
}); });
}); });
}, },
......
...@@ -68,6 +68,9 @@ ...@@ -68,6 +68,9 @@
prop="phoneNew" prop="phoneNew"
label="联系方式" label="联系方式"
> >
<template v-slot="{row}">
{{ row.areaCode + row.phoneNew }}
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="username" prop="username"
......
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