This commit is contained in:
许允枞 2024-09-14 14:36:06 +08:00
parent d0b3a9d1bd
commit ac4d6eb764

View File

@ -2,35 +2,38 @@
<div class="app-containers">
<div class="tab-box">
<div class="tab_" :class="{active:index== tabindex }" @click="getindex(index)" v-for="(item,index) in tabs" :key="index">
<div class="tab_" :class="{active:index== tabindex }" @click="getindex(index)" v-for="(item,index) in tabs"
:key="index">
{{ item }}
</div>
</div>
<div v-if="tabindex == 0">
<div class="card-box" style="width: 98%;margin: 10px auto;background: #fff;box-sizing: border-box;padding-top: 15px" >
<div class="card-box"
style="width: 98%;margin: 10px auto;background: #fff;box-sizing: border-box;padding-top: 15px">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="100px">
<el-form-item label="" prop="status">
<el-select v-model="queryParams.status" style="width: 150px" placeholder="交班方式" clearable>
<el-select v-model="queryParams.status" style="width: 150px" placeholder="交班方式" clearable
@change="onChange">
<el-option label="统一交班" value="统一交班">统一交班</el-option>
<el-option label="个人交班" value="个人交班">个人交班</el-option>
</el-select>
</el-form-item>
<el-form-item label="" prop="staffId">
<el-select v-model="queryParams.staffId" style="width: 150px" placeholder="交班员工" clearable>
<el-select v-model="queryParams.staffId" style="width: 150px" placeholder="交班员工" clearable @change="onChange2">
<el-option
v-for="option in staffList"
:key="option.id"
:label="option.realName"
:value="option.id"
:disabled="queryParams.status === '统一交班'"
></el-option>
</el-select>
</el-form-item>
<el-form-item class="flex-container" style="float: right">
<el-button type="primary" icon="el-icon-search" :disabled="!queryParams.staffId" @click="handleQuery">搜索</el-button>
<el-button type="primary" icon="el-icon-search" :disabled="!isSearch" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
@ -345,7 +348,8 @@
</div>
</el-card>
<div style="width: 98%; margin: 20px auto;display: flex;align-items: center;justify-content: center; background: #fff;box-sizing: border-box;padding: 15px " >
<div
style="width: 98%; margin: 20px auto;display: flex;align-items: center;justify-content: center; background: #fff;box-sizing: border-box;padding: 15px ">
<el-button type="primary" @click="shift()">交班</el-button>
</div>
</div>
@ -386,6 +390,7 @@ export default {
"交接班",
"交班记录"
],
isSearch: true,
value: '',
tabindex: 0,
openDetail: false,
@ -456,6 +461,22 @@ export default {
console.log("this.handoverList", this.handoverList)
})
},
onChange() {
if (this.queryParams.status == '统一交班') {
this.queryParams.staffId = ''
this.isSearch = true
} else if (this.queryParams.status == '个人交班') {
this.isSearch = false
}
},
onChange2() {
console.log("this.queryParams.staffId", this.queryParams.staffId)
if (!this.queryParams.staffId) {
this.isSearch = false
} else if (this.queryParams.staffId) {
this.isSearch = true
}
},
getindex(index) {
this.tabindex = index
@ -525,14 +546,17 @@ export default {
})
})
},
handleUpdate(){},
handleUpdate() {
},
handleQuery() {
this.getList();
this.getHandover();
},
getStaffList() {
listStaff(this.addDateRange({ page: 1,
pageSize: 10000})).then(response => {
listStaff(this.addDateRange({
page: 1,
pageSize: 10000
})).then(response => {
this.staffList = response.data.records;
}
@ -615,6 +639,7 @@ export default {
box-sizing: border-box;
padding-bottom: 20px;
}
.tab-box {
width: 100%;
background: #fff;
@ -624,10 +649,12 @@ export default {
margin-bottom: 25px;
}
.box_ {
height: 100%;
border-bottom: 2px solid #fe9554;
}
.box {
padding: 10px;
height: 80px;
@ -641,24 +668,28 @@ export default {
align-items: left;
text-align: left;
}
.box-card {
width: 640px;
margin: 0 auto;
margin-bottom: 15px;
}
.font-chinese {
font-size: 15px;
font-family: Microsoft YaHei;
font-weight: bold;
line-height: 1.5
}
.font-number {
font-size: 20px;
font-family: PingFang SC, sans-serif;
font-weight: bold;
line-height: 1.3
}
.table-box {
width: 100%;
}
@ -670,9 +701,11 @@ export default {
flex-wrap: nowrap; /* 确保不换行 */
width: 100%; /* 让父容器占满可用宽度 */
}
.el-form--inline .el-form-item {
margin-right: 44px;
}
.tab-box {
width: 100%;
height: 40px;
@ -682,6 +715,7 @@ export default {
margin-bottom: 25px;
}
.tab_ {
width: 75px;
height: 100%;
@ -695,16 +729,19 @@ export default {
margin-left: 50px;
cursor: pointer;
}
.active {
border-bottom: 2px solid #FF770F !important;
color: #FF770F !important;
}
.title_ {
text-align: center;
font-weight: 600;
font-size: 16px;
color: #333333;
}
.d-s-b {
width: 100%;
display: flex;
@ -715,14 +752,17 @@ export default {
color: #333333;
margin: 20px auto;
}
.xxing {
width: 100%;
border-bottom: 1px solid #EEEEEE;
}
.for-box {
width: 100%;
margin: 20px auto;
}
.for-title {
display: flex;
align-items: center;
@ -732,11 +772,13 @@ export default {
color: #333333;
}
.x- {
width: 100px;
border-bottom: 1px solid #EEEEEE;
margin: 0 15px;
}
.f-size {
width: 33%;
text-align: center;
@ -744,21 +786,26 @@ export default {
font-size: 16px;
color: #333333;
}
.s-size {
width: 33%;
text-align: center;
}
.l-size {
width: 33%;
text-align: left;
}
.r-size {
width: 33%;
text-align: right;
}
.bottom- {
width: 98%;
}
.table-boxs {
border-radius: 8px;
width: 98%;