From e76d4346e48c27f155926b622b1cba945176851f Mon Sep 17 00:00:00 2001
From: hongchao <3228015117@qq.com>
Date: Wed, 19 Mar 2025 15:29:39 +0800
Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/cost/cost.js | 9 +
.../business/businessHandlingRecord/index.vue | 21 +-
.../material/cost/component/applyHome.vue | 47 +++--
.../component/addToolsApply.vue | 2 +-
.../inventoryScrap/component/homeApply.vue | 1 +
.../component/queryToolsApply.vue | 190 +++++++++++++++++-
6 files changed, 238 insertions(+), 32 deletions(-)
diff --git a/src/api/cost/cost.js b/src/api/cost/cost.js
index 3dc97090..0e595f39 100644
--- a/src/api/cost/cost.js
+++ b/src/api/cost/cost.js
@@ -119,6 +119,15 @@ export function editRelief(params){
})
}
+// 查询费用结算申请详情
+export function getProjectListByUnitIds(params){
+ return request({
+ url: '/material/slt_agreement_info/getProjectListByUnitIds',
+ method: 'post',
+ data: params
+ })
+}
+
diff --git a/src/views/business/businessHandlingRecord/index.vue b/src/views/business/businessHandlingRecord/index.vue
index 87b24813..ef3612e3 100644
--- a/src/views/business/businessHandlingRecord/index.vue
+++ b/src/views/business/businessHandlingRecord/index.vue
@@ -24,7 +24,12 @@
-
+
@@ -65,14 +70,7 @@
>
-
- 待审核
-
- 审核中
-
- 已完成
-
- 待提交
+
@@ -268,6 +266,7 @@ import printJS from 'print-js'
import { getLeaseTaskList, deleteLeaseTask, getLeaseTask, getCodePDF } from '@/api/business/index'
export default {
+ dicts: ['lease_apply_task_status'],
data() {
return {
showSearch: true,
@@ -280,9 +279,11 @@ export default {
},
// 考勤状态
statusOptions: [
+ { label: '待提交', value: '5' },
{ label: '待审核', value: '0' },
{ label: '审核中', value: '6' },
- { label: '已完成', value: '1' }
+ { label: '已完成', value: '2' },
+ { label: '已驳回', value: '3' },
],
total: 0, // 总条数
// 表头
diff --git a/src/views/material/cost/component/applyHome.vue b/src/views/material/cost/component/applyHome.vue
index eab31555..38011c0f 100644
--- a/src/views/material/cost/component/applyHome.vue
+++ b/src/views/material/cost/component/applyHome.vue
@@ -1,14 +1,18 @@
-
+
+ :multiple="true"
+ >
+
@@ -70,13 +75,13 @@
@click="resetQuery"
>重置
-
+ >
import {
- getProjectList,
+ // getProjectList,
getUnitList,
getAgreementInfoById,
} from '@/api/back/index.js'
-import { getSltAgreementInfo } from '@/api/cost/cost'
+import { getSltAgreementInfo,getProjectListByUnitIds } from '@/api/cost/cost'
import vueEasyPrint from "vue-easy-print";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -259,13 +264,13 @@ export default {
unitList: [],
// 工程数据
proList: [],
- unitIds: null,
+ unitIds: [],
projectIds: null,
selectTreeProps: {
children: 'children',
label: 'name',
value: 'id',
- // multiple: true,//false
+ multiple: true,//false
},
// statusList: [
// { id: '1', name: '未结算' },
@@ -289,9 +294,20 @@ export default {
openPrint:false
}
},
+ // updated() {
+ // this.$nextTick(() => {
+ // // 通过 ref 获取 treeselect 组件的 DOM 元素
+ // const treeselectElm = this.$refs.treeselectRef.$el;
+ // if (treeselectElm && typeof treeselectElm.getBoundingClientRect === 'function') {
+ // const rect = treeselectElm.getBoundingClientRect();
+ // // 处理 rect
+ // console.log(rect);
+ // }
+ // });
+ // },
created() {
this.GetUnitData()
- this.GetProData()
+ // this.GetProData()
this.getList()
},
methods: {
@@ -317,11 +333,15 @@ export default {
this.getAgreementInfo()
},
unitChange(val){
+ console.log('Selected values:', val); // 检查选中的值
+ // this.unitIds.push(Number(val.id));
// if(val&&val.length>0){
// this.queryParams.unitId=this.unitIds[this.unitIds.length - 1]
// }else if(val&&val.length==0){
// this.queryParams.unitId=""
// }
+ console.log("xxxxxxxxx",this.queryParams.unitId)
+ console.log("yyyyyyyyy",this.unitIds)
// this.GetProData()
setTimeout(()=>{
this.queryParams.projectId=null
@@ -332,10 +352,11 @@ export default {
},
// 获取 工程名称 列表数据
async GetProData() {
+ const unitIdsAsNumbers = this.unitIds.map(id => Number(id));
const params = {
- unitId: this.queryParams.unitId,
+ unitIds: unitIdsAsNumbers,
}
- const res = await getProjectList(params)
+ const res = await getProjectListByUnitIds(params)
this.proList = res.data;
this.getAgreementInfo()
diff --git a/src/views/material/repair/inventoryScrap/component/addToolsApply.vue b/src/views/material/repair/inventoryScrap/component/addToolsApply.vue
index 145b6108..858d9723 100644
--- a/src/views/material/repair/inventoryScrap/component/addToolsApply.vue
+++ b/src/views/material/repair/inventoryScrap/component/addToolsApply.vue
@@ -1107,7 +1107,7 @@ export default {
text-align: center;
font-size: 12px;
color: #333;
- z-index: 999999;
+ // z-index: 999999;
}
.file-overlay {
diff --git a/src/views/material/repair/inventoryScrap/component/homeApply.vue b/src/views/material/repair/inventoryScrap/component/homeApply.vue
index 5d7efc2e..e6f044cd 100644
--- a/src/views/material/repair/inventoryScrap/component/homeApply.vue
+++ b/src/views/material/repair/inventoryScrap/component/homeApply.vue
@@ -260,6 +260,7 @@ export default {
endTime: this.queryParams.time && this.queryParams.time[1],
pageSize: this.queryParams.pageSize,
pageNum: this.queryParams.pageNum,
+ taskStatus: this.queryParams.taskStatus,
};
getInventoryList(params).then((response) => {
this.typeList = response.data.rows;
diff --git a/src/views/material/repair/inventoryScrap/component/queryToolsApply.vue b/src/views/material/repair/inventoryScrap/component/queryToolsApply.vue
index b48302e4..da3369af 100644
--- a/src/views/material/repair/inventoryScrap/component/queryToolsApply.vue
+++ b/src/views/material/repair/inventoryScrap/component/queryToolsApply.vue
@@ -28,10 +28,50 @@
重置
+ 导出
+
+
+
+
+
![]()
+
+
![]()
+
{{ file.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
@@ -98,6 +142,7 @@
import {
getScrapInfo
} from "@/api/repair/scrapLedgerReview";
+import { downloadFile, downloadFileData } from '@/utils/download'
import { getToken } from "@/utils/auth";
export default {
name: "QueryTools",
@@ -139,10 +184,22 @@ export default {
rowData: {},
maForm: {
keyWord: "",
+ bmFileInfos: []
},
+ urlTemp: '',
+ //图片查看弹窗
+ dialogImageUrl: '',
+ dialogVisible: false,
+ uploadKey: Date.now(),
+ uploadUrl: process.env.VUE_APP_BASE_API + '/file/upload' // 上传的图片服务器地址
};
},
- computed: {},
+ computed: {
+ //图片上传1张后,隐藏上传框
+ uploadDisabled() {
+ return this.maForm.bmFileInfos && this.maForm.bmFileInfos.length <= 5
+ },
+ },
mounted() {
this.taskId = this.queryTaskId;
this.getTaskInfo();
@@ -155,8 +212,8 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
- this.resetForm("queryForm");
- this.queryParams.keyWord = "";
+ this.resetForm("maForm");
+ this.maForm.keyWord = "";
this.handleQuery();
},
//获取任务详情-列表数据
@@ -165,11 +222,64 @@ export default {
console.log('xxxxxxxxxxxxxxxxxxxxx',this.taskId)
getScrapInfo({'taskId':this.taskId,'keyWord':this.maForm.keyWord}).then((response) => {
this.equipmentList = response.data.scrapApplyDetailsList;
-
+ this.maForm.bmFileInfos = response.data.fileList
this.loading = false;
});
},
+ isImage(file) {
+ this.urlTemp = require('@/assets/file.png')
+ if (this.updataIf(file)) {
+ return false
+ } else {
+ return true
+ }
+ },
+
+ // 判断文件类型,图片预览,文件下载
+ updataIf(e) {
+ if (e.fileName) {
+ const parts = e.fileName.split('.')
+ const extension = parts.pop()
+ if (extension === 'png' || extension === 'jpeg' || extension === 'jpg') {
+ return false
+ } else {
+ return true
+ }
+ } else {
+ const parts = e.name.split('.')
+ const extension = parts.pop()
+ if (extension === 'png' || extension === 'jpeg' || extension === 'jpg') {
+ return false
+ } else {
+ return true
+ }
+ }
+ },
+
+ //上传组件-图片查看
+ picturePreviewFbs(file) {
+ console.log("yyyyyyyyyy",file)
+ this.dialogImageUrl = file.url.replaceAll('#', '%23')
+ const parts = file.name.split('.')
+ const extension = parts.pop()
+ if (extension === 'pdf') {
+ const windowName = file.name
+ window.open(file.url, windowName)
+ } else {
+ this.dialogVisible = true
+ }
+ },
+ handleDownload(file) {
+ console.log(file)
+ if (file.status === 'ready') {
+ downloadFile({ fileName: file.name, fileData: file.raw, fileType: 'application/vnd.ms-excel;charset=utf-8' })
+ } else if (file.status === 'success') {
+ downloadFileData({ fileName: file.name, fileUrl: file.url })
+ // downloadFileData({ fileName: file.name,fileUrl:file.url })
+ }
+ },
+
/** 导出按钮操作 */
handleExport() {
this.download(
@@ -182,10 +292,23 @@ export default {
};