Commit 92d641f6 authored by Mac's avatar Mac

1

parent 39b87432
...@@ -136,6 +136,9 @@ export interface AddTeamGroupParams { ...@@ -136,6 +136,9 @@ export interface AddTeamGroupParams {
name: string name: string
tenantId?: number tenantId?: number
} }
export interface Student {
ID: number,
}
export interface AddTeamGroupMemberParams { export interface AddTeamGroupMemberParams {
groupId: number groupId: number
......
<template> <template>
<div class="requestgroup"> <div class="requestgroup">
123
<div>
收快递费老师{{a}}
<div class="row" v-for="(x,y) in addMsg" style="margin-bottom: 8px;">
<q-select outlined v-model="x.Name" :options="filedList" label="客户字段" />
</div>
</div>
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent, ref, onMounted } from 'vue' import { defineComponent, ref,reactive, onMounted } from 'vue'
import { Student } from '@/@types/index'
import customerService from '@/api/customer' import customerService from '@/api/customer'
export default defineComponent({ export default defineComponent({
setup() { setup() {
const filedList = ref([])
let filedList: Array<Student> = reactive([])
const addMsg = ref([]) const addMsg = ref([])
onMounted(() => {//进入页面就调用 onMounted(() => {//进入页面就调用
getCustomerFiledList();//获取客户字段 getCustomerFiledList();//获取客户字段
}) })
const getCustomerFiledList = () => { const getCustomerFiledList = () => {
customerService.getCustomerFiledList({ Enable: 1 }).then((res) => { customerService.getCustomerFiledList({ Enable: 1 }).then((res) => {
let data = res.data.Data let data = res.data.Data
filedList.value = data; console.log(data)
filedList.value.forEach(x=>{// IsCustom 是否自定义字段 1是 2标签 3阶段 filedList = data;
x.IsCustom = 1 filedList.forEach((x:Student) => {// IsCustom 是否自定义字段 1是 2标签 3阶段
}) x.ID=0
let obj = { Id: '客户阶段', Name: '客户阶段', Type: 4 ,IsCustom:3} })
filedList.value.unshift(obj) // let obj = { Id: '客户阶段', Name: '客户阶段', Type: 3, IsCustom: 3 }
let obj2 = { Id: '标签', Name: '标签', Type: 3 ,IsCustom:2} // filedList.value.unshift(obj)
filedList.value.unshift(obj2) // let obj2 = { Id: '标签', Name: '标签', Type: 4, IsCustom: 2 }
addMsg.value.push({ // filedList.value.unshift(obj2)
Name:filedList.value[0].Id, // let type = 1;
Type:filedList.value, // if (filedList.value[0].Type == 4) {//多选
Direction:1, // type = 1;
StartValue:'', // }
EndValue:'', // addMsg.value.push({
IsCustom:2, // Name: filedList.value[0].Id,
}) // Type: type,
// Direction: '',
// StartValue: '',
// EndValue: '',
// IsCustom: filedList.value[0].IsCustom,
// StageId: '',
// LableIds:'',
// })
}) })
} }
...@@ -41,7 +58,8 @@ ...@@ -41,7 +58,8 @@
return { return {
getCustomerFiledList getCustomerFiledList,
} }
} }
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<tr v-if="data && data.length==0"> <tr v-if="data && data.length==0">
<td :colspan="8" align="center">暂无数据</td> <td :colspan="8" align="center">暂无数据</td>
</tr> </tr>
<draggable v-model="data" tag="tbody" item-key="Id" :move="getdata" @update="datadragEnd" :clone="cloneFun"> <draggable v-model="data" tag="tbody" item-key="Id" :move="getdata" @update="datadragEnd" >
<template #item="{ element }"> <template #item="{ element }">
<tr> <tr>
<td><span>{{element.Name}}</span></td> <td><span>{{element.Name}}</span></td>
......
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