Commit 6ee29e60 authored by Mac's avatar Mac

1

parent d9f23d77
...@@ -32,6 +32,8 @@ ...@@ -32,6 +32,8 @@
<tr> <tr>
<th>规则名称</th> <th>规则名称</th>
<th>线路</th> <th>线路</th>
<th>类型</th>
<th>来源 </th>
<th>团队类型名称 </th> <th>团队类型名称 </th>
<th>类型</th> <th>类型</th>
<th>金额/比例</th> <th>金额/比例</th>
...@@ -47,6 +49,16 @@ ...@@ -47,6 +49,16 @@
<span v-for="(x,y) in subItem.LineNameList" <span v-for="(x,y) in subItem.LineNameList"
:key="y+'1'">{{x}}{{subItem.LineNameList.length==y+1?'':'、'}}</span> :key="y+'1'">{{x}}{{subItem.LineNameList.length==y+1?'':'、'}}</span>
</td> </td>
<td v-if="childIndex==0" :rowspan="subItem.TempTypeList.length">
<span v-if="subItem.Type==1">销售</span>
<span v-if="subItem.Type==2">OP</span>
<span v-if="subItem.Type==3">自定义人员</span>
</td>
<td >
<span v-if="childItem.SourceType==1">正常</span>
<span v-if="childItem.SourceType==2">飞猪</span>
</td>
<td>{{childItem.Name}}</td> <td>{{childItem.Name}}</td>
<td> <td>
<span v-if="childItem.Type == 1">人头</span> <span v-if="childItem.Type == 1">人头</span>
...@@ -77,11 +89,11 @@ ...@@ -77,11 +89,11 @@
</tr> </tr>
</template> </template>
<tr v-if="DataList.length==0"> <tr v-if="DataList.length==0">
<td colspan="8" align="center">暂无数据</td> <td colspan="10" align="center">暂无数据</td>
</tr> </tr>
<tfoot> <tfoot>
<tr> <tr>
<td colspan="8"> <td colspan="10">
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="msg.pageIndex" <el-pagination background @current-change="handleCurrentChange" :current-page.sync="msg.pageIndex"
layout="total,prev, pager, next, jumper" :page-size="msg.pageSize" :total="total"> layout="total,prev, pager, next, jumper" :page-size="msg.pageSize" :total="total">
</el-pagination> </el-pagination>
...@@ -103,23 +115,57 @@ ...@@ -103,23 +115,57 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="类型">
<el-radio v-model="addMsg.Type" label="1">销售</el-radio>
<el-radio v-model="addMsg.Type" label="2" style="margin-right: 20px;">OP</el-radio>
<el-radio v-model="addMsg.Type" label="3" style="margin-right: 20px;">自定义人员</el-radio>
</el-form-item>
<el-form-item label="提成比例表"> <el-form-item label="提成比例表">
<div style="width: 100%;border-bottom: 1px solid #e2e2e2;padding-bottom: 10px;margin-top: 10px;" <div style="width: 100%;border-bottom: 1px solid #e2e2e2;padding-bottom: 10px;margin-top: 10px;"
v-for="(x,y) in addMsg.TempTypeList" :key='y'> v-for="(x,y) in addMsg.TempTypeList" :key='y'>
<div style="display: flex;align-items: center;margin-top: 10px;">
<el-form-item label="来源">
<el-radio v-model="x.SourceType" label="1" @change='getSType(y)'>正常</el-radio>
<el-radio v-model="x.SourceType" label="2" :disabled="x.STdisabled" style="margin-right: 20px;" @change='getSType(y)'>飞猪</el-radio>
</el-form-item>
<el-button style="margin-left: 15px;padding: 6px;" type="danger" size="mini" class="el-icon-delete" circle
v-if="addMsg.TempTypeList.length>1" @click="addMsg.TempTypeList.splice(y,1),selectdis()">
</el-button>
</div>
<div style="display: flex;align-items: center;"> <div style="display: flex;align-items: center;">
<!-- <span style="line-height: 34px;">团队类型:</span> --> <!-- <span style="line-height: 34px;">团队类型:</span> -->
<el-form-item :prop="'TempTypeList.'+ y +'.Id'" :rules="productGroupRules.Id" label="团队类型"> <el-form-item v-if='x.SourceType==1 && addMsg.Type!=3' :prop="'TempTypeList.'+ y +'.Id'" :rules="productGroupRules.Id" label="团队类型">
<el-select v-model="x.Id" style="width: 300px;" @change="selectdis($event, y),gettdName(x.Id,y)" <el-select v-model="x.Id" style="width: 300px;" @change="selectdis($event, y),gettdName(x.Id,y)"
clearable> clearable>
<el-option v-for="item in TeamListArr" :key="item.Id" :label="item.Name" :disabled="item.disabled" <el-option v-for="item in TeamListArr" :key="item.Id" :label="item.Name" :disabled="item.disabled"
:value="item.Id"></el-option> :value="item.Id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="人员选择:" v-if="x.SourceType==1 && addMsg.Type==3">
<el-select
v-model="x.Id"
filterable
remote
reserve-keyword
:placeholder="$t('pub.pleaseImport')"
:remote-method="remoteMethod"
@change="getpersonnel(y)"
>
<el-option
v-for="item in searchList"
:key="item.empId"
:label="item.name"
:value="item.empId">
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.postName }}</span>
</el-option>
</el-select>
<el-button style="margin-left: 15px;" type="danger" size="mini" class="el-icon-delete" circle </el-form-item>
v-if="addMsg.TempTypeList.length>1" @click="addMsg.TempTypeList.splice(y,1),selectdis()">
</el-button>
</div> </div>
...@@ -184,12 +230,15 @@ ...@@ -184,12 +230,15 @@
RuleName: '', RuleName: '',
LineIds: '', LineIds: '',
LineshortIds: [], LineshortIds: [],
Type:'1',
TempTypeList: [{ TempTypeList: [{
Id: '', Id: '',
Name: '', Name: '',
Type: '1', Type: '1',
Money: '0', Money: '0',
ProfitRate: '0' ProfitRate: '0',
SourceType:'1',
STdisabled:false
}] }]
} }
export default { export default {
...@@ -212,6 +261,7 @@ ...@@ -212,6 +261,7 @@
RuleName: '', RuleName: '',
LineId: 0, LineId: 0,
}, },
searchList:[],//人员
loading: false, //加载层 loading: false, //加载层
DataList: [], DataList: [],
total: 0, total: 0,
...@@ -339,6 +389,7 @@ ...@@ -339,6 +389,7 @@
this.addMsg.TempTypeList = data.TempTypeList; this.addMsg.TempTypeList = data.TempTypeList;
this.addMsg.TempTypeList.forEach(x => { this.addMsg.TempTypeList.forEach(x => {
x.Type = x.Type.toString() x.Type = x.Type.toString()
x.SourceType = x.SourceType.toString()
}) })
this.selectdis() this.selectdis()
this.ruleVisible = true; this.ruleVisible = true;
...@@ -371,24 +422,39 @@ ...@@ -371,24 +422,39 @@
RuleName: '', RuleName: '',
LineIds: '', LineIds: '',
LineshortIds: [], LineshortIds: [],
Type:'1',
TempTypeList: [{ TempTypeList: [{
Id: '', Id: '',
Name: '', Name: '',
Type: '1', Type: '1',
Money: '0', Money: '0',
ProfitRate: '0' ProfitRate: '0',
SourceType:'1',
STdisabled:false
}] }]
} }
this.selectdis() this.selectdis()
this.ruleVisible = true; this.ruleVisible = true;
}, },
addTempTypeList() { //新增类型 addTempTypeList() { //新增类型
let isdisabled = false
for(let i = 0;i<this.addMsg.TempTypeList.length;i++){
let x = this.addMsg.TempTypeList[i]
if(x.SourceType==2){
isdisabled=true
break
}
}
let obj = { let obj = {
Id: '', Id: '',
Name: '', Name: '',
Type: '1', Type: '1',
Money: "0", Money: "0",
ProfitRate: "0" ProfitRate: "0",
SourceType:'1',
STdisabled:isdisabled
} }
this.addMsg.TempTypeList.push(obj) this.addMsg.TempTypeList.push(obj)
}, },
...@@ -414,6 +480,54 @@ ...@@ -414,6 +480,54 @@
} }
}); });
}, },
getSType(index){//选了飞猪之后 后面的不能选飞猪了
if(this.addMsg.TempTypeList[index].SourceType==1){
this.addMsg.TempTypeList[index].Id=''
this.addMsg.TempTypeList[index].Name=''
}
let isfeizhu = false
for(let i = 0;i<this.addMsg.TempTypeList.length;i++){
let x = this.addMsg.TempTypeList[i]
if(x.SourceType==2){
isfeizhu=true
}
}
this.addMsg.TempTypeList.forEach(x=>{
if(isfeizhu==true){
if(x.SourceType==2){
x.STdisabled = false;
x.Id=0;
x.Name='飞猪'
}else{
x.STdisabled = true
}
}else{
x.STdisabled = false
}
})
this.selectdis()
this.$forceUpdate();
},
remoteMethod(query) { // 转交人模糊查询
if (query !== '') {
this.apipost("admin_Get_Chat_All_SelectEmpName",{ EmName:query },res => {
if (res.data.resultCode == 1) {
this.searchList = res.data.data;
}
},err => {});
} else {
this.searchList = [];
}
},
getpersonnel(y){
for(let i = 0;i<this.searchList.length;i++){
let x = this.searchList[i]
if(x.empId == this.addMsg.TempTypeList[y].Id){
this.addMsg.TempTypeList[y].Name = x.name;
break
}
}
}
}, },
mounted() { mounted() {
......
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