diff --git a/src/components/FilePreview/index.vue b/src/components/FilePreview/index.vue new file mode 100644 index 0000000..c2ecd9b --- /dev/null +++ b/src/components/FilePreview/index.vue @@ -0,0 +1,638 @@ + + + + + + + 关闭 + + + {{ isFullscreen ? '退出全屏' : '全屏' }} + + + 下载 + + + 刷新 + + + + {{ showFileList ? '隐藏列表' : '显示列表' }} + + + + + + + + + + + 加载中... + + + + + + 暂不支持预览该文件类型 + + 下载文件 + + + + + + + + + + + + + + + + + + + + + + + {{ textContent }} + 加载文本内容... + + + + + + + + + + + + + + + + 文件列表 ({{ fileList.length }}) + + + + + + + {{ file.fileName || file.name }} + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/base/workReport/index.vue b/src/views/base/workReport/index.vue index cbfa91d..0c480e0 100644 --- a/src/views/base/workReport/index.vue +++ b/src/views/base/workReport/index.vue @@ -3,18 +3,15 @@ - + + type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" + :default-time="['00:00:00', '23:59:59']" /> - + 搜索 @@ -30,29 +27,24 @@ 导出 + :loading="exportLoading">导出 - + {{ parseTime(scope.row.reportTime) }} - - + + - + 查看附件 无附件 @@ -60,7 +52,8 @@ - 查看|打印 + 查看|打印 修改 @@ -70,49 +63,32 @@ - + + + - + - + - + - + - - + @@ -134,10 +110,10 @@ + @pagination="getList" /> + @success="getList" /> @@ -145,7 +121,9 @@ import * as ReportApi from '@/views/drivingSchool/workReport/api/index'; import ReportForm from './ReportForm.vue'; import print from 'vue-print-nb' -import {getLastPathSegment} from "@/utils/ruoyi"; +import { getLastPathSegment } from "@/utils/ruoyi"; +import FilePreview from '@/components/FilePreview/index.vue'; +import { file } from 'jszip'; export default { name: "Report", @@ -154,6 +132,7 @@ export default { }, components: { ReportForm, + FilePreview }, data() { return { @@ -250,16 +229,16 @@ export default { /** 搜索按钮操作 */ handleQuery() { const reportTime = this.queryParams.reportTime; - this.queryParams = { + this.queryParams = { pageNo: 1, - pageSize: 10, - reportTopic: null, - reportTime: reportTime, - createTime: [], - userId: null, - userName: null, - servicePackageId: this.$route.query.servicePackageId, - dictType: this.$route.query.dictType, + pageSize: 10, + reportTopic: null, + reportTime: reportTime, + createTime: [], + userId: null, + userName: null, + servicePackageId: this.$route.query.servicePackageId, + dictType: this.$route.query.dictType, } this.queryParams.pageNo = 1; this.getList(); @@ -311,13 +290,26 @@ export default { } // 初始化数据 - this.currentFileList = filePath.split(',').filter(item => item.trim()); - this.fileDialogVisible = true; + this.currentFileList = filePath.split(',') + .filter(item => item.trim()) // 去掉空格 + .map(item => { + const parts = item.trim().split('/'); // 分割路径 + const name = parts[parts.length - 1]; // 获取文件名 + return { + url: item.trim(), + name: name + }; + }); + + // this.fileDialogVisible = true; + + // this.$refs.filePreview.openPreview(this.currentFileList[0],this.currentFileList) + this.$refs.filePreview.openPreview(this.currentFileList[0], this.currentFileList) // 默认显示第一个文件 - if (this.currentFileList.length > 0) { - this.previewFile(this.currentFileList[0]); - } + // if (this.currentFileList.length > 0) { + // this.previewFile(this.currentFileList[0]); + // } }, // 获取完整文件URL(拼接基础API地址) @@ -369,7 +361,7 @@ export default { }, // 表格行类名 - getRowClassName({row}) { + getRowClassName({ row }) { return row === this.currentFileUrl ? 'highlight-row' : ''; }, @@ -422,5 +414,4 @@ export default { .highlight-row { background-color: #f0f7ff; } - diff --git a/src/views/repair/Components/CarChoose.vue b/src/views/repair/Components/CarChoose.vue index 6d32e2e..c2dceff 100644 --- a/src/views/repair/Components/CarChoose.vue +++ b/src/views/repair/Components/CarChoose.vue @@ -2,7 +2,7 @@ - + 新增车辆 @@ -14,7 +14,7 @@ - + diff --git a/src/views/repair/stockOperate/Components/WaresItem.vue b/src/views/repair/stockOperate/Components/WaresItem.vue index 2278781..c0bdaf3 100644 --- a/src/views/repair/stockOperate/Components/WaresItem.vue +++ b/src/views/repair/stockOperate/Components/WaresItem.vue @@ -483,7 +483,7 @@ export default { soiType: this.type ? '02' : "04", goodsId: item.waresId, goodsCount: item.waresCount, - goodsPrice: item.salePrice + goodsPrice: item.salePrice, } })] this.formData.ids = this.allSelectRows.map(item => item.id) diff --git a/src/views/repair/tickets/Components/TicketsShow.vue b/src/views/repair/tickets/Components/TicketsShow.vue index 417134a..971d5c7 100644 --- a/src/views/repair/tickets/Components/TicketsShow.vue +++ b/src/views/repair/tickets/Components/TicketsShow.vue @@ -413,7 +413,7 @@ 数量 单价 - 折扣 + 金额 @@ -438,7 +438,7 @@ --> {{ item.itemCount }} {{ item.itemPrice }} - {{ item.itemDiscount }} + + + 金额 施工人员 服务顾问 - 备注 + @@ -501,8 +501,8 @@ {{ item.itemCount }} {{ item.itemPrice }} - {{ item.itemDiscount }} - + + {{ item.itemMoney }} {{ item.repairNames }} {{ item.saleName }} - {{ item.remark }} + @@ -542,13 +542,13 @@ 单位 数量 单价 - 折扣 - 毛利 - 毛利率 + + 金额 施工人员 服务顾问 - 备注 + @@ -564,8 +564,8 @@ {{ item.itemCount }} {{ item.itemPrice }} - {{ item.itemDiscount }} - + + {{ item.itemMoney }} {{ item.repairNames }} {{ item.saleName }} - {{ item.remark }} + @@ -599,14 +599,14 @@ 总数量 {{ totalCount }} - 成本 - {{ otherInfo.cost }} + 总金额 {{ totalMoney }} - +
{{ textContent }}