Commit cd92516d authored by 沈良进's avatar 沈良进

save'

parent e7f1cdcf
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -20,6 +20,7 @@
"jspdf": "^1.4.1",
"less-loader": "^5.0.0",
"moment": "^2.22.2",
"node-sass": "^4.14.1",
"pinyin": "^2.8.3",
"register-service-worker": "^1.0.0",
"sass-loader": "^8.0.2",
......
......@@ -45,7 +45,9 @@
<!-- 客户字段 -->
<customerField v-if="selectTitle==5"></customerField>
<!-- 标签 -->
<!-- <customerlabel v-if="selectTitle==6"></customerlabel> -->
<customerlabel v-if="selectTitle==6"></customerlabel>
<!-- 线索分配规则 -->
<!-- <clueRule v-if="selectTitle==7"></clueRule> -->
</div>
</template>
<script>
......@@ -54,7 +56,8 @@
import rankConfig from "./rankConfig";
import ManageConfiguration from "./ManageConfiguration";
import customerField from '../../views/customerSet/components/customerField.vue'
// import customerlabel from '../../views/customerSet/components/customerlabel.vue'
import customerlabel from '../../views/customerSet/components/customerlabel.vue'
// import clueRule from '../../views/customerSet/components/clueRule.vue'
export default {
components: {
customerSource,
......@@ -62,7 +65,8 @@ import customerField from '../../views/customerSet/components/customerField.vue'
rankConfig,
ManageConfiguration,
customerField,
// customerlabel
customerlabel,
// clueRule
},
data() {
return {
......@@ -92,6 +96,10 @@ import customerField from '../../views/customerSet/components/customerField.vue'
title: '标签',
id: 6
},
{
title: '线索分配规则',
id: 7
},
]
};
},
......
......@@ -5,7 +5,7 @@ export default function() {
//CRM API
let domainUrl = "";
// domainUrl = "http://192.168.10.46:8500";
domainUrl = "http://192.168.10.128:8098";
domainUrl = "http://192.168.10.226:5003";
// domainUrl = "http://crm.oytour.com"
//domainUrl = "http://localhost:5003";
let locationName = window.location.hostname;
......
<template>
<div style="padding: 0;margin: 0;">
<q-dialog v-model="Isadd" persistent>
<q-card style="width: 700px; max-width: 80vw;" class="addfield">
<q-card-section>
<div class="text-h6">新建/修改字段</div>
</q-card-section>
<q-separator />
<q-card-section class="q-pt-none" style="margin-top: 15px;">
<q-splitter v-model="splitterModel">
<template v-slot:before>
<q-tabs v-model="tab" vertical @click="getdefault">
<q-tab v-for="(x,y) in tabsList" :key='y' :name="x.Id" :label="x.Name"
<el-card style="width: 700px; max-width: 80vw;" class="addfield">
<div class="q-pt-none" style="margin-top: 15px;">
<div>
<template>
<el-tabs v-model="tab" vertical @click="getdefault">
<el-tab v-for="(x,y) in tabsList" :key='y' :name="x.Id" :label="x.Name"
:disable="x.disable" />
</q-tabs>
</el-tabs>
</template>
<template v-slot:after>
<template>
<div style="height: 100%; width: 100%;padding: 16px">
<div class="rightrow" style="margin-top: 0px;">
<div class="leftwidth">字段名称:</div>
<q-input clearable outlined v-model="addMsg.Name" counter maxlength="8" placeholder="请输入字段名称"
<el-input clearable outlined v-model="addMsg.Name" counter maxlength="8" placeholder="请输入字段名称"
:rules="[val => !!val || '请输入字段名称']" dense style="width: 400px;" />
</div>
<div class="rightrow" style="margin-top: 0px;">
<div class="leftwidth">部门选择:</div>
<div>
<q-radio v-model="departmentType" val="1" label="公司字段"
<el-radio v-model="departmentType" val="1" label="公司字段"
@input='addMsg.DeptId=0' />
<q-radio v-model="departmentType" val="2" label="部门字段"
<el-radio v-model="departmentType" val="2" label="部门字段"
@input='addMsg.DeptId=0' />
<div v-if="departmentType==2">
<el-tree :treeData='deptl' :defaultArray="returnString" nodeKey="DeptId" style="width: 300px;"
......@@ -42,17 +36,17 @@
<div class="rightrow" v-if='tab==1'>
<div class="leftwidth">字数限制:</div>
<q-input v-model.number="addMsg.WordNum" outlined dense type="number" :max='50' placeholder="请输入"
<el-input v-model.number="addMsg.WordNum" outlined dense type="number" :max='50' placeholder="请输入"
:min='0' maxlength="8" style="width: 400px" />
</div>
<div class="rightrow" v-if='tab==1'>
<div class="leftwidth">输入类型:</div>
<q-checkbox v-model="addMsg.InputType" v-for="(x,y) in checkboxList" :key='y'
<el-checkbox v-model="addMsg.InputType" v-for="(x,y) in checkboxList" :key='y'
:val="x.Id" :label="x.Name" />
</div>
<div class="rightrow" v-if='tab==2'>
<div class="leftwidth">文字字数:</div>
<q-input v-model.number="addMsg.WordNum" outlined dense type="number" :max='2000' placeholder="请输入"
<el-input v-model.number="addMsg.WordNum" outlined dense type="number" :max='2000' placeholder="请输入"
:min='0' maxlength="2000" style="width: 400px" />
</div>
<div class="rightrow" v-if='tab==3|| tab==4'>
......@@ -62,18 +56,18 @@
<div style="display: flex;margin-bottom: 10px;">
<i class="iconfont icon-drag"
style="font-size: 26px;color: #777;margin-right: 10px;"></i>
<q-input v-model.number="element.Name" outlined dense clearable placeholder="请输入"
<el-input v-model.number="element.Name" outlined dense clearable placeholder="请输入"
style="width: 250px" />
<div
style="display: flex;align-items: center;margin-top: 8px;margin-left: 10px;height: 26px;">
<div style="width: 26px;height: 26px;margin-right: 10px;"
v-if="addMsg.OptionsList.length>1">
<q-btn round size="xs" color="deep-orange" icon="delete"
<el-btn round size="xs" color="deep-orange" icon="delete"
@click="addMsg.OptionsList.splice(index,1)" />
</div>
<div style="width: 26px;height: 26px;"
v-if="addMsg.OptionsList.length==index+1">
<q-btn round size="xs" color="primary" icon="add"
<el-btn round size="xs" color="primary" icon="add"
@click="addMsg.OptionsList.push({Id:0,Name:''})" />
</div>
</div>
......@@ -84,16 +78,16 @@
</div>
<div class="rightrow" v-if='tab==7'>
<div class="leftwidth">小数位数:</div>
<q-select filled stack-label option-value="Id" option-label="Id"
<el-select filled stack-label option-value="Id" option-label="Id"
style="width: 300px;" v-model="addMsg.Digits" ref="Id" :options="decimalslist"
dense map-options />
</div>
<div class="rightrow">
<div class="leftwidth">属性设置:</div>
<div class="q-gutter-sm">
<q-toggle v-model="addMsg.Required" label="必填项" :true-value="1"
:false-value="2" />
<q-toggle v-model="addMsg.Enable" label="启用" :true-value="1" :false-value="2" />
<el-switch v-model="addMsg.Required" :true-value="1"
:false-value="2"></el-switch>必填项
<el-switch v-model="addMsg.Enable" :true-value="1" :false-value="2"></el-switch>启用
</div>
</div>
......@@ -111,21 +105,18 @@
</el-form> -->
</div>
</template>
</q-splitter>
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white">
<q-btn class="q-mr-md" label="取消" @click="getcancel()" />
<q-btn color="accent" class="q-mr-md" label="确定" @click="savewb()" :loading="loading" />
</q-card-actions>
</q-card>
</q-dialog>
</div>
</div>
<div align="right" class="bg-white">
<el-button class="q-mr-md" @click="getcancel()">取消</el-button>
<el-button type="primary" class="q-mr-md" @click="savewb()" :loading="loading">确定</el-button>
</div>
</el-card>
</div>
</template>
<script>
import { defineComponent, ref, onMounted, } from '@vue/composition-api'
import draggable from "vuedraggable";
export default defineComponent({
export default {
components: { draggable },
props: {
passobj: {
......@@ -185,7 +176,7 @@
let submitobj = JSON.parse(JSON.stringify(addMsg.value))
submitobj.Type = tab.value //先类型赋值
if (submitobj.Name == '') {
$q.notify({
this.$message.error({
type: 'negative',
message: `请填写字段名称`,
position: 'top'
......@@ -193,7 +184,7 @@
return
}
if ((submitobj.Type == 1 || submitobj.Type == 2) && submitobj.WordNum == '') {
$q.notify({
this.$message.error({
type: 'negative',
message: `字数不能为空`,
position: 'top'
......@@ -201,7 +192,7 @@
return
}
if (departmentType.value == '2' && (submitobj.DeptId == 0 || submitobj.DeptId == '')) {
$q.notify({
this.$message.error({
type: 'negative',
message: `请选择部门`,
position: 'top'
......@@ -212,7 +203,7 @@
for (let i = 0; i < submitobj.OptionsList.length; i++) {
let x = submitobj.OptionsList[i]
if (x.Name == ''|| x.Name == null) {
$q.notify({
this.$message.error({
type: 'negative',
message: `请填写列表选项值`,
position: 'top'
......@@ -224,7 +215,7 @@
}
if (submitobj.Type == 1) {
if (submitobj.InputType.length == 0) {
$q.notify({
this.$message.error({
type: 'negative',
message: `至少选择一种输入类型`,
position: 'top'
......@@ -241,7 +232,7 @@
Vue.prototype.apipost.setCustomerFiledInfo(submitobj).then((res) => {
if (res.data.Code == 1) {
console.log(res)
$q.notify({
this.$message.error({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
......@@ -297,7 +288,7 @@
getdefault
}
}
})
}
</script>
<style>
.addfield .rightrow {
......
......@@ -163,23 +163,6 @@
import message from '@/utils/message'
import customerSetService from '@/api/customerSet';
import router from '@/router/index'
interface dataType {
Id: number,
RuleSelectType: number,
IsDefault: number,
DeptList: Array < any > ,
EmpList: Array < any > ,
RuleAllotWay: number,
ConditionList: Array < any > ,
ConditionStrList: Array < string > ,
Sort: number
}
interface dataConfigType {
Id ? : number,
ClueType: number,
ClueAllotWay: number
}
export default defineComponent({
components: {
draggable,
......
<template>
<div class="q-pa-md customerField">
<div style="text-align: right;">
<el-button color="accent" style="float:right;margin-bottom: 10px;" size="sm" class="q-mr-md" icon="add"
label="新增字段" @click="goaddfield()"></el-button>
<el-button type="primary" style="float:right;margin-bottom: 10px;" size="sm" class="q-mr-md" icon="plus"
@click="goaddfield()">新增字段</el-button>
</div>
<table class="payTable">
<thead>
......@@ -20,9 +20,9 @@
<tr v-if="data && data.length==0">
<td :colspan="8" align="center">暂无数据</td>
</tr>
<draggable v-model="data" tag="tbody" item-key="Id" :move="getdata" @update="datadragEnd">
<template #item="{ element }">
<tr>
<!-- <draggable v-model="data" tag="tbody" item-key="Id" :move="getdata" @update="datadragEnd"> -->
<template>
<tr v-for="element in data" :key="element.Id">
<td><span>{{element.Name}}</span></td>
<td>
<span v-if="element.IsSystem!=1">{{element.TypeName}}</span>
......@@ -45,21 +45,23 @@
</td>
<td>
<el-button flat size="xs" icon="edit" style="font-weight:400;color: #3FC4FF" class="q-mr-xs"
label="编辑" @click="goedit(element)" />
@click="goedit(element)">编辑</el-button>
<el-button v-if='element.IsDefault!=1' flat size="xs" icon="delete" color="negative"
class="q-mr-xs" label="删除" @click="godelete(element,3)" />
class="q-mr-xs" @click="godelete(element,3)">删除</el-button>
</td>
<td>
<i class="iconfont icon-drag" style="font-size: 20px;color: #777;"></i>
</td>
</tr>
</template>
</draggable>
<!-- </draggable> -->
</table>
<div>
<addfield v-if="Isadd" @getcancel='getcancel' :passobj="addMsg" :passdeptl="deptl" :passtabsList="tabsList"
<el-dialog :visible.sync="Isadd" persistent title="新建/修改字段">
<addfield @getcancel='getcancel' :passobj="addMsg" :passdeptl="deptl" :passtabsList="tabsList"
:passcheckboxList="checkboxList"></addfield>
</el-dialog>
</div>
</div>
......@@ -104,9 +106,9 @@
},
methods: {
changePage() {
this.apipost("/QYCustomer/GetCustomerFiledList", {Enable: -1}, (res) => {
this.apipost("/api/Scene/GetCustomerFiledList", {Enable: -1}, (res) => {
if (res.data.resultCode == 1) {
this.data.value = res.data.Data
this.data = res.data.data
}
});
},
......@@ -114,16 +116,16 @@
// console.log('拖动结束',e)
let olddragId = 0
if (e.newIndex > 0) {
olddragId = data.value[e.newIndex - 1].Id
olddragId = data[e.newIndex - 1].Id
} else {
olddragId = 0
}
let msg = {
Type: 4,
FiledId: dragId.value,
FiledId: dragId,
SortFiledId: olddragId,
}
this.apipost('/QYCustomer/SetCustomerFiledState',msg,(res) => {
this.apipost('/api/Scene/SetCustomerFiledState',msg,(res) => {
if (res.data.Code == 1) {
console.log(res)
} else {//如果移动失败 重新获取列表
......@@ -133,7 +135,7 @@
},
getdata(e) {
this.dragId.value = e.draggedContext.element.Id
this.dragId = e.draggedContext.element.Id
},
setFiledState(item, Type) {
let msg = {
......@@ -141,7 +143,7 @@
FiledId: item.Id,
SortFiledId: 0,
}
this.apipost('/QYCustomer/SetCustomerFiledState',msg,(res) => {
this.apipost('/api/Scene/SetCustomerFiledState',msg,(res) => {
if (res.data.Code == 1) {
this.$message.success({
icon: 'iconfont icon-chenggong',
......@@ -190,22 +192,23 @@
});
},
getCustomerFieldType() {
this.apipost('/QYCustomer/GetCustomerFieldTypeEnumList',{},(res) => {
this.apipost('/api/Scene/GetCustomerFieldTypeEnumList',{},(res) => {
if (res.data.Code == 1) {
this.tabsList.value = res.data.Data
this.tabsList.value.forEach(x => {
this.tabsList = res.data.Data
this.tabsList.forEach(x => {
x.disable = false
})
}
})
},
goedit(item) {
this.addMsg.value = JSON.parse(JSON.stringify(item))
this.Isadd.value = true;
this.addMsg = JSON.parse(JSON.stringify(item))
this.Isadd = true;
},
goaddfield() {
this.Isadd.value = true;
this.addMsg.value = {
this.Isadd = true;
console.log('@vue/composition-api goaddfield', this.Isadd)
this.addMsg = {
Id: 0,
Type: 1,
Name: '',
......@@ -222,8 +225,8 @@
};
},
getcancel(type) {
this.Isadd.value = false;
this.tabsList.value.forEach(x => {
this.Isadd = false;
this.tabsList.forEach(x => {
x.disable = false
})
if (type == 2) {
......@@ -233,14 +236,14 @@
getDepartList() {
this.apipost('/User/GetDeptTree',{ School_Id: 0 },(res) => {
if (res.data.Code == 1) {
this.deptl.value = res.data.Data
this.deptl = res.data.Data
}
})
},
getFieldInputType() {
this.apipost('/QYCustomer/GetCustomerFieldInputTypeEnumList', {},(res) => {
this.apipost('/api/Scene/GetCustomerFieldInputTypeEnumList', {},(res) => {
if (res.data.Code == 1) {
this.checkboxList.value = res.data.Data
this.checkboxList = res.data.Data
}
})
}
......
......@@ -8,9 +8,8 @@
size="sm"
class="q-mr-md"
icon="add"
label="新增分組"
@click="EditCategory()"
></el-button>
>新增分組</el-button>
</div>
<div class="category-header">
<div style="width: 60px;">ID</div>
......@@ -55,9 +54,8 @@
size="sm"
class="q-mr-md"
icon="add"
label="新增分組"
@click="getParent({}, 3)"
></el-button>
>新增分組</el-button>
</div>
<div class="category-header">
......@@ -91,32 +89,32 @@
</div>
</div>
<q-dialog v-model="data.isShow" persistent>
<q-card style="width: 500px; max-width: 80vw;">
<q-card-section class="row items-center q-pb-none">
<el-dialog :visible.sync="isShow" persistent>
<el-card style="width: 500px; max-width: 80vw;">
<el-card-section class="row items-center q-pb-none">
<div class="text-h6">新增标签组</div>
<q-space />
<el-space />
<el-button icon="close" flat round dense v-close-popup />
</q-card-section>
<q-separator />
<q-card-section class="q-pt-none" style="margin-top: 15px;padding: 20px;">
<q-input
</el-card-section>
<el-separator />
<el-card-section class="q-pt-none" style="margin-top: 15px;padding: 20px;">
<el-input
outlined
counter
maxlength="8"
clearable
standout="bg-primary text-white"
v-model="data.addMsg.Name"
v-model="addMsg.Name"
placeholder="标签组名称"
:rules="[val => !!val || '请输入分组名称']"
ref="Name"
/>
<q-input
<el-input
outlined
clearable
type="number"
standout="bg-primary text-white"
v-model="data.addMsg.Sort"
v-model="addMsg.Sort"
placeholder="标签组排序"
:rules="[val => !!val || '请输入分组排序']"
ref="Sort"
......@@ -124,16 +122,16 @@
<div style="color: #787878;">*注:标签组/标签,排序值越大,排序越靠前!</div>
<div
style="width: 100%;"
v-if="data.addMsg.ChildList && data.addMsg.ChildList.length > 0"
v-if="addMsg.ChildList && addMsg.ChildList.length > 0"
>
<div
class="col row wrap q-mr-lg q-col-gutter-md"
v-for="(x,y) in data.addMsg.ChildList"
v-for="(x,y) in addMsg.ChildList"
:key="y"
style="margin-top: 0px;"
>
<div class="col-7">
<q-input
<el-input
outlined
counter
maxlength="15"
......@@ -144,7 +142,7 @@
/>
</div>
<div class="col-3">
<q-input
<el-input
filled
standout="bg-primary text-white"
v-model="x.Sort"
......@@ -161,7 +159,7 @@
color="negative"
class="q-mr-xs"
label
@click="data.addMsg.ChildList.splice(y, 1)"
@click="addMsg.ChildList.splice(y, 1)"
/>
</div>
</div>
......@@ -176,79 +174,79 @@
@click="addbiaoqian()"
/>
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white">
<el-button class="q-mr-md" label="取消" @click="data.isShow = false" />
</el-card-section>
<el-separator />
<el-card-actions align="right" class="bg-white">
<el-button class="q-mr-md" label="取消" @click="isShow = false" />
<el-button
color="accent"
class="q-mr-md"
label="确定"
@click="submit()"
:loading="data.btnloading"
:loading="btnloading"
/>
</q-card-actions>
</q-card>
</q-dialog>
</el-card-actions>
</el-card>
</el-dialog>
<!-- 修改标签组名称 -->
<q-dialog v-model="data.isParent" persistent>
<q-card style="width: 500px; max-width: 80vw;">
<q-card-section class="row items-center q-pb-none">
<el-dialog :visible.sync="isParent" persistent>
<el-card style="width: 500px; max-width: 80vw;">
<el-card-section class="row items-center q-pb-none">
<div class="text-h6">修改标签信息</div>
<q-space />
<el-space />
<el-button icon="close" flat round dense v-close-popup />
</q-card-section>
<q-separator />
<q-card-section class="q-pt-none" style="margin-top: 15px;padding: 20px;">
<q-input
v-if="data.edittype == 1"
</el-card-section>
<el-separator />
<el-card-section class="q-pt-none" style="margin-top: 15px;padding: 20px;">
<el-input
v-if="edittype == 1"
outlined
counter
maxlength="8"
clearable
standout="bg-primary text-white"
v-model="data.addMsg.Name"
v-model="addMsg.Name"
placeholder="标签组名称"
:rules="[val => !!val || '请输入分组名称']"
ref="eName"
/>
<q-input
v-if="data.edittype == 2 || data.edittype == 3"
<el-input
v-if="edittype == 2 || edittype == 3"
outlined
counter
maxlength="15"
clearable
standout="bg-primary text-white"
v-model="data.addMsg.Name"
v-model="addMsg.Name"
placeholder="标签名称"
:rules="[val => !!val || '请输入标签名称']"
ref="eName"
/>
<q-input
<el-input
outlined
clearable
standout="bg-primary text-white"
v-model="data.addMsg.Sort"
v-model="addMsg.Sort"
placeholder="标签组排序"
:rules="[val => !!val || '请输入分组排序']"
ref="eSort"
/>
<div style="color: #787878;">*注:标签组/标签,排序值越大,排序越靠前!</div>
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white">
<el-button class="q-mr-md" label="取消" @click="data.isParent = false" />
</el-card-section>
<el-separator />
<el-card-actions align="right" class="bg-white">
<el-button class="q-mr-md" label="取消" @click="isParent = false" />
<el-button
color="accent"
class="q-mr-md"
label="确定"
@click="submitParent()"
:loading="data.btnloading"
:loading="btnloading"
/>
</q-card-actions>
</q-card>
</q-dialog>
</el-card-actions>
</el-card>
</el-dialog>
</div>
</template>
......
......@@ -22,7 +22,7 @@
<div class="container fit">
<businessModel v-if="tab == 'model'"></businessModel>
<customer-Field v-if="tab == 'field'"></customer-Field>
<clue-rule v-if="tab == 'clue'"></clue-rule>
<!-- <clue-rule v-if="tab == 'clue'"></clue-rule> -->
<laqundistribution v-if="tab == 'laqun'"></laqundistribution>
<customer-phase v-if="tab == 'phase'"></customer-phase>
<customerlabel v-if="tab == 'label'"></customerlabel>
......@@ -36,7 +36,7 @@
<script lang="ts">
import businessModel from './components/businessModel.vue'
import customerField from './components/customerField.vue'
import clueRule from './components/clueRule.vue'
// import clueRule from './components/clueRule.vue'
import laqundistribution from './components/laqundistribution.vue'//拉群分配客人
import customerPhase from './components/customerPhase.vue'
......@@ -55,7 +55,7 @@ export default defineComponent({
components: {
businessModel,
customerField,
clueRule,
// clueRule,
customerPhase,
customerlabel,
CustomerOperation,
......
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