fixd:人员选择后的证书获取

This commit is contained in:
shijing 2023-08-11 11:32:42 +08:00
parent ea497fdf4e
commit 7e68104923
2 changed files with 25 additions and 32 deletions

View File

@ -183,11 +183,8 @@ export default {
if(that.userLists[x].id == item.id){
item.checked = false;
this.$set(this.userLists, x, item);
// that.userLists[x].checked = false
}
}
// that.$vm.$forceUpdate();
},
sameChose() {
//
@ -216,6 +213,10 @@ export default {
if(this.choseType == 'single'){
prevPage.$vm.formData[this.type] = this.selectedUser[0].id;
prevPage.$vm[this.typeName] = this.selectedUser[0].name;
if(this.type=='worker'){
prevPage.$vm.workerGet = true;
}else{}
}
// uni.navigateBack({

View File

@ -50,8 +50,6 @@
<checkbox :value="item.id" :checked="item.checked" />{{item.name}}
</label>
</checkbox-group>
<!-- <uni-data-select :localdata="certificateRange" v-model="formData.certificates">
</uni-data-select> -->
</view>
<view class="uni-btn-v">
<button class="mini-btn" type="primary" size="mini" form-type="submit">确定</button>
@ -89,6 +87,7 @@
duty: null,
certificates: [],
},
workerGet:false,
initform: {},
workerList: [],
workerRange: [],
@ -125,10 +124,10 @@
this.getOplDetail();
},
onShow() {
// this.workerList = [];
this.getWorkerList();
// this.getWorkerRange();
// this.getVpeopleList();
if(this.workerGet){
this.selectWorker();
}
},
methods: {
showWorkerPicker() {
@ -140,10 +139,6 @@
showPicker() {
this.$refs.workerPicker._show();
},
// selectChange(ids, names) {
// this.formData.worker = ids[0];
// this.worker_name = names;
// },
showNext(){
if(["fire", "space", "cooler"].indexOf(this.oplCateCode)!=-1){
this.showN = true
@ -202,27 +197,24 @@
that.workerList = res
})
},
selectWorker(e) {
//
selectWorker() {
let that = this;
that.formData.worker = e;
if(e!==''){
that.$u.api.hrmCertificate({
employee__user:e,
page: 0
})
.then((res) => {
let certificateRange = [];
let obj = {};
res.forEach(item => {
obj = item;
obj.chencked = false;
certificateRange.push(obj);
})
that.certificateRange = certificateRange
console.log(res);
});
}else{}
that.$u.api.hrmCertificate({
employee__user:that.formData.worker,
page: 0
})
.then((res) => {
let certificateRange = [];
let obj = {};
res.forEach(item => {
obj = item;
obj.chencked = false;
certificateRange.push(obj);
})
that.certificateRange = certificateRange
console.log(res);
});
},
checkboxMeasuresChange(e) {
let values = e.detail.value;