|
@@ -33,7 +33,6 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
-
|
|
|
</a-table>
|
|
|
</div>
|
|
|
|
|
@@ -47,6 +46,7 @@
|
|
|
<a-form-item label="班次名称">
|
|
|
<a-select v-model="shiftname" placeholder="请选择班次">
|
|
|
<a-select-option value="">请选择</a-select-option>
|
|
|
+ <a-select-option value="a">休息</a-select-option>
|
|
|
<a-select-option v-for="(item,index) in shiftlist" :value="item.id">{{item.name}}</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
@@ -111,7 +111,7 @@
|
|
|
add: "/userShift/userShift/addUserShift",
|
|
|
userShift: "/userShift/userShift/queryByUser",
|
|
|
shift: "/shift/shift/list",
|
|
|
- list: "/userShift/userShift/queryMothByUser",
|
|
|
+ list: "/sys/user/queryMothByUser",
|
|
|
moth: "/userShift/userShift/queryMothByUser",
|
|
|
deptlist: "/sys/sysDepart/listAll",
|
|
|
delUserShift: '/userShift/userShift/delete'
|
|
@@ -267,14 +267,92 @@
|
|
|
this.getListData(moment(this.queryParam.entryDate).format('YYYY-MM-DD HH:mm:ss'));
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
+ queryUserShifts(){
|
|
|
+ this.queryParam.shiftDate=moment(new Date()).format('YYYY-MM-DD HH:mm:ss');
|
|
|
+ this.$options.methods.searchQuery.call(this);
|
|
|
+ },
|
|
|
|
|
|
shiftOk() {
|
|
|
if (this.shiftname == null || this.shiftname == "") {
|
|
|
this.$message.warning("请选择班次!");
|
|
|
return;
|
|
|
- }
|
|
|
-
|
|
|
+ }else if (this.shiftname=="a"){
|
|
|
+ var shiftid="";
|
|
|
+ if (this.key == 1) {
|
|
|
+ shiftid=this.dataSource[this.index].a1;
|
|
|
+ } else if (this.key == 2) {
|
|
|
+ shiftid=this.dataSource[this.index].a2;
|
|
|
+ } else if (this.key == 3) {
|
|
|
+ shiftid= this.dataSource[this.index].a3;
|
|
|
+ } else if (this.key == 4) {
|
|
|
+ shiftid= this.dataSource[this.index].a4;
|
|
|
+ } else if (this.key == 5) {
|
|
|
+ shiftid= this.dataSource[this.index].a5;
|
|
|
+ } else if (this.key == 6) {
|
|
|
+ shiftid= this.dataSource[this.index].a6;
|
|
|
+ } else if (this.key == 7) {
|
|
|
+ shiftid= this.dataSource[this.index].a7;
|
|
|
+ } else if (this.key == 8) {
|
|
|
+ shiftid=this.dataSource[this.index].a8;
|
|
|
+ } else if (this.key == 9) {
|
|
|
+ shiftid= this.dataSource[this.index].a9;
|
|
|
+ } else if (this.key == 10) {
|
|
|
+ shiftid=this.dataSource[this.index].a10;
|
|
|
+ } else if (this.key == 11) {
|
|
|
+ shiftid= this.dataSource[this.index].a11;
|
|
|
+ } else if (this.key == 12) {
|
|
|
+ shiftid=this.dataSource[this.index].a12;
|
|
|
+ } else if (this.key == 13) {
|
|
|
+ shiftid=this.dataSource[this.index].a13;
|
|
|
+ } else if (this.key == 14) {
|
|
|
+ shiftid=this.dataSource[this.index].a14;
|
|
|
+ } else if (this.key == 15) {
|
|
|
+ shiftid=this.dataSource[this.index].a15;
|
|
|
+ } else if (this.key == 16) {
|
|
|
+ shiftid=this.dataSource[this.index].a16;
|
|
|
+ } else if (this.key == 17) {
|
|
|
+ shiftid=this.dataSource[this.index].a17;
|
|
|
+ } else if (this.key == 18) {
|
|
|
+ shiftid=this.dataSource[this.index].a18;
|
|
|
+ } else if (this.key == 19) {
|
|
|
+ shiftid=this.dataSource[this.index].a19;
|
|
|
+ } else if (this.key == 20) {
|
|
|
+ shiftid= this.dataSource[this.index].a20;
|
|
|
+ } else if (this.key == 21) {
|
|
|
+ shiftid=this.dataSource[this.index].a21;
|
|
|
+ } else if (this.key == 22) {
|
|
|
+ shiftid=this.dataSource[this.index].a22;
|
|
|
+ } else if (this.key == 23) {
|
|
|
+ shiftid=this.dataSource[this.index].a23;
|
|
|
+ } else if (this.key == 24) {
|
|
|
+ shiftid= this.dataSource[this.index].a24;
|
|
|
+ } else if (this.key == 25) {
|
|
|
+ shiftid=this.dataSource[this.index].a25;
|
|
|
+ } else if (this.key == 26) {
|
|
|
+ shiftid=this.dataSource[this.index].a26;
|
|
|
+ } else if (this.key == 27) {
|
|
|
+ shiftid=this.dataSource[this.index].a27;
|
|
|
+ } else if (this.key == 28) {
|
|
|
+ shiftid=this.dataSource[this.index].a28;
|
|
|
+ } else if (this.key == 29) {
|
|
|
+ shiftid=this.dataSource[this.index].a29;
|
|
|
+ } else if (this.key == 30) {
|
|
|
+ shiftid= this.dataSource[this.index].a30;
|
|
|
+ } else if (this.key == 31) {
|
|
|
+ shiftid=this.dataSource[this.index].a31;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(shiftid!=null &&shiftid!=""){
|
|
|
+ deleteAction(this.url.delUserShift, {
|
|
|
+ id: this.dataSource[this.index].id,
|
|
|
+ date:this.shiftDate
|
|
|
+ }).then((res) => {
|
|
|
+ if(res.success){
|
|
|
+ this.$options.methods.searchQuery.call(this)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }else{
|
|
|
for (var i = 0; i < this.shiftlist.length; i++) {
|
|
|
if (this.shiftname == this.shiftlist[i].id) {
|
|
|
httpAction(this.url.add, {
|
|
@@ -283,77 +361,12 @@
|
|
|
shiftDate: this.shiftDate
|
|
|
}, "post").then((res) => {
|
|
|
if (res.success) {
|
|
|
-
|
|
|
+ this.$options.methods.searchQuery.call(this)
|
|
|
}
|
|
|
})
|
|
|
- if (this.key == 1) {
|
|
|
- this.dataSource[this.index].a1 = this.shiftlist[i].name;
|
|
|
- } else if (this.key == 2) {
|
|
|
- this.dataSource[this.index].a2 = this.shiftlist[i].name;
|
|
|
- } else if (this.key == 3) {
|
|
|
- this.dataSource[this.index].a3 = this.shiftlist[i].name;
|
|
|
- } else if (this.key == 4) {
|
|
|
- this.dataSource[this.index].a4 = this.shiftlist[i].name;
|
|
|
- } else if (this.key == 5) {
|
|
|
- this.dataSource[this.index].a5 = this.shiftlist[i].name;
|
|
|
- } else if (this.key == 6) {
|
|
|
- this.dataSource[this.index].a6 = this.shiftlist[i].name;
|
|
|
- } else if (this.key == 7) {
|
|
|
- this.dataSource[this.index].a7 = this.shiftlist[i].name;
|
|
|
- } else if (this.key == 8) {
|
|
|
- this.dataSource[this.index].a8 = this.shiftlist[i].name;
|
|
|
- } else if (this.key == 9) {
|
|
|
- this.dataSource[this.index].a9 = this.shiftlist[i].name;
|
|
|
- } else if (this.key == 10) {
|
|
|
- this.dataSource[this.index].a10 = this.shiftlist[i].name;
|
|
|
- } else if (this.key == 11) {
|
|
|
- this.dataSource[this.index].a11 = this.shiftlist[i].name;
|
|
|
- } else if (this.key == 12) {
|
|
|
- this.dataSource[this.index].a12 = this.shiftlist[i].name;
|
|
|
- } else if (this.key == 13) {
|
|
|
- this.dataSource[this.index].a13 = this.shiftlist[i].name;
|
|
|
- } else if (this.key == 14) {
|
|
|
- this.dataSource[this.index].a14 = this.shiftlist[i].name;
|
|
|
- } else if (this.key == 15) {
|
|
|
- this.dataSource[this.index].a15 = this.shiftlist[i].name;
|
|
|
- } else if (this.key == 16) {
|
|
|
- this.dataSource[this.index].a16 = this.shiftlist[i].name;
|
|
|
- } else if (this.key == 17) {
|
|
|
- this.dataSource[this.index].a17 = this.shiftlist[i].name;
|
|
|
- } else if (this.key == 18) {
|
|
|
- this.dataSource[this.index].a18 = this.shiftlist[i].name;
|
|
|
- } else if (this.key == 19) {
|
|
|
- this.dataSource[this.index].a19 = this.shiftlist[i].name;
|
|
|
- } else if (this.key == 20) {
|
|
|
- this.dataSource[this.index].a20 = this.shiftlist[i].name;
|
|
|
- } else if (this.key == 21) {
|
|
|
- this.dataSource[this.index].a21 = this.shiftlist[i].name;
|
|
|
- } else if (this.key == 22) {
|
|
|
- this.dataSource[this.index].a22 = this.shiftlist[i].name;
|
|
|
- } else if (this.key == 23) {
|
|
|
- this.dataSource[this.index].a23 = this.shiftlist[i].name;
|
|
|
- } else if (this.key == 24) {
|
|
|
- this.dataSource[this.index].a24 = this.shiftlist[i].name;
|
|
|
- } else if (this.key == 25) {
|
|
|
- this.dataSource[this.index].a25 = this.shiftlist[i].name;
|
|
|
- } else if (this.key == 26) {
|
|
|
- this.dataSource[this.index].a26 = this.shiftlist[i].name;
|
|
|
- } else if (this.key == 27) {
|
|
|
- this.dataSource[this.index].a27 = this.shiftlist[i].name;
|
|
|
- } else if (this.key == 28) {
|
|
|
- this.dataSource[this.index].a28 = this.shiftlist[i].name;
|
|
|
- } else if (this.key == 29) {
|
|
|
- this.dataSource[this.index].a29 = this.shiftlist[i].name;
|
|
|
- } else if (this.key == 30) {
|
|
|
- this.dataSource[this.index].a30 = this.shiftlist[i].name;
|
|
|
- } else if (this.key == 31) {
|
|
|
- this.dataSource[this.index].a31 = this.shiftlist[i].name;
|
|
|
- }
|
|
|
-
|
|
|
- this.dataSource[this.index].shfitid = this.shiftlist[i].id;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+}
|
|
|
this.visibles = false;
|
|
|
},
|
|
|
|