From e00afb3606217b489c8ae20646d1a8301051a8a8 Mon Sep 17 00:00:00 2001 From: hayu <1604366271@qq.com> Date: Fri, 7 Nov 2025 09:19:14 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E9=80=80=E6=96=99=E3=80=81=E7=BB=B4?= =?UTF-8?q?=E4=BF=AE=E3=80=81=E7=BB=B4=E4=BF=AE=E5=AE=A1=E6=A0=B8=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/back/index.js | 11 + src/api/repair/repair.js | 21 +- src/views/material/ma/device/index.vue | 365 ++++++++++++++---- src/views/material/query/backQuery.vue | 288 ++++++++++++++ src/views/material/query/repairAuditQuery.vue | 271 +++++++++++++ src/views/material/query/repairQuery.vue | 306 +++++++++++++++ src/views/material/report/reportQuery.vue | 4 +- .../material/stquery/deviceStatusRecord.vue | 15 +- 8 files changed, 1207 insertions(+), 74 deletions(-) create mode 100644 src/views/material/query/backQuery.vue create mode 100644 src/views/material/query/repairAuditQuery.vue create mode 100644 src/views/material/query/repairQuery.vue diff --git a/src/api/back/index.js b/src/api/back/index.js index dd8de442..83de75ee 100644 --- a/src/api/back/index.js +++ b/src/api/back/index.js @@ -126,3 +126,14 @@ export function updatePrintStatus(id) { data: {id: id}, }) } + + +//退料查询 +export function getBackQueryList(query) { + return request({ + url: '/material/back_apply_info/getBackQueryList', + method: 'get', + params: query, + }) +} + diff --git a/src/api/repair/repair.js b/src/api/repair/repair.js index e888815b..85e77455 100644 --- a/src/api/repair/repair.js +++ b/src/api/repair/repair.js @@ -117,4 +117,23 @@ export function getRepairProjectListApi(query) { method: 'get', params: query }) -} \ No newline at end of file +} + + +//维修查询 +export function getRepairQueryList(query) { + return request({ + url: '/material/repair/getRepairQueryList', + method: 'get', + params: query, + }) +} + +//维修审核查询 +export function getRepairAuditQueryList(query) { + return request({ + url: '/material/repair/getRepairAuditQueryList', + method: 'get', + params: query, + }) +} diff --git a/src/views/material/ma/device/index.vue b/src/views/material/ma/device/index.vue index 6a24b164..be961ba2 100644 --- a/src/views/material/ma/device/index.vue +++ b/src/views/material/ma/device/index.vue @@ -10,17 +10,97 @@ maxlength="20" /> - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -29,34 +109,34 @@ - - - - - + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + @@ -100,6 +180,7 @@ + { + // 如果返回的是对象数组,根据实际字段调整 + return { + value: item.typeId, + label: item.typeName + } + }) + } else { + this.$message.error('获取施工类型下拉失败') + this.lineTypeOptions = [] // 失败时设置为空数组 + } + } catch (error) { + console.error('获取施工类型下拉列表失败:', error) + this.$message.error('获取施工类型下拉列表失败') + this.lineTypeOptions = [] // 异常时设置为空数组 + } + }, + // 线路类型变化处理 + async handleLineTypeChange(selectedLineTypes) { + // 清空物资类型选择 + this.queryParams.materialType = null + this.materialTypeOptions=[] + this.queryParams.typeName=null + this.typeNameOptions=[] + this.queryParams.typeModelName=null + this.typeModelNameOptions=[] + + if (!selectedLineTypes || selectedLineTypes.length === 0) { + this.materialTypeOptions = [] + } + + // 获取物资类型数据 + await this.getMaterialTypeList(selectedLineTypes) + }, + async getMaterialTypeList(lineTypes) { + const params = { + constructionType:lineTypes + } + try { + // 调用接口获取物资类型数据 + const res = await getMaterialTypeList(params) + + if (res.code === 200 && res.data) { + // 处理返回的物资类型数据 + const materialTypes = res.data.map(item => ({ + value: item.typeId, + label: item.typeName + })) + + // 更新选项并缓存 + this.materialTypeOptions = materialTypes + } else { + this.$message.error('获取物资类型失败') + this.materialTypeOptions = [] + } + } catch (error) { + console.error('获取物资类型列表失败:', error) + this.$message.error('获取物资类型列表失败') + this.materialTypeOptions = [] + } + }, + async handleMaterialTypeChange(e){ + this.queryParams.typeName=null + this.typeNameOptions=[] + this.queryParams.typeModelName=null + this.typeModelNameOptions=[] + getDeviceType({ level: 3, typeId:e }).then(response => { + let matNameRes = response.data + this.typeNameOptions = matNameRes.map((item) => { + return { + label: item.typeName, + value: item.typeId + } + }) + }) + }, + async handleTypeNameChange(e){ + this.queryParams.typeModelName=null + this.typeModelNameOptions=[] + getDeviceType({ level: 4, typeId:e }).then(response => { + let matNameRes = response.data + this.typeModelNameOptions = matNameRes.map((item) => { + return { + label: item.typeName, + value: item.typeId + } + }) + }) + }, + getDeviceType() { + getDeviceType({ level: 3 }).then(response => { + let matNameRes = response.data + this.typeNameOptions = matNameRes.map((item) => { + return { + label: item.typeName, + value: item.typeId + } + }) + }) + getDeviceType({ level: 4 }).then(response => { + let matModelRes = response.data + this.typeModelNameOptions = matModelRes.map((item) => { + return { + label: item.typeName, + value: item.typeId + } + }) + }) + }, async getKeeperData() { const itemName = 'ku_guan_role_ids' let roleIdsTemp = [] @@ -724,35 +930,35 @@ export default { }) }, - getDeviceType() { - getDeviceType({ level: 2, skipPermission: 1 }).then(response => { - let matTypeRes = response.data - this.materialTypeList = matTypeRes.map((item) => { - return { - label: item.typeName, - value: item.typeId - } - }) - }) - getDeviceType({ level: 3, skipPermission: 1 }).then(response => { - let matNameRes = response.data - this.materialNameList = matNameRes.map((item) => { - return { - label: item.typeName, - value: item.typeId - } - }) - }) - getDeviceType({ level: 4, skipPermission: 1 }).then(response => { - let matModelRes = response.data - this.materialModelList = matModelRes.map((item) => { - return { - label: item.typeName, - value: item.typeId - } - }) - }) - }, + // getDeviceType() { + // getDeviceType({ level: 2, skipPermission: 1 }).then(response => { + // let matTypeRes = response.data + // this.materialTypeList = matTypeRes.map((item) => { + // return { + // label: item.typeName, + // value: item.typeId + // } + // }) + // }) + // getDeviceType({ level: 3, skipPermission: 1 }).then(response => { + // let matNameRes = response.data + // this.materialNameList = matNameRes.map((item) => { + // return { + // label: item.typeName, + // value: item.typeId + // } + // }) + // }) + // getDeviceType({ level: 4, skipPermission: 1 }).then(response => { + // let matModelRes = response.data + // this.materialModelList = matModelRes.map((item) => { + // return { + // label: item.typeName, + // value: item.typeId + // } + // }) + // }) + // }, // change设备类型 handleMaModel(e) { @@ -790,7 +996,19 @@ export default { /** 查询岗位列表 */ getList() { this.loading = true - getListDevice(this.queryParams).then(response => { + const params = { + isAssets:this.queryParams.isAssets, + maStatus:this.queryParams.maStatus, + keyWord: this.queryParams.keyWord, + typeNameId: this.queryParams.typeName, + typeModelNameId: this.queryParams.typeModelName, + constructionTypes:this.queryParams.lineTypes, + materialTypeId:this.queryParams.materialType, + jiJuTypeStr:this.queryParams.jiJuType, + pageSize: this.queryParams.pageSize, + pageNum: this.queryParams.pageNum + } + getListDevice(params).then(response => { this.deviceList = response.rows this.total = response.total this.loading = false @@ -1185,7 +1403,18 @@ export default { try { let fileName = `设备管理_${formatTime(new Date())}.xLsx` let url = '/material/ma_machine/export' - const params = { ...this.queryParams } + const params = { + isAssets:this.queryParams.isAssets, + maStatus:this.queryParams.maStatus, + keyWord: this.queryParams.keyWord, + typeNameId: this.queryParams.typeName, + typeModelNameId: this.queryParams.typeModelName, + constructionTypes:this.queryParams.lineTypes, + materialTypeId:this.queryParams.materialType, + jiJuTypeStr:this.queryParams.jiJuType, + pageSize: this.queryParams.pageSize, + pageNum: this.queryParams.pageNum + } console.log('🚀 ~ 导出 ~ params:', params) this.download(url, params, fileName) } catch (error) { diff --git a/src/views/material/query/backQuery.vue b/src/views/material/query/backQuery.vue new file mode 100644 index 00000000..28ef8642 --- /dev/null +++ b/src/views/material/query/backQuery.vue @@ -0,0 +1,288 @@ + + + + diff --git a/src/views/material/query/repairAuditQuery.vue b/src/views/material/query/repairAuditQuery.vue new file mode 100644 index 00000000..76b662dc --- /dev/null +++ b/src/views/material/query/repairAuditQuery.vue @@ -0,0 +1,271 @@ + + + + diff --git a/src/views/material/query/repairQuery.vue b/src/views/material/query/repairQuery.vue new file mode 100644 index 00000000..29e1cc6e --- /dev/null +++ b/src/views/material/query/repairQuery.vue @@ -0,0 +1,306 @@ + + + + diff --git a/src/views/material/report/reportQuery.vue b/src/views/material/report/reportQuery.vue index d52b547d..e1d7fe54 100644 --- a/src/views/material/report/reportQuery.vue +++ b/src/views/material/report/reportQuery.vue @@ -105,7 +105,7 @@ - + - + diff --git a/src/views/material/stquery/deviceStatusRecord.vue b/src/views/material/stquery/deviceStatusRecord.vue index ab201455..6f09ed3c 100644 --- a/src/views/material/stquery/deviceStatusRecord.vue +++ b/src/views/material/stquery/deviceStatusRecord.vue @@ -33,6 +33,7 @@ placeholder="请选择物资类型" style="width: 240px" clearable + filterable @change="handleMaterialTypeChange" > Date: Fri, 7 Nov 2025 10:35:43 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=8E=88=E6=9D=83=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../materialStation/authorize/index.vue | 98 ++++--------------- 1 file changed, 21 insertions(+), 77 deletions(-) diff --git a/src/views/material/materialStation/authorize/index.vue b/src/views/material/materialStation/authorize/index.vue index ecfb20fc..81b3c9c5 100644 --- a/src/views/material/materialStation/authorize/index.vue +++ b/src/views/material/materialStation/authorize/index.vue @@ -175,6 +175,7 @@ :on-error="handleError" :on-remove="handleFileRemove" accept=".docx" + :before-upload="beforeUploadDocx" :disabled="isEditMode" style="margin-right: 10px" > @@ -272,50 +273,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -