|
@@ -28,10 +28,25 @@
|
|
|
<el-input el-input v-model="ruleForm.groupname"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label-width="120px" label="客户名称:" prop="customername">
|
|
|
- <el-input el-input v-model="ruleForm.customername"></el-input>
|
|
|
+ <el-autocomplete
|
|
|
+ style="width: 100%;"
|
|
|
+ class="inline-input"
|
|
|
+ v-model="ruleForm.customername"
|
|
|
+ :fetch-suggestions="querySearch"
|
|
|
+ placeholder="请输入内容"
|
|
|
+ @select="handleSelect"
|
|
|
+ ></el-autocomplete>
|
|
|
+ <!-- <el-input el-input v-model="ruleForm.customername"></el-input> -->
|
|
|
</el-form-item>
|
|
|
<el-form-item label-width="120px" label="客户单位:" prop="customerunits">
|
|
|
- <el-input el-input v-model="ruleForm.customerunits"></el-input>
|
|
|
+ <el-autocomplete
|
|
|
+ style="width: 100%;"
|
|
|
+ class="inline-input"
|
|
|
+ v-model="ruleForm.customerunits"
|
|
|
+ :fetch-suggestions="querySearchdw"
|
|
|
+ placeholder="请输入内容"
|
|
|
+ ></el-autocomplete>
|
|
|
+ <!-- <el-input el-input v-model="ruleForm.customerunits"></el-input> -->
|
|
|
</el-form-item>
|
|
|
<el-form-item label-width="120px" label="出访国家:" prop="countriesvisited">
|
|
|
<el-input el-input v-model="ruleForm.countriesvisited"></el-input>
|
|
@@ -62,7 +77,7 @@
|
|
|
style="margin-bottom: 22px;display: inline-block;color: #606266;font-size: 14px;">(预付款,请输入RMB)</span>
|
|
|
</div>
|
|
|
<div style="display: flex;align-items: center;">
|
|
|
- <el-form-item label-width="120px" label="OP提成等级" prop="opRoyaltyLv">
|
|
|
+ <el-form-item style="width:16%" label-width="120px" label="OP提成等级" prop="opRoyaltyLv">
|
|
|
<el-select @change="commissionlevel" v-model="ruleForm.opRoyaltyLv" placeholder="OP提成等级" clearable filterable
|
|
|
style="width: 100%;">
|
|
|
<el-option v-for="item in opRoyaltyLvList" :key="item.id" :label="item.name + '元'"
|
|
@@ -112,11 +127,14 @@
|
|
|
<el-form-item label-width="120px" label="备注:">
|
|
|
<el-input type="textarea" v-model="ruleForm.remark"></el-input>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label-width="120px" label="微信号:">
|
|
|
+ <el-input type="textarea" v-model="ruleForm.Wechat"></el-input>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label-width="120px" label="手机号:">
|
|
|
<el-input type="textarea" v-model="ruleForm.phonenumber"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
- <el-form-item>
|
|
|
+ <el-form-item style="text-align: right;">
|
|
|
<el-button type="primary" @click="submitForm('ruleForm')">确 定</el-button>
|
|
|
<el-button @click="resetForm('ruleForm')">重 置</el-button>
|
|
|
<el-button @click="clickback()">返 回</el-button>
|
|
@@ -160,14 +178,14 @@
|
|
|
import { el } from '@fullcalendar/core/internal-common';
|
|
|
import { all } from 'q';
|
|
|
export default {
|
|
|
- beforeRouteLeave(to, from, next) {
|
|
|
- console.log(to);
|
|
|
- console.log(from);
|
|
|
- if(to.name=='OPgroup'){
|
|
|
- to.meta.keepAlive = true;
|
|
|
- }
|
|
|
- next()
|
|
|
- },
|
|
|
+ // beforeRouteLeave(to, from, next) {
|
|
|
+ // console.log(to);
|
|
|
+ // console.log(from);
|
|
|
+ // if(to.name=='OPgroup'){
|
|
|
+ // to.meta.keepAlive = true;
|
|
|
+ // }
|
|
|
+ // next()
|
|
|
+ // },
|
|
|
data() {
|
|
|
return {
|
|
|
editid: '',
|
|
@@ -195,6 +213,7 @@ export default {
|
|
|
censorshipdepartment: '',
|
|
|
remark: '',
|
|
|
phonenumber: '',
|
|
|
+ Wechat: '',
|
|
|
OP: '',
|
|
|
grades: '',
|
|
|
person: '',
|
|
@@ -212,10 +231,10 @@ export default {
|
|
|
{ required: true, message: '请输入团组名称', trigger: 'blur' },
|
|
|
],
|
|
|
customername: [
|
|
|
- { required: true, message: '请输入客户名称', trigger: 'blur' },
|
|
|
+ { required: true, message: '请输入客户名称', trigger: 'change' },
|
|
|
],
|
|
|
customerunits: [
|
|
|
- { required: true, message: '请输入客户单位', trigger: 'blur' },
|
|
|
+ { required: true, message: '请输入客户单位', trigger: 'change' },
|
|
|
],
|
|
|
countriesvisited: [
|
|
|
{ required: true, message: '请输入出访国家', trigger: 'blur' },
|
|
@@ -261,9 +280,29 @@ export default {
|
|
|
fullscreenLoading: false,
|
|
|
dialogVisible: false,
|
|
|
opRoyaltyLvList: [],
|
|
|
+ restaurants: [],
|
|
|
+ restaurantss:[],
|
|
|
+ customerunitslist:[],
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
+ querySearch(queryString, cb) {
|
|
|
+ var restaurants = this.restaurants;
|
|
|
+ var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
|
|
|
+ // 调用 callback 返回建议列表的数据
|
|
|
+ cb(results);
|
|
|
+ },
|
|
|
+ querySearchdw(queryString, cb) {
|
|
|
+ var restaurants = this.customerunitslist;
|
|
|
+ var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
|
|
|
+ // 调用 callback 返回建议列表的数据
|
|
|
+ cb(results);
|
|
|
+ },
|
|
|
+ createFilter(queryString) {
|
|
|
+ return (restaurant) => {
|
|
|
+ return restaurant.value.replace(" ", "").toLowerCase().match(queryString.toLowerCase());
|
|
|
+ };
|
|
|
+ },
|
|
|
submitForm(formName) {
|
|
|
this.$refs[formName].validate((valid) => {
|
|
|
if (valid) {
|
|
@@ -298,6 +337,18 @@ export default {
|
|
|
}
|
|
|
}).then(function (res) {
|
|
|
if (res.data.code == 200) {
|
|
|
+ console.log(res)
|
|
|
+ that.restaurantss=res.data.data.clientData;
|
|
|
+ that.restaurants= that.restaurantss.map((terminal) => {
|
|
|
+ return {
|
|
|
+ value: terminal.contact +' '+ terminal.client +' '+terminal.telephone+' '+terminal.wechat,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ that.customerunitslist= that.restaurantss.map((terminal) => {
|
|
|
+ return {
|
|
|
+ value:terminal.client,
|
|
|
+ };
|
|
|
+ });
|
|
|
that.personarr = res.data.data.userData;
|
|
|
that.gradearr = res.data.data.teamLevData;
|
|
|
that.OPtype = res.data.data.teamTypeData;
|
|
@@ -316,7 +367,6 @@ export default {
|
|
|
}
|
|
|
}).then(function (res) {
|
|
|
if (res.data.code == 200) {
|
|
|
- console.log(res)
|
|
|
that.opRoyaltyLvList = res.data.data;
|
|
|
}
|
|
|
})
|
|
@@ -407,6 +457,7 @@ export default {
|
|
|
that.ruleForm.censorshipdepartment = datagroup.zzscbmmc;
|
|
|
that.ruleForm.approvalnumber2 = datagroup.zzscspwh;
|
|
|
that.ruleForm.remark = datagroup.remark;
|
|
|
+ that.ruleForm.Wechat = datagroup.weChatNo;
|
|
|
that.ruleForm.phonenumber = datagroup.tellPhone;
|
|
|
that.ruleForm.OP = datagroup.teamDid;
|
|
|
that.ruleForm.grades = datagroup.teamLevSId;
|
|
@@ -462,6 +513,7 @@ export default {
|
|
|
zzscbmmc: that.ruleForm.censorshipdepartment,
|
|
|
zzscspwh: that.ruleForm.approvalnumber2,
|
|
|
tellPhone: that.ruleForm.phonenumber,
|
|
|
+ weChatNo:that.ruleForm.Wechat,
|
|
|
remark: that.ruleForm.remark,
|
|
|
opRoyaltyLv: that.ruleForm.opRoyaltyLv,
|
|
|
opRoyaltyRemark: that.ruleForm.opRoyaltyRemark,
|
|
@@ -485,11 +537,17 @@ export default {
|
|
|
that.fullscreenLoading = false;
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ handleSelect(item) {
|
|
|
+ // console.log(item.split(' '));
|
|
|
+ console.log(item.value.split(' '));
|
|
|
+ this.ruleForm.customername=item.value.split(' ')[0];
|
|
|
+ this.ruleForm.customerunits=item.value.split(' ')[1];
|
|
|
+ this.ruleForm.phonenumber=item.value.split(' ')[2];
|
|
|
+ this.ruleForm.Wechat=item.value.split(' ')[3];
|
|
|
}
|
|
|
},
|
|
|
beforeRouteEnter(to, from, next) {
|
|
|
- console.log(to)
|
|
|
- console.log(from)
|
|
|
next();
|
|
|
},
|
|
|
mounted() {
|