This commit is contained in:
parent
2f675cea74
commit
85e2dcfa84
|
|
@ -217,7 +217,7 @@ export default {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => [],
|
default: () => [],
|
||||||
},
|
},
|
||||||
// 传递参数
|
// 传递的额外参数
|
||||||
sendParams: {
|
sendParams: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => null,
|
default: () => null,
|
||||||
|
|
@ -287,17 +287,6 @@ export default {
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
},
|
},
|
||||||
/* sendParams: {
|
|
||||||
handler(nv, ov) {
|
|
||||||
console.log(nv, ov)
|
|
||||||
if(nv !== ov) {
|
|
||||||
Object.assign(this.queryParams, nv)
|
|
||||||
this.getTableList()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
deep: true,
|
|
||||||
immediate: true
|
|
||||||
} */
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -327,8 +316,10 @@ export default {
|
||||||
columnCheckList: [],
|
columnCheckList: [],
|
||||||
// 操作列最小宽度
|
// 操作列最小宽度
|
||||||
dynamicWidth: 0,
|
dynamicWidth: 0,
|
||||||
|
// 自增id
|
||||||
idCount: 1,
|
idCount: 1,
|
||||||
typeList: [], // 日期查询条件
|
// 日期查询条件 字段名称
|
||||||
|
typeList: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -342,9 +333,6 @@ export default {
|
||||||
if (e.f_type === 'dateRange') {
|
if (e.f_type === 'dateRange') {
|
||||||
this.$set(this.queryParams, e.dateType[0], '')
|
this.$set(this.queryParams, e.dateType[0], '')
|
||||||
this.$set(this.queryParams, e.dateType[1], '')
|
this.$set(this.queryParams, e.dateType[1], '')
|
||||||
|
|
||||||
console.log(e.dateType, 'e.dateType')
|
|
||||||
console.log(this.queryParams, 'this.queryParams')
|
|
||||||
this.typeList = e.dateType
|
this.typeList = e.dateType
|
||||||
} else {
|
} else {
|
||||||
this.$set(this.queryParams, e.f_model, '')
|
this.$set(this.queryParams, e.f_model, '')
|
||||||
|
|
@ -377,14 +365,13 @@ export default {
|
||||||
|
|
||||||
const params = { ...this.queryParams }
|
const params = { ...this.queryParams }
|
||||||
const queryParams = JSON.parse(JSON.stringify(params))
|
const queryParams = JSON.parse(JSON.stringify(params))
|
||||||
console.log(this.queryParams, 'queryParams')
|
delete queryParams.time // 剔除无关参数
|
||||||
delete queryParams.time
|
// console.log(
|
||||||
console.log(
|
// `%c🔍 列表查询入参 %c`,
|
||||||
`%c🔍 列表查询入参 %c`,
|
// 'background: linear-gradient(90deg, #FF6B6B, #4ECDC4); color: white; padding: 5px 10px; border-radius: 5px; font-weight: bold;',
|
||||||
'background: linear-gradient(90deg, #FF6B6B, #4ECDC4); color: white; padding: 5px 10px; border-radius: 5px; font-weight: bold;',
|
// '',
|
||||||
'',
|
// queryParams,
|
||||||
queryParams,
|
// )
|
||||||
)
|
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const res = await this.requestApi(queryParams)
|
const res = await this.requestApi(queryParams)
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
|
@ -405,12 +392,12 @@ export default {
|
||||||
/** 重置按钮 */
|
/** 重置按钮 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.$refs.queryFormRef.resetFields()
|
this.$refs.queryFormRef.resetFields()
|
||||||
if (this.typeList.length > 0) {
|
if (this.typeList.length > 1) {
|
||||||
this.queryParams[this.typeList[0]] = ''
|
this.queryParams[this.typeList[0]] = ''
|
||||||
this.queryParams[this.typeList[1]] = ''
|
this.queryParams[this.typeList[1]] = ''
|
||||||
this.queryParams.time = []
|
this.queryParams.time = []
|
||||||
} else {
|
} else {
|
||||||
this.queryParams[this.typeList] = ''
|
this.queryParams[this.typeList[0]] = ''
|
||||||
}
|
}
|
||||||
this.queryParams.pageNum = 1
|
this.queryParams.pageNum = 1
|
||||||
this.queryParams.pageSize = 10
|
this.queryParams.pageSize = 10
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,13 @@
|
||||||
|
import {
|
||||||
|
getCompanySelectListAPI,
|
||||||
|
getSubCompanySelectListAPI,
|
||||||
|
getPostTypeSelectListAPI,
|
||||||
|
getMainProjectListAllAPI,
|
||||||
|
getLotProjectSelectListAPI,
|
||||||
|
getSubSelectListAPI,
|
||||||
|
getTeamSelectListAPI,
|
||||||
|
} from '@/api/common'
|
||||||
|
|
||||||
const common = {
|
const common = {
|
||||||
state: {
|
state: {
|
||||||
// 公司下拉列表
|
// 公司下拉列表
|
||||||
|
|
@ -38,6 +48,64 @@ const common = {
|
||||||
state.postTypeSelectList = postTypeSelectList
|
state.postTypeSelectList = postTypeSelectList
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
actions: {
|
||||||
|
// 更新公司下拉列表
|
||||||
|
async getCompanySelectList({ commit }) {
|
||||||
|
const res = await getCompanySelectListAPI()
|
||||||
|
if (res.code === 200) {
|
||||||
|
commit('SET_COMPANY_SELECT_LIST', res.rows)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 更新分公司下拉列表
|
||||||
|
async getSubCompanySelectList({ commit }) {
|
||||||
|
const res = await getSubCompanySelectListAPI()
|
||||||
|
if (res.code === 200) {
|
||||||
|
commit('SET_SUB_COMPANY_SELECT_LIST', res.rows)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 更新总包工程下拉列表
|
||||||
|
async getMainProjectList({ commit }) {
|
||||||
|
const res = await getMainProjectListAllAPI()
|
||||||
|
if (res.code === 200) {
|
||||||
|
commit('SET_MAIN_PROJECT_LIST', res.rows)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 更新标段工程下拉列表
|
||||||
|
async getLotProjectSelectList({ commit }) {
|
||||||
|
const res = await getLotProjectSelectListAPI()
|
||||||
|
if (res.code === 200) {
|
||||||
|
commit('SET_LOT_PROJECT_SELECT_LIST', res.rows)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 更新分包商下拉列表
|
||||||
|
async getSubSelectList({ commit }) {
|
||||||
|
const res = await getSubSelectListAPI()
|
||||||
|
if (res.code === 200) {
|
||||||
|
commit('SET_SUB_SELECT_LIST', res.rows)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 更新班组下拉列表
|
||||||
|
async getTeamSelectList({ commit }) {
|
||||||
|
const res = await getTeamSelectListAPI()
|
||||||
|
if (res.code === 200) {
|
||||||
|
commit('SET_TEAM_SELECT_LIST', res.rows)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 更新工种下拉列表
|
||||||
|
async getPostTypeSelectList({ commit }) {
|
||||||
|
const res = await getPostTypeSelectListAPI()
|
||||||
|
if (res.code === 200) {
|
||||||
|
commit('SET_POST_TYPE_SELECT_LIST', res.rows)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export default common
|
export default common
|
||||||
|
|
|
||||||
|
|
@ -285,6 +285,8 @@ export default {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.$modal.msgSuccess('删除成功')
|
this.$modal.msgSuccess('删除成功')
|
||||||
this.$refs.allProjectTableRef.getTableList() // 更新列表
|
this.$refs.allProjectTableRef.getTableList() // 更新列表
|
||||||
|
// 更新store中的总包工程列表
|
||||||
|
this.$store.dispatch('getMainProjectList')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
|
@ -312,6 +314,9 @@ export default {
|
||||||
)
|
)
|
||||||
this.handleCloseDialogOuter()
|
this.handleCloseDialogOuter()
|
||||||
this.$refs.allProjectTableRef.getTableList() // 更新列表
|
this.$refs.allProjectTableRef.getTableList() // 更新列表
|
||||||
|
|
||||||
|
// 更新store中的总包工程列表
|
||||||
|
this.$store.dispatch('getMainProjectList')
|
||||||
} else {
|
} else {
|
||||||
this.$modal.msgError(res.msg)
|
this.$modal.msgError(res.msg)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -314,6 +314,8 @@ export default {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.$modal.msgSuccess('删除成功')
|
this.$modal.msgSuccess('删除成功')
|
||||||
this.$refs.deptProjectTableRef.getTableList() // 更新列表
|
this.$refs.deptProjectTableRef.getTableList() // 更新列表
|
||||||
|
// 更新store中的分公司列表
|
||||||
|
this.$store.dispatch('getSubCompanySelectList')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
|
@ -343,6 +345,9 @@ export default {
|
||||||
)
|
)
|
||||||
this.handleCloseDialogOuter()
|
this.handleCloseDialogOuter()
|
||||||
this.$refs.deptProjectTableRef.getTableList() // 更新列表
|
this.$refs.deptProjectTableRef.getTableList() // 更新列表
|
||||||
|
|
||||||
|
// 更新store中的分公司列表
|
||||||
|
this.$store.dispatch('getSubCompanySelectList')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -438,6 +438,9 @@ export default {
|
||||||
this.$modal.msgSuccess(
|
this.$modal.msgSuccess(
|
||||||
this.formType === 1 ? '新增成功' : '修改成功',
|
this.formType === 1 ? '新增成功' : '修改成功',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// 更新store中的标段工程下拉列表
|
||||||
|
this.$store.dispatch('getLotProjectSelectList')
|
||||||
} else {
|
} else {
|
||||||
reject(new Error(res.msg))
|
reject(new Error(res.msg))
|
||||||
this.$modal.msgError(res.msg)
|
this.$modal.msgError(res.msg)
|
||||||
|
|
|
||||||
|
|
@ -212,6 +212,8 @@ export default {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.$modal.msgSuccess('删除成功')
|
this.$modal.msgSuccess('删除成功')
|
||||||
this.$refs.lotProjectTableRef.getTableList() // 更新列表
|
this.$refs.lotProjectTableRef.getTableList() // 更新列表
|
||||||
|
// 更新store中的标段工程下拉列表
|
||||||
|
this.$store.dispatch('getLotProjectSelectList')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
|
|
||||||
|
|
@ -312,6 +312,9 @@ export default {
|
||||||
this.$modal.msgSuccess(
|
this.$modal.msgSuccess(
|
||||||
this.formType === 1 ? '新增成功' : '修改成功',
|
this.formType === 1 ? '新增成功' : '修改成功',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// 更新store中的分包商下拉列表
|
||||||
|
this.$store.dispatch('getSubSelectList')
|
||||||
resolve()
|
resolve()
|
||||||
} else {
|
} else {
|
||||||
this.$modal.msgError(res.meg)
|
this.$modal.msgError(res.meg)
|
||||||
|
|
|
||||||
|
|
@ -201,6 +201,8 @@ export default {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.$modal.msgSuccess('删除成功')
|
this.$modal.msgSuccess('删除成功')
|
||||||
this.$refs.subBaseInfoTableRef.getTableList() // 更新列表
|
this.$refs.subBaseInfoTableRef.getTableList() // 更新列表
|
||||||
|
// 更新store中的分包商下拉列表
|
||||||
|
this.$store.dispatch('getSubSelectList')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
|
|
||||||
|
|
@ -157,6 +157,9 @@ export default {
|
||||||
this.addOrEditForm.id ? '修改成功' : '新增成功',
|
this.addOrEditForm.id ? '修改成功' : '新增成功',
|
||||||
)
|
)
|
||||||
resolve()
|
resolve()
|
||||||
|
|
||||||
|
// 更新store中的班组下拉列表
|
||||||
|
this.$store.dispatch('getTeamSelectList')
|
||||||
} else {
|
} else {
|
||||||
this.$modal.msgError(res.msg)
|
this.$modal.msgError(res.msg)
|
||||||
reject(new Error(res.msg))
|
reject(new Error(res.msg))
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,7 @@ export default {
|
||||||
|
|
||||||
// 删除
|
// 删除
|
||||||
onHandleDeleteSubBaseInfo(data) {
|
onHandleDeleteSubBaseInfo(data) {
|
||||||
this.$confirm('确定删除该工程吗?', '温馨提示', {
|
this.$confirm('确定删除该班组吗?', '温馨提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
|
|
@ -154,6 +154,8 @@ export default {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.$modal.msgSuccess('删除成功')
|
this.$modal.msgSuccess('删除成功')
|
||||||
this.$refs.teamBaseInfoTableRef.getTableList() // 更新列表
|
this.$refs.teamBaseInfoTableRef.getTableList() // 更新列表
|
||||||
|
// 更新store中的班组下拉列表
|
||||||
|
this.$store.dispatch('getTeamSelectList')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,285 @@
|
||||||
|
<template>
|
||||||
|
<div style="width: 100%">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="20">
|
||||||
|
<TitleTip
|
||||||
|
borderBottom="none"
|
||||||
|
padding="24px 10px"
|
||||||
|
titleText="补卡人员清单"
|
||||||
|
justifyContent="flex-start"
|
||||||
|
>
|
||||||
|
<template name="right">
|
||||||
|
<span>{{ selectProjectName }}</span>
|
||||||
|
</template>
|
||||||
|
</TitleTip>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
size="mini"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
@click="handleSelectPerson"
|
||||||
|
>
|
||||||
|
选择补卡人员
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table :data="tableData">
|
||||||
|
<el-table-column align="center" label="姓名" prop="name" />
|
||||||
|
<el-table-column align="center" label="身份证" prop="idNumber" />
|
||||||
|
<el-table-column align="center" label="补卡天数" prop="repairDay" />
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
width="300"
|
||||||
|
label="补卡日期"
|
||||||
|
prop="repairDate"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column align="center" label="补卡工程" prop="proName" />
|
||||||
|
<el-table-column align="center" label="联系方式" prop="phone" />
|
||||||
|
<el-table-column align="center" label="所属班组" prop="teamName" />
|
||||||
|
<el-table-column align="center" label="操作" width="160">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="onHandleEdit(scope.row)"
|
||||||
|
>
|
||||||
|
修改
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
style="color: #f56c6c"
|
||||||
|
@click="onHandleDelete($scope.index, scope)"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<TitleTip
|
||||||
|
borderBottom="none"
|
||||||
|
padding="24px 10px"
|
||||||
|
titleText="补卡说明"
|
||||||
|
justifyContent="flex-start"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<el-form
|
||||||
|
label-width="140px"
|
||||||
|
ref="addOrEditFormRef"
|
||||||
|
:model="addApplyForm"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="补卡说明" prop="repairRemark">
|
||||||
|
<el-input
|
||||||
|
clearable
|
||||||
|
maxlength="30"
|
||||||
|
type="textarea"
|
||||||
|
show-word-limit
|
||||||
|
placeholder="请输入考勤机编码"
|
||||||
|
v-model="addParams.repairRemark"
|
||||||
|
:autosize="{ minRows: 4, maxRows: 8 }"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="附件">
|
||||||
|
<UploadFileFormData
|
||||||
|
:limit="3"
|
||||||
|
:file-size="20"
|
||||||
|
:multiple="true"
|
||||||
|
uploadTip="补卡说明附件上传"
|
||||||
|
:file-list.sync="addParams.fileList"
|
||||||
|
:file-type="[
|
||||||
|
'jpg',
|
||||||
|
'png',
|
||||||
|
'jpeg',
|
||||||
|
'pdf',
|
||||||
|
'doc',
|
||||||
|
'docx',
|
||||||
|
]"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<DialogModel
|
||||||
|
:dialogConfig="dialogConfig"
|
||||||
|
@closeDialogOuter="handleCloseDialogOuter"
|
||||||
|
>
|
||||||
|
<template slot="outerContent">
|
||||||
|
<SelectPersonAndDate
|
||||||
|
:editRow="editRow"
|
||||||
|
ref="selectPersonAndDateRef"
|
||||||
|
@onPersonSubmit="onPersonSubmit"
|
||||||
|
:selectProjectId="selectProjectId"
|
||||||
|
:selectProjectName="selectProjectName"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<el-row class="dialog-footer-btn">
|
||||||
|
<el-button size="medium" @click="handleCloseDialogOuter">
|
||||||
|
取消
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
size="medium"
|
||||||
|
type="primary"
|
||||||
|
@click="onHandleConfirm"
|
||||||
|
>
|
||||||
|
确定
|
||||||
|
</el-button>
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
|
</DialogModel>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import DialogModel from '@/components/DialogModel'
|
||||||
|
import UploadFileFormData from '@/components/UploadFileFormData'
|
||||||
|
import SelectPersonAndDate from './select-person-and-date.vue'
|
||||||
|
import { addCardReplacementApplyAPI } from '@/api/construction-person/attendance-manage/card-replacement-apply'
|
||||||
|
export default {
|
||||||
|
name: 'AddApplyForm',
|
||||||
|
props: {
|
||||||
|
selectProjectName: {
|
||||||
|
type: String,
|
||||||
|
default: () => '',
|
||||||
|
},
|
||||||
|
selectProjectId: {
|
||||||
|
type: [Number, String],
|
||||||
|
default: () => '',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
DialogModel,
|
||||||
|
SelectPersonAndDate,
|
||||||
|
UploadFileFormData,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
addApplyForm: {
|
||||||
|
reason: '',
|
||||||
|
},
|
||||||
|
dialogConfig: {
|
||||||
|
outerTitle: '选择补卡人员以及补卡日期',
|
||||||
|
outerWidth: '',
|
||||||
|
minHeight: '90vh',
|
||||||
|
maxHeight: '90vh',
|
||||||
|
outerVisible: false,
|
||||||
|
},
|
||||||
|
tableData: [],
|
||||||
|
|
||||||
|
addParams: {
|
||||||
|
// proId: '', // 工程id
|
||||||
|
// repairNum: '', // 补卡人数
|
||||||
|
// repairDay: '', // 补卡天数
|
||||||
|
repairRemark: '', // 补卡说明
|
||||||
|
repairMonth: '2025-08', // 补卡月份
|
||||||
|
repairCardRecords: [],
|
||||||
|
fileList: [],
|
||||||
|
},
|
||||||
|
|
||||||
|
editRow: {}, // 修改时的当前行数据
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleSelectPerson() {
|
||||||
|
// console.log(this.addApplyForm)
|
||||||
|
this.dialogConfig.outerVisible = true
|
||||||
|
},
|
||||||
|
handleCloseDialogOuter() {
|
||||||
|
this.dialogConfig.outerVisible = false
|
||||||
|
},
|
||||||
|
|
||||||
|
// 确定按钮 ---- 日期已确定,人员已确定
|
||||||
|
onHandleConfirm() {
|
||||||
|
this.$refs.selectPersonAndDateRef.onPersonSubmit()
|
||||||
|
this.dialogConfig.outerVisible = false
|
||||||
|
},
|
||||||
|
|
||||||
|
// 人员选择成功
|
||||||
|
onPersonSubmit(val) {
|
||||||
|
// 已经选中的数据
|
||||||
|
if (val && val.length > 0) {
|
||||||
|
val.forEach((item) => {
|
||||||
|
console.log(item, 'item----')
|
||||||
|
this.tableData.push(item)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 修改按钮
|
||||||
|
onHandleEdit(row) {
|
||||||
|
console.log(row)
|
||||||
|
this.editRow = row
|
||||||
|
this.dialogConfig.outerTitle = '修改补卡人员以及补卡日期'
|
||||||
|
this.dialogConfig.outerVisible = true
|
||||||
|
},
|
||||||
|
|
||||||
|
// 删除
|
||||||
|
onHandleDelete(index, row) {
|
||||||
|
this.tableData.splice(index, 1)
|
||||||
|
},
|
||||||
|
|
||||||
|
// 补卡信息接口新增
|
||||||
|
async onHandleConfirmFinishFun() {
|
||||||
|
return new Promise(async (resolve, reject) => {
|
||||||
|
// 组装参数
|
||||||
|
const { repairMonth, repairRemark, fileList } = this.addParams
|
||||||
|
const repairNum = this.tableData.length
|
||||||
|
const formData = new FormData()
|
||||||
|
const fileMsg = []
|
||||||
|
const repairDay = this.tableData.reduce((acc, curr) => {
|
||||||
|
return acc + curr.repairDay
|
||||||
|
}, 0)
|
||||||
|
const params = {
|
||||||
|
proId: this.selectProjectId,
|
||||||
|
repairMonth,
|
||||||
|
repairRemark,
|
||||||
|
repairNum,
|
||||||
|
repairDay,
|
||||||
|
repairCardRecords: this.tableData.map((e) => {
|
||||||
|
return {
|
||||||
|
name: e.name,
|
||||||
|
phone: e.phone,
|
||||||
|
proId: e.proId,
|
||||||
|
teamId: e.teamId,
|
||||||
|
idNumber: e.idNumber,
|
||||||
|
workerId: e.workerId,
|
||||||
|
repairDay: e.repairDay,
|
||||||
|
repairDate: e.repairDate,
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fileList.length > 0) {
|
||||||
|
fileList.forEach((e) => {
|
||||||
|
fileMsg.push({
|
||||||
|
type: 1,
|
||||||
|
name: '附件',
|
||||||
|
})
|
||||||
|
|
||||||
|
formData.append('file', e.raw)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
formData.append('fileMsg', JSON.stringify(fileMsg))
|
||||||
|
formData.append('params', JSON.stringify(params))
|
||||||
|
const res = await addCardReplacementApplyAPI(formData)
|
||||||
|
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.$modal.msgSuccess('补卡信息新增成功')
|
||||||
|
resolve()
|
||||||
|
} else {
|
||||||
|
this.$modal.msgError(res.msg)
|
||||||
|
reject()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
@ -73,6 +73,19 @@
|
||||||
'docx',
|
'docx',
|
||||||
]"
|
]"
|
||||||
/> -->
|
/> -->
|
||||||
|
|
||||||
|
<el-row v-for="item in fileList" :key="item.id">
|
||||||
|
<el-col :span="20">
|
||||||
|
<el-tag>{{ item.originFileName }}</el-tag>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<span
|
||||||
|
class="cursor-blue"
|
||||||
|
@click="onHandleDownload(item)"
|
||||||
|
>下载</span
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -97,10 +110,10 @@ export default {
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tableData: [],
|
tableData: [], // 补卡人员清单
|
||||||
|
fileList: [], // 附件
|
||||||
detailsParams: {
|
detailsParams: {
|
||||||
repairRemark: '', // 补卡说明
|
repairRemark: '', // 补卡说明
|
||||||
fileList: [],
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -112,6 +125,12 @@ export default {
|
||||||
})
|
})
|
||||||
this.tableData = res.repairCardDetails
|
this.tableData = res.repairCardDetails
|
||||||
this.detailsParams.repairRemark = res.repairRemark
|
this.detailsParams.repairRemark = res.repairRemark
|
||||||
|
this.fileList = res.files
|
||||||
|
},
|
||||||
|
|
||||||
|
// 下载附件
|
||||||
|
onHandleDownload(item) {
|
||||||
|
window.open(item.lsUrl, '_blank')
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ export const columnsList = [
|
||||||
]
|
]
|
||||||
|
|
||||||
export const dialogConfig = {
|
export const dialogConfig = {
|
||||||
outerTitle: '',
|
outerTitle: '工程补卡详情',
|
||||||
minHeight: '90vh',
|
minHeight: '90vh',
|
||||||
maxHeight: '90vh',
|
maxHeight: '90vh',
|
||||||
outerWidth: '80%',
|
outerWidth: '80%',
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,10 @@
|
||||||
@closeDialogOuter="handleCloseDialogOuter"
|
@closeDialogOuter="handleCloseDialogOuter"
|
||||||
>
|
>
|
||||||
<template slot="outerContent">
|
<template slot="outerContent">
|
||||||
<!-- <ProjectDetails :proId="proId" /> -->
|
<ProjectDetails
|
||||||
|
:proId="proId"
|
||||||
|
:selectProjectName="selectProjectName"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</DialogModel>
|
</DialogModel>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -46,7 +49,7 @@
|
||||||
<script>
|
<script>
|
||||||
import TableModel from '@/components/TableModel'
|
import TableModel from '@/components/TableModel'
|
||||||
import DialogModel from '@/components/DialogModel'
|
import DialogModel from '@/components/DialogModel'
|
||||||
// import ProjectDetails from './project-details.vue'
|
import ProjectDetails from './project-details.vue'
|
||||||
import { formLabel, columnsList, dialogConfig } from './config'
|
import { formLabel, columnsList, dialogConfig } from './config'
|
||||||
import { getCardReplacementCountListAPI } from '@/api/construction-person/attendance-manage/card-replacement-count'
|
import { getCardReplacementCountListAPI } from '@/api/construction-person/attendance-manage/card-replacement-count'
|
||||||
import { getLotProjectSelectListCommonFun } from '@/utils/getCommonData'
|
import { getLotProjectSelectListCommonFun } from '@/utils/getCommonData'
|
||||||
|
|
@ -55,7 +58,7 @@ export default {
|
||||||
components: {
|
components: {
|
||||||
TableModel,
|
TableModel,
|
||||||
DialogModel,
|
DialogModel,
|
||||||
// ProjectDetails,
|
ProjectDetails,
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
|
|
@ -73,13 +76,13 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
// 导出按钮
|
// 导出按钮
|
||||||
onHandleExportCardReplacementCount(queryParams) {
|
onHandleExportCardReplacementCount(queryParams) {
|
||||||
// this.download(
|
this.download(
|
||||||
// '/bmw/pmAttDevice/export',
|
'/bmw/cardApply/exportCardStatistics',
|
||||||
// {
|
{
|
||||||
// ...queryParams,
|
...queryParams,
|
||||||
// },
|
},
|
||||||
// `考勤机列表.xlsx`,
|
`补卡统计列表.xlsx`,
|
||||||
// )
|
)
|
||||||
},
|
},
|
||||||
|
|
||||||
// 详情按钮
|
// 详情按钮
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,10 @@
|
||||||
>
|
>
|
||||||
导出
|
导出
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
|
<span class="tip-text">
|
||||||
|
{{ selectProjectName }}
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template slot="handle" slot-scope="{ data }">
|
<template slot="handle" slot-scope="{ data }">
|
||||||
|
|
@ -57,7 +61,12 @@
|
||||||
:dialogConfig="dialogConfig"
|
:dialogConfig="dialogConfig"
|
||||||
@closeDialogOuter="handleCloseDialogOuter"
|
@closeDialogOuter="handleCloseDialogOuter"
|
||||||
>
|
>
|
||||||
<template slot="outerContent"> </template>
|
<template slot="outerContent">
|
||||||
|
<CardReplacementDetails
|
||||||
|
:queryDetailsId="queryDetailsId"
|
||||||
|
:selectProjectName="selectProjectName"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
</DialogModel>
|
</DialogModel>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -65,7 +74,7 @@
|
||||||
<script>
|
<script>
|
||||||
import TableModel from '@/components/TableModel'
|
import TableModel from '@/components/TableModel'
|
||||||
import DialogModel from '@/components/DialogModel'
|
import DialogModel from '@/components/DialogModel'
|
||||||
import { dialogConfig } from './config'
|
import CardReplacementDetails from './card-replacement-details.vue'
|
||||||
import { getCardReplacementApplyListAPI } from '@/api/construction-person/attendance-manage/card-replacement-apply'
|
import { getCardReplacementApplyListAPI } from '@/api/construction-person/attendance-manage/card-replacement-apply'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -73,13 +82,17 @@ export default {
|
||||||
components: {
|
components: {
|
||||||
TableModel,
|
TableModel,
|
||||||
DialogModel,
|
DialogModel,
|
||||||
AuditForm,
|
CardReplacementDetails,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
proId: {
|
proId: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
default: '',
|
default: '',
|
||||||
},
|
},
|
||||||
|
selectProjectName: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
|
|
@ -116,8 +129,15 @@ export default {
|
||||||
t_props: 'checkTime',
|
t_props: 'checkTime',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
dialogConfig,
|
dialogConfig: {
|
||||||
|
outerTitle: '补卡详情',
|
||||||
|
minHeight: '90vh',
|
||||||
|
maxHeight: '90vh',
|
||||||
|
outerWidth: '80%',
|
||||||
|
outerVisible: false,
|
||||||
|
},
|
||||||
getCardReplacementApplyListAPI,
|
getCardReplacementApplyListAPI,
|
||||||
|
queryDetailsId: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -134,6 +154,7 @@ export default {
|
||||||
|
|
||||||
// 详情按钮
|
// 详情按钮
|
||||||
onHandleAuditAndDetail(data) {
|
onHandleAuditAndDetail(data) {
|
||||||
|
this.queryDetailsId = data.id
|
||||||
this.dialogConfig.outerTitle = '补卡详情'
|
this.dialogConfig.outerTitle = '补卡详情'
|
||||||
this.dialogConfig.outerVisible = true
|
this.dialogConfig.outerVisible = true
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,349 @@
|
||||||
|
<template>
|
||||||
|
<!-- 选择补卡人员及补卡日期页面 -->
|
||||||
|
<div style="width: 100%">
|
||||||
|
<el-form :model="queryPersonForm" :inline="true" size="mini">
|
||||||
|
<el-form-item prop="reason">
|
||||||
|
<el-select
|
||||||
|
style="width: 100%"
|
||||||
|
placeholder="请选择人员"
|
||||||
|
@change="onChangePerson"
|
||||||
|
v-model="queryPersonForm.selectPersonId"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
v-for="item in personOptions"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item prop="reason">
|
||||||
|
<el-date-picker
|
||||||
|
type="daterange"
|
||||||
|
style="width: 240px"
|
||||||
|
range-separator="至"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
v-model="queryPersonForm.time"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item prop="reason">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
|
>
|
||||||
|
查询
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
plain
|
||||||
|
type="warning"
|
||||||
|
icon="el-icon-refresh"
|
||||||
|
@click="resetQuery"
|
||||||
|
>
|
||||||
|
重置
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<div v-if="idNumber">
|
||||||
|
<span>
|
||||||
|
{{ name }}
|
||||||
|
</span>
|
||||||
|
<span> ({{ idNumber }}) </span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 补卡日历 -->
|
||||||
|
<div class="date-ist" v-if="cardReplacementDateList.length > 0">
|
||||||
|
<div
|
||||||
|
:key="item.currentDate"
|
||||||
|
v-for="(item, index) in cardReplacementDateList"
|
||||||
|
style="
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
style="
|
||||||
|
padding: 4px 0;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: bold;
|
||||||
|
font-family: 'PingFang SC';
|
||||||
|
"
|
||||||
|
>
|
||||||
|
{{ item.month }}月
|
||||||
|
</span>
|
||||||
|
<div
|
||||||
|
class="item"
|
||||||
|
:ref="`item${index}`"
|
||||||
|
:style="{
|
||||||
|
height: initHeight + 'px',
|
||||||
|
backgroundColor: item.inRange
|
||||||
|
? item.isActive == 1
|
||||||
|
? '#19be6b'
|
||||||
|
: '#f56c6c'
|
||||||
|
: '#999',
|
||||||
|
}"
|
||||||
|
:class="{
|
||||||
|
'item-active': item.isChecked,
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
{{ item.date }}
|
||||||
|
|
||||||
|
<el-checkbox
|
||||||
|
class="check-box-item"
|
||||||
|
v-model="item.isChecked"
|
||||||
|
v-if="item.isActive == 0 && item.inRange"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
getCardReplacementPersonListAPI,
|
||||||
|
getCardReplacementPersonCheckRecordAPI,
|
||||||
|
} from '@/api/construction-person/attendance-manage/card-replacement-apply'
|
||||||
|
export default {
|
||||||
|
name: 'SelectPersonAndDate',
|
||||||
|
props: {
|
||||||
|
selectProjectId: {
|
||||||
|
type: [Number, String],
|
||||||
|
default: () => '',
|
||||||
|
},
|
||||||
|
selectProjectName: {
|
||||||
|
type: String,
|
||||||
|
default: () => '',
|
||||||
|
},
|
||||||
|
|
||||||
|
editRow: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
// AttendanceCalendar,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
queryPersonForm: {
|
||||||
|
selectPersonId: '',
|
||||||
|
time: [
|
||||||
|
new Date().toISOString().split('T')[0],
|
||||||
|
new Date().toISOString().split('T')[0],
|
||||||
|
],
|
||||||
|
},
|
||||||
|
personOptions: [],
|
||||||
|
name: '',
|
||||||
|
idNumber: '',
|
||||||
|
workerId: '',
|
||||||
|
initHeight: 0,
|
||||||
|
// 补卡信息列表
|
||||||
|
dateList: [],
|
||||||
|
// 补卡日期列表
|
||||||
|
cardReplacementDateList: [],
|
||||||
|
// 修改时的补卡日期列表
|
||||||
|
editRepairDateList: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleCloseDialogOuter() {
|
||||||
|
this.dialogConfig.outerVisible = false
|
||||||
|
},
|
||||||
|
|
||||||
|
// 获取补卡人员列表
|
||||||
|
async getCardReplacementPersonList() {
|
||||||
|
const { data: res } = await getCardReplacementPersonListAPI({
|
||||||
|
proId: this.selectProjectId,
|
||||||
|
})
|
||||||
|
this.personOptions = res.map((item) => ({
|
||||||
|
...item,
|
||||||
|
value: item.id,
|
||||||
|
label: item.name,
|
||||||
|
}))
|
||||||
|
},
|
||||||
|
// 查询
|
||||||
|
handleQuery() {
|
||||||
|
this.getCardReplacementPersonCheckRecord()
|
||||||
|
},
|
||||||
|
|
||||||
|
resetQuery() {
|
||||||
|
this.queryPersonForm.selectPersonId = ''
|
||||||
|
this.queryPersonForm.time = [
|
||||||
|
new Date().toISOString().split('T')[0],
|
||||||
|
new Date().toISOString().split('T')[0],
|
||||||
|
]
|
||||||
|
this.getCardReplacementPersonCheckRecord()
|
||||||
|
},
|
||||||
|
|
||||||
|
// 处理数据
|
||||||
|
onPersonSubmit() {
|
||||||
|
const tempList = this.cardReplacementDateList.filter(
|
||||||
|
(item) => item.isChecked,
|
||||||
|
)
|
||||||
|
if (tempList.length > 0) {
|
||||||
|
const repairDate = tempList.map((item) => item.currentDate)
|
||||||
|
this.dateList[0].repairDate = repairDate.join(',')
|
||||||
|
this.dateList[0].repairDay = repairDate.length
|
||||||
|
|
||||||
|
this.$emit('onPersonSubmit', this.dateList)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 获取考勤记录
|
||||||
|
async getCardReplacementPersonCheckRecord() {
|
||||||
|
// const workerId = this.personOptions.find(
|
||||||
|
// (item) => item.value === this.queryPersonForm.selectPersonId,
|
||||||
|
// ).id
|
||||||
|
const { data: res } = await getCardReplacementPersonCheckRecordAPI({
|
||||||
|
workerId: this.workerId,
|
||||||
|
proId: this.selectProjectId,
|
||||||
|
startTime: this.queryPersonForm.time[0],
|
||||||
|
endTime: this.queryPersonForm.time[1],
|
||||||
|
})
|
||||||
|
|
||||||
|
const tempList = []
|
||||||
|
if (Object.keys(res).length > 0) {
|
||||||
|
if (this.editRepairDateList.length > 0) {
|
||||||
|
for (const key in res) {
|
||||||
|
tempList.push({
|
||||||
|
month: key.split('-')[1],
|
||||||
|
date: key.split('-')[2],
|
||||||
|
inRange: res[key].inRange,
|
||||||
|
isActive: res[key].isActive,
|
||||||
|
currentDate: key,
|
||||||
|
isChecked: this.editRepairDateList.includes(key),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (const key in res) {
|
||||||
|
tempList.push({
|
||||||
|
month: key.split('-')[1],
|
||||||
|
date: key.split('-')[2],
|
||||||
|
inRange: res[key].inRange,
|
||||||
|
isActive: res[key].isActive,
|
||||||
|
currentDate: key,
|
||||||
|
isChecked: false,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.cardReplacementDateList = tempList.sort((a, b) => {
|
||||||
|
return a.date - b.date
|
||||||
|
})
|
||||||
|
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.getInitHeight()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 当人员选择发生变化时
|
||||||
|
onChangePerson(val) {
|
||||||
|
if (!val) {
|
||||||
|
this.dateList = []
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const personInfo = this.personOptions.find(
|
||||||
|
(item) => item.value === val,
|
||||||
|
)
|
||||||
|
|
||||||
|
console.log(personInfo, 'personInfo')
|
||||||
|
|
||||||
|
const { name, idNumber, phone, teamName, id, teamId } = personInfo
|
||||||
|
this.workerId = id
|
||||||
|
|
||||||
|
this.dateList = []
|
||||||
|
this.dateList.push({
|
||||||
|
teamName, // 补卡人员姓名
|
||||||
|
name, // 补卡人员所属班组
|
||||||
|
phone, // 补卡人员联系方式
|
||||||
|
idNumber, // 补卡人员身份证号
|
||||||
|
repairDay: '', // 补卡天数
|
||||||
|
repairDate: '', // 补卡日期
|
||||||
|
workerId: id, // 补卡人员id
|
||||||
|
teamId, // 补卡人员所属班组id
|
||||||
|
proName: this.selectProjectName, // 工程名称
|
||||||
|
proId: this.selectProjectId, // 工程id
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
getInitHeight() {
|
||||||
|
const item = this.$refs[`item0`][0]
|
||||||
|
if (item) {
|
||||||
|
this.initHeight = item.offsetWidth
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
created() {
|
||||||
|
this.getCardReplacementPersonList()
|
||||||
|
},
|
||||||
|
|
||||||
|
watch: {
|
||||||
|
editRow: {
|
||||||
|
handler(newVal) {
|
||||||
|
if (Object.keys(newVal).length > 0) {
|
||||||
|
const { workerId, idNumber, name, repairDate } = newVal
|
||||||
|
this.queryPersonForm.selectPersonId = workerId
|
||||||
|
this.workerId = workerId
|
||||||
|
this.idNumber = idNumber
|
||||||
|
this.name = name
|
||||||
|
|
||||||
|
const repairDateList = repairDate.split(',')
|
||||||
|
this.editRepairDateList = repairDateList
|
||||||
|
this.queryPersonForm.time = [
|
||||||
|
repairDateList[0],
|
||||||
|
repairDateList[repairDateList.length - 1],
|
||||||
|
]
|
||||||
|
this.getCardReplacementPersonCheckRecord()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deep: true,
|
||||||
|
immediate: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.date-ist {
|
||||||
|
width: 80%;
|
||||||
|
margin: 0 auto;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(7, 1fr);
|
||||||
|
gap: 10px;
|
||||||
|
|
||||||
|
.item {
|
||||||
|
width: 100%;
|
||||||
|
position: relative;
|
||||||
|
padding: 10px;
|
||||||
|
display: flex;
|
||||||
|
border-radius: 5px;
|
||||||
|
align-items: center;
|
||||||
|
border-radius: 6px;
|
||||||
|
justify-content: center;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 18px;
|
||||||
|
|
||||||
|
.check-box-item {
|
||||||
|
position: absolute;
|
||||||
|
right: 6px;
|
||||||
|
top: 6px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-active {
|
||||||
|
background-color: #b58bae !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -184,6 +184,8 @@ export default {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.$modal.msgSuccess('删除成功')
|
this.$modal.msgSuccess('删除成功')
|
||||||
this.$refs.companyManageTableRef.getTableList()
|
this.$refs.companyManageTableRef.getTableList()
|
||||||
|
// 更新store中的公司列表
|
||||||
|
this.$store.dispatch('getCompanySelectList')
|
||||||
} else {
|
} else {
|
||||||
this.$modal.msgError(res.msg)
|
this.$modal.msgError(res.msg)
|
||||||
}
|
}
|
||||||
|
|
@ -205,6 +207,9 @@ export default {
|
||||||
this.$modal.msgSuccess('操作成功')
|
this.$modal.msgSuccess('操作成功')
|
||||||
this.$refs.companyManageTableRef.getTableList()
|
this.$refs.companyManageTableRef.getTableList()
|
||||||
this.handleCloseDialogOuter()
|
this.handleCloseDialogOuter()
|
||||||
|
|
||||||
|
// 更新store中的公司列表
|
||||||
|
this.$store.dispatch('getCompanySelectList')
|
||||||
} else {
|
} else {
|
||||||
this.$modal.msgError(res.msg)
|
this.$modal.msgError(res.msg)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -249,9 +249,14 @@ export default {
|
||||||
async onHandleAddOrEditJobTypeConfirm(data) {
|
async onHandleAddOrEditJobTypeConfirm(data) {
|
||||||
const res = await addAndEditDivideCompanyManageAPI(data)
|
const res = await addAndEditDivideCompanyManageAPI(data)
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.$modal.msgSuccess('操作成功')
|
this.$modal.msgSuccess(
|
||||||
|
this.dialogConfig.outerTitle === '修改' + '成功',
|
||||||
|
)
|
||||||
this.handleCloseDialogOuter()
|
this.handleCloseDialogOuter()
|
||||||
this.$refs.divideCompanyManageTableRef.getTableList()
|
this.$refs.divideCompanyManageTableRef.getTableList()
|
||||||
|
|
||||||
|
// 更新store中的分公司列表
|
||||||
|
this.$store.dispatch('common/getSubCompanySelectList')
|
||||||
} else {
|
} else {
|
||||||
this.$modal.msgError(res.msg)
|
this.$modal.msgError(res.msg)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -204,6 +204,8 @@ export default {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.$modal.msgSuccess('删除成功')
|
this.$modal.msgSuccess('删除成功')
|
||||||
this.$refs.jobTypeTableRef.getTableList()
|
this.$refs.jobTypeTableRef.getTableList()
|
||||||
|
// 更新store中的工种列表
|
||||||
|
this.$store.dispatch('getPostTypeSelectList')
|
||||||
} else {
|
} else {
|
||||||
this.$modal.msgError(res.msg)
|
this.$modal.msgError(res.msg)
|
||||||
}
|
}
|
||||||
|
|
@ -235,6 +237,9 @@ export default {
|
||||||
this.$modal.msgSuccess('操作成功')
|
this.$modal.msgSuccess('操作成功')
|
||||||
this.$refs.jobTypeTableRef.getTableList()
|
this.$refs.jobTypeTableRef.getTableList()
|
||||||
this.handleCloseDialogOuter()
|
this.handleCloseDialogOuter()
|
||||||
|
|
||||||
|
// 更新store中的工种列表
|
||||||
|
this.$store.dispatch('getPostTypeSelectList')
|
||||||
} else {
|
} else {
|
||||||
this.$modal.msgError(res.msg)
|
this.$modal.msgError(res.msg)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue