新增客户来源
parent
024c116a5a
commit
21e4683f41
|
@ -23,6 +23,7 @@
|
|||
<el-table :data="tableData" border class="table" ref="multipleTable" header-cell-class-name="table-header">
|
||||
<el-table-column prop="id" label="ID" width="55" align="center"></el-table-column>
|
||||
<el-table-column prop="company" label="公司名"></el-table-column>
|
||||
<el-table-column prop="source_name" label="来源"></el-table-column>
|
||||
<el-table-column prop="name" label="联系人姓名"></el-table-column>
|
||||
<el-table-column prop="telephone" label="联系人电话"></el-table-column>
|
||||
<el-table-column prop="wechat" label="微信"></el-table-column>
|
||||
|
@ -53,6 +54,16 @@
|
|||
<el-form-item label="公司名/客户名" prop="company">
|
||||
<el-input v-model="editForm.company"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="来源" prop="source_id">
|
||||
<el-select v-model="editForm.source_id" class="m-2" placeholder="来源" size="small" name="source_id">
|
||||
<el-option
|
||||
v-for="item in sourceListData"
|
||||
:key="item.id"
|
||||
:value="item.id"
|
||||
:label="item.name"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人姓名" prop="name">
|
||||
<el-input v-model="editForm.name"></el-input>
|
||||
</el-form-item>
|
||||
|
@ -77,6 +88,16 @@
|
|||
<el-form-item label="公司名/客户名" prop="company">
|
||||
<el-input v-model="addForm.company"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="来源" prop="source_id">
|
||||
<el-select v-model="addForm.source_id" class="m-2" placeholder="来源" size="small" name="source_id">
|
||||
<el-option
|
||||
v-for="item in sourceListData"
|
||||
:key="item.id"
|
||||
:value="item.id"
|
||||
:label="item.name"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人姓名" prop="name">
|
||||
<el-input v-model="addForm.name"></el-input>
|
||||
</el-form-item>
|
||||
|
@ -103,6 +124,7 @@ import { ElMessage, ElMessageBox } from "element-plus";
|
|||
import { customerData } from "../api/customer";
|
||||
import { customerAdd } from "../api/customerAdd";
|
||||
import { customerEdit } from '../api/customerEdit';
|
||||
import { sourceData } from '../api/source';
|
||||
|
||||
export default {
|
||||
name: "basetable",
|
||||
|
@ -114,6 +136,7 @@ export default {
|
|||
pageSize: 10,
|
||||
});
|
||||
const tableData = ref([]);
|
||||
const sourceListData = ref([]);
|
||||
const pageTotal = ref(0);
|
||||
// 获取表格数据
|
||||
const getData = () => {
|
||||
|
@ -121,6 +144,10 @@ export default {
|
|||
tableData.value = res.data.data;
|
||||
pageTotal.value = res.data.pageTotal || 0;
|
||||
});
|
||||
sourceData({}).then((res) => {
|
||||
console.log(res.data.data)
|
||||
sourceListData.value = res.data.data;
|
||||
});
|
||||
};
|
||||
getData();
|
||||
|
||||
|
@ -153,6 +180,7 @@ export default {
|
|||
const tableEditData = ref(null);
|
||||
const editForm = reactive({
|
||||
company:'',
|
||||
source_id: 0,
|
||||
name:'',
|
||||
telephone:'',
|
||||
wechat:'',
|
||||
|
@ -202,6 +230,7 @@ export default {
|
|||
const addForm = reactive({
|
||||
company:'',
|
||||
name:'',
|
||||
source_id: 0,
|
||||
telephone:'',
|
||||
wechat:'',
|
||||
userid:user.id
|
||||
|
@ -245,6 +274,8 @@ export default {
|
|||
saveEdit,
|
||||
saveAdd,
|
||||
rules,
|
||||
sourceListData
|
||||
//options
|
||||
};
|
||||
},
|
||||
};
|
||||
|
|
|
@ -120,7 +120,7 @@ export default {
|
|||
const tableEditData = ref(null);
|
||||
const editForm = reactive({
|
||||
name : '',
|
||||
id : 0
|
||||
id: 0
|
||||
});
|
||||
let idx = -1;
|
||||
const handleEdit = (index, row) => {
|
||||
|
|
Loading…
Reference in New Issue