Commit 46e03c3f authored by zhengke's avatar zhengke

修改

parent 5bd1cd0a
...@@ -253,10 +253,10 @@ ...@@ -253,10 +253,10 @@
:loading="loading2"> :loading="loading2">
<el-option <el-option
v-for="item in searchList" v-for="item in searchList"
:key="item.empId" :key="item.Id"
:label="item.name" :label="item.EmployeeName"
:value="item.empId"> :value="item.Id">
<span style="float: left">{{ item.name }}</span> <span style="float: left">{{ item.EmployeeName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.postName }}</span> <span style="float: right; color: #8492a6; font-size: 13px">{{ item.postName }}</span>
</el-option> </el-option>
</el-select> </el-select>
...@@ -330,6 +330,10 @@ ...@@ -330,6 +330,10 @@
</div> </div>
</template> </template>
<script> <script>
import {
queryEmployee
} from '../../api/users/user'
export default { export default {
data(){ data(){
return{ return{
...@@ -473,18 +477,31 @@ ...@@ -473,18 +477,31 @@
} }
} }
if(!sub) return this.$message.error('请选择出纳类型!') if(!sub) return this.$message.error('请选择出纳类型!')
let emList = this.addMsg.listArr; let emList = this.addMsg.listArr;
let arr = []; this.addMsg.emList=[];
emList.forEach(x=>{ emList.forEach(x=>{
let obj = { this.searchList.forEach(y=>{
'EmId':x, if(x==y.Id){
'ID':0, let obj={
'WindowId':0 EmId:y.Id,
} EmIdName:y.EmployeeName
arr.push(obj); }
}); this.addMsg.emList.push(obj);
let list4 = this.mergeArray(arr,this.addMsg.emList); }
this.addMsg.emList = list4; })
})
// let arr = [];
// emList.forEach(x=>{
// let obj = {
// 'EmId':x,
// 'ID':0,
// 'WindowId':0
// }
// arr.push(obj);
// });
// let list4 = this.mergeArray(arr,this.addMsg.emList);
// this.addMsg.emList = list4;
this.apipost('Window_post_Set',this.addMsg,r=>{ this.apipost('Window_post_Set',this.addMsg,r=>{
if(r.data.resultCode==1){ if(r.data.resultCode==1){
this.$message.success(r.data.message); this.$message.success(r.data.message);
...@@ -635,18 +652,13 @@ ...@@ -635,18 +652,13 @@
this.addMsg.EmId = item.empId; this.addMsg.EmId = item.empId;
}, },
remoteMethod(query) { remoteMethod(query) {
if (query !== ''||this.addShow) { queryEmployee({}).then(res => {
this.loading2 = true; if(res.Code==1){
this.apipost("admin_Get_Chat_All_SelectEmpName",{ EmName:query },res => { this.searchList = res.Data;
if (res.data.resultCode == 1) { }
this.searchList = res.data.data; }).catch(() => {
this.loading2 = false;
} })
},err => {});
} else {
this.searchList = [];
this.loading2 = false;
}
}, },
getList(){ getList(){
this.loading = true; this.loading = true;
...@@ -719,9 +731,20 @@ ...@@ -719,9 +731,20 @@
resetForm(formName) {//弹出框取消 初始化谈框内表单 resetForm(formName) {//弹出框取消 初始化谈框内表单
this.$refs[formName].resetFields(); this.$refs[formName].resetFields();
}, },
getEmployee(){
queryEmployee({}).then(res => {
if(res.Code==1){
this.searchList = res.Data;
console.log(res,'数据');
}
}).catch(() => {
})
}
},mounted(){ },mounted(){
this.getList(); this.getList();
this.getAccList(); this.getAccList();
this.getEmployee();
} }
} }
</script> </script>
...@@ -147,8 +147,8 @@ ...@@ -147,8 +147,8 @@
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item :label="$t('fnc.w_ywrenyuan')+':'" prop="listArr"> <el-form-item :label="$t('fnc.w_ywrenyuan')+':'" prop="listArr">
<el-select v-model="addMsg.listArr" filterable remote multiple reserve-keyword <el-select v-model="addMsg.listArr" filterable remote multiple reserve-keyword :remote-method="remoteMethod"
:placeholder="$t('pub.pleaseImport')" :remote-method="remoteMethod" @change="$forceUpdate()" :placeholder="$t('pub.pleaseImport')" @change="$forceUpdate()"
@remove-tag="removeTag" :loading="loading2"> @remove-tag="removeTag" :loading="loading2">
<el-option v-for="(item,index) in searchList" :key="index+60000" :label="item.EmployeeName" <el-option v-for="(item,index) in searchList" :key="index+60000" :label="item.EmployeeName"
:value="item.Id"> :value="item.Id">
...@@ -367,16 +367,18 @@ ...@@ -367,16 +367,18 @@
}, },
addCashierWork() { // 提交保存 addCashierWork() { // 提交保存
let emList = this.addMsg.listArr; let emList = this.addMsg.listArr;
let arr = []; this.addMsg.emList=[];
emList.forEach(x => { emList.forEach(x=>{
let obj = { this.searchList.forEach(y=>{
'EmId': x, if(x==y.Id){
'ID': 0, let obj={
'WindowId': 0 EmId:y.Id,
} EmIdName:y.EmployeeName
arr.push(obj); }
this.addMsg.emList.push(obj);
}
})
}) })
let list4 = this.mergeArray(arr, this.addMsg.emList);
let TemplateListArr = this.addMsg.TemplateListArr; let TemplateListArr = this.addMsg.TemplateListArr;
let newArr = []; let newArr = [];
...@@ -391,7 +393,7 @@ ...@@ -391,7 +393,7 @@
}) })
}) })
this.addMsg.emList = list4; // this.addMsg.emList = list4;
this.addMsg.TemplateList = newArr; this.addMsg.TemplateList = newArr;
let obj = {}; let obj = {};
obj = this.CompanyList.find(item => { obj = this.CompanyList.find(item => {
...@@ -443,12 +445,9 @@ ...@@ -443,12 +445,9 @@
}); });
}, },
remoteMethod(query) { remoteMethod(query) {
let msg = { queryEmployee({}).then(res => {
EmployeeName:query
}
queryEmployee(msg).then(res => {
if(res.Code==1){ if(res.Code==1){
this.searchList = res.Data; this.searchList = res.Data;
} }
}).catch(() => { }).catch(() => {
...@@ -479,9 +478,6 @@ ...@@ -479,9 +478,6 @@
}, res => { }, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
let data = res.data.data; let data = res.data.data;
// data.CostList.forEach(x=>{
// this.CostIdS.push(x.CostTypeId);
// })
this.addMsg = data; this.addMsg = data;
this.addMsg.listArr = []; this.addMsg.listArr = [];
this.addMsg.TemplateListArr = []; this.addMsg.TemplateListArr = [];
...@@ -532,11 +528,22 @@ ...@@ -532,11 +528,22 @@
}) })
}, },
getEmployee(){
queryEmployee({}).then(res => {
if(res.Code==1){
this.searchList = res.Data;
console.log(res,'数据');
}
}).catch(() => {
})
}
}, },
mounted() { mounted() {
this.getList(); this.getList();
this.getCostTypeList(); this.getCostTypeList();
this.getCompanyList(); this.getCompanyList();
this.getEmployee();
} }
} }
......
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