fixd:人员选择后的证书获取
This commit is contained in:
parent
ea497fdf4e
commit
7e68104923
|
@ -183,11 +183,8 @@ export default {
|
||||||
if(that.userLists[x].id == item.id){
|
if(that.userLists[x].id == item.id){
|
||||||
item.checked = false;
|
item.checked = false;
|
||||||
this.$set(this.userLists, x, item);
|
this.$set(this.userLists, x, item);
|
||||||
// that.userLists[x].checked = false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// that.$vm.$forceUpdate();
|
|
||||||
},
|
},
|
||||||
sameChose() {
|
sameChose() {
|
||||||
// 同步显示
|
// 同步显示
|
||||||
|
@ -216,6 +213,10 @@ export default {
|
||||||
if(this.choseType == 'single'){
|
if(this.choseType == 'single'){
|
||||||
prevPage.$vm.formData[this.type] = this.selectedUser[0].id;
|
prevPage.$vm.formData[this.type] = this.selectedUser[0].id;
|
||||||
prevPage.$vm[this.typeName] = this.selectedUser[0].name;
|
prevPage.$vm[this.typeName] = this.selectedUser[0].name;
|
||||||
|
if(this.type=='worker'){
|
||||||
|
prevPage.$vm.workerGet = true;
|
||||||
|
}else{}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// uni.navigateBack({
|
// uni.navigateBack({
|
||||||
|
|
|
@ -50,8 +50,6 @@
|
||||||
<checkbox :value="item.id" :checked="item.checked" />{{item.name}}
|
<checkbox :value="item.id" :checked="item.checked" />{{item.name}}
|
||||||
</label>
|
</label>
|
||||||
</checkbox-group>
|
</checkbox-group>
|
||||||
<!-- <uni-data-select :localdata="certificateRange" v-model="formData.certificates">
|
|
||||||
</uni-data-select> -->
|
|
||||||
</view>
|
</view>
|
||||||
<view class="uni-btn-v">
|
<view class="uni-btn-v">
|
||||||
<button class="mini-btn" type="primary" size="mini" form-type="submit">确定</button>
|
<button class="mini-btn" type="primary" size="mini" form-type="submit">确定</button>
|
||||||
|
@ -89,6 +87,7 @@
|
||||||
duty: null,
|
duty: null,
|
||||||
certificates: [],
|
certificates: [],
|
||||||
},
|
},
|
||||||
|
workerGet:false,
|
||||||
initform: {},
|
initform: {},
|
||||||
workerList: [],
|
workerList: [],
|
||||||
workerRange: [],
|
workerRange: [],
|
||||||
|
@ -125,10 +124,10 @@
|
||||||
this.getOplDetail();
|
this.getOplDetail();
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
// this.workerList = [];
|
|
||||||
this.getWorkerList();
|
this.getWorkerList();
|
||||||
// this.getWorkerRange();
|
if(this.workerGet){
|
||||||
// this.getVpeopleList();
|
this.selectWorker();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showWorkerPicker() {
|
showWorkerPicker() {
|
||||||
|
@ -140,10 +139,6 @@
|
||||||
showPicker() {
|
showPicker() {
|
||||||
this.$refs.workerPicker._show();
|
this.$refs.workerPicker._show();
|
||||||
},
|
},
|
||||||
// selectChange(ids, names) {
|
|
||||||
// this.formData.worker = ids[0];
|
|
||||||
// this.worker_name = names;
|
|
||||||
// },
|
|
||||||
showNext(){
|
showNext(){
|
||||||
if(["fire", "space", "cooler"].indexOf(this.oplCateCode)!=-1){
|
if(["fire", "space", "cooler"].indexOf(this.oplCateCode)!=-1){
|
||||||
this.showN = true
|
this.showN = true
|
||||||
|
@ -202,12 +197,11 @@
|
||||||
that.workerList = res
|
that.workerList = res
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
selectWorker(e) {
|
//选择工作人员后获取它的证书
|
||||||
|
selectWorker() {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.formData.worker = e;
|
|
||||||
if(e!==''){
|
|
||||||
that.$u.api.hrmCertificate({
|
that.$u.api.hrmCertificate({
|
||||||
employee__user:e,
|
employee__user:that.formData.worker,
|
||||||
page: 0
|
page: 0
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
@ -221,8 +215,6 @@
|
||||||
that.certificateRange = certificateRange
|
that.certificateRange = certificateRange
|
||||||
console.log(res);
|
console.log(res);
|
||||||
});
|
});
|
||||||
|
|
||||||
}else{}
|
|
||||||
},
|
},
|
||||||
checkboxMeasuresChange(e) {
|
checkboxMeasuresChange(e) {
|
||||||
let values = e.detail.value;
|
let values = e.detail.value;
|
||||||
|
|
Loading…
Reference in New Issue