From feba0428dabbd4bf91538e88c52596e45336220a Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Thu, 18 Sep 2025 11:13:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=B1=E4=BF=A1=E4=BA=BA=E5=91=98=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E6=B7=BB=E5=8A=A0=20=E8=80=83=E5=8B=A4=E6=9C=BA?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=AD=97=E6=AE=B5=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../attendance-manage/attendance-machine.js | 17 +++ .../dishonesty-person.js | 2 +- .../attendance-machine/add-and-bind.form.vue | 82 ++++++++++++- .../attendance-machine/config.js | 2 + .../dishonesty-person/config.js | 2 + .../dishonesty-person/index.vue | 111 +++++++++++++++++- 6 files changed, 211 insertions(+), 5 deletions(-) diff --git a/src/api/construction-person/attendance-manage/attendance-machine.js b/src/api/construction-person/attendance-manage/attendance-machine.js index ee7e408..edb68d5 100644 --- a/src/api/construction-person/attendance-manage/attendance-machine.js +++ b/src/api/construction-person/attendance-manage/attendance-machine.js @@ -35,3 +35,20 @@ export const getAttendanceMachineListAPI = (data) => { params: data, }) } + +// 根据工程查询分包下拉接口 +export const getSubListByProIdAPI = (data) => { + return request({ + url: '/bmw/pmSub/getSublistByProId', + method: 'GET', + params: data, + }) +} +// 根据工程和分包查询班组下拉接口 +export const getTeamListBySubIdAndProIdAPI = (data) => { + return request({ + url: '/bmw/subTeamContract/getSubTeamContractList', + method: 'GET', + params: data, + }) +} diff --git a/src/api/construction-person/red-green-light-mange/dishonesty-person.js b/src/api/construction-person/red-green-light-mange/dishonesty-person.js index 77a0157..f155bbe 100644 --- a/src/api/construction-person/red-green-light-mange/dishonesty-person.js +++ b/src/api/construction-person/red-green-light-mange/dishonesty-person.js @@ -12,7 +12,7 @@ export const getDishonestyPersonListAPI = (data) => { // 红绿灯统计 新增失信人员 export const addDishonestyPersonAPI = (data) => { - return request({ + return requestFormData({ url: '/bmw/workerBlack/insert', method: 'POST', data, diff --git a/src/views/construction-person/attendance-manage/attendance-machine/add-and-bind.form.vue b/src/views/construction-person/attendance-manage/attendance-machine/add-and-bind.form.vue index c25fffe..aa6424f 100644 --- a/src/views/construction-person/attendance-manage/attendance-machine/add-and-bind.form.vue +++ b/src/views/construction-person/attendance-manage/attendance-machine/add-and-bind.form.vue @@ -56,6 +56,7 @@ filterable style="width: 100%" placeholder="请选择" + @change="getSubListByProId" v-model="addOrEditForm.proId" > + + + + + + + + + + + + + + + + + + @@ -77,6 +119,8 @@ import UploadImgFormData from '@/components/UploadImgFormData' import { addAttendanceMachineAPI, editAttendanceMachineAPI, + getSubListByProIdAPI, + getTeamListBySubIdAndProIdAPI, } from '@/api/construction-person/attendance-manage/attendance-machine' import { getLotProjectSelectListCommonFun } from '@/utils/getCommonData' @@ -104,6 +148,8 @@ export default { deviceCode: '', deviceName: '', serialNumber: '', + subId: '', + teamId: '', }, addOrEditFormRules: { deviceCode: [ @@ -138,7 +184,9 @@ export default { }, ], }, - lotProjectList: [], + lotProjectList: [], // 工程下拉列表 + subSelectList: [], // 分包下拉列表 + teamSelectList: [], // 班组下拉列表 } }, methods: { @@ -154,6 +202,8 @@ export default { deviceCode, deviceName, serialNumber, + subId, + teamId, } = this.addOrEditForm const params = { @@ -161,6 +211,8 @@ export default { deviceCode, deviceName, serialNumber, + subId, + teamId, } const API = isUpdate @@ -188,6 +240,34 @@ export default { resetForm() { this.$refs.addOrEditFormRef.resetFields() }, + + // 根据工程查询分包下拉 + async getSubListByProId(val) { + this.subSelectList = [] + this.teamSelectList = [] + this.addOrEditForm.teamId = '' + this.addOrEditForm.subId = '' + if (!val) { + return + } + const { rows: res } = await getSubListByProIdAPI({ proId: val }) + this.subSelectList = res + }, + + // 根据工程和分包查询班组下拉 + async getTeamListBySubIdAndProId(val) { + this.teamSelectList = [] + this.addOrEditForm.teamId = '' + if (!val) { + return + } + const { data: res } = await getTeamListBySubIdAndProIdAPI({ + subId: val, + proId: this.addOrEditForm.proId, + }) + + this.teamSelectList = res + }, }, async created() { diff --git a/src/views/construction-person/attendance-manage/attendance-machine/config.js b/src/views/construction-person/attendance-manage/attendance-machine/config.js index bd58e65..c671066 100644 --- a/src/views/construction-person/attendance-manage/attendance-machine/config.js +++ b/src/views/construction-person/attendance-manage/attendance-machine/config.js @@ -40,6 +40,8 @@ export const columnsList = [ { t_props: 'deviceName', t_label: '考勤机名称' }, { t_props: 'serialNumber', t_label: '出厂编号' }, { t_props: 'proName', t_label: '工程名称' }, + { t_props: 'subName', t_label: '分包名称' }, + { t_props: 'teamName', t_label: '班组名称' }, { t_slot: 'isShanghai', t_label: '工程类型' }, { t_label: '状态', diff --git a/src/views/construction-person/red-green-light-mange/dishonesty-person/config.js b/src/views/construction-person/red-green-light-mange/dishonesty-person/config.js index f9ebb09..2a86ffa 100644 --- a/src/views/construction-person/red-green-light-mange/dishonesty-person/config.js +++ b/src/views/construction-person/red-green-light-mange/dishonesty-person/config.js @@ -60,6 +60,8 @@ export const columnsList = [ t_label: '分包名称', }, { t_props: 'reason', t_label: '事件' }, + { t_props: 'remark', t_label: '备注' }, + { t_slot: 'file', t_label: '附件', t_width: '200px' }, { t_label: '起止时间', t_slot: 'time', diff --git a/src/views/construction-person/red-green-light-mange/dishonesty-person/index.vue b/src/views/construction-person/red-green-light-mange/dishonesty-person/index.vue index 48155e4..3909e57 100644 --- a/src/views/construction-person/red-green-light-mange/dishonesty-person/index.vue +++ b/src/views/construction-person/red-green-light-mange/dishonesty-person/index.vue @@ -47,6 +47,25 @@ + +