Commit 46e03c3f authored by zhengke's avatar zhengke

修改

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