From 69a5603954a555e196dc03cd0e7e1e47f586228b Mon Sep 17 00:00:00 2001 From: bb_pan Date: Thu, 20 Mar 2025 18:06:19 +0800 Subject: [PATCH 01/64] =?UTF-8?q?=E6=8A=A5=E5=BA=9F=E6=8A=A5=E8=A1=A8-?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=BF=AE=E6=94=B9=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/report/report.js | 27 +++++++++++ src/views/material/report/scrapReport.vue | 57 +++++++++++------------ 2 files changed, 55 insertions(+), 29 deletions(-) diff --git a/src/api/report/report.js b/src/api/report/report.js index 59d51436..266c22b1 100644 --- a/src/api/report/report.js +++ b/src/api/report/report.js @@ -126,4 +126,31 @@ export function getRepairInputDetailsListApi(query) { method: 'get', params: query }) +} + +// 报废报表-列表 +export function getScrapListApi(query) { + return request({ + url: '/material/bm_report/getScrapList', + method: 'get', + params: query + }) +} + +// 报废报表-总条数 +export function getScrapListNoPageApi(query) { + return request({ + url: '/material/bm_report/getScrapListNoPage', + method: 'get', + params: query + }) +} + +// 报废报表-弹窗查询 +export function getScrapDetailsListApi(query) { + return request({ + url: '/material/bm_report/getScrapDetailsList', + method: 'get', + params: query + }) } \ No newline at end of file diff --git a/src/views/material/report/scrapReport.vue b/src/views/material/report/scrapReport.vue index 869c861e..71359ee6 100644 --- a/src/views/material/report/scrapReport.vue +++ b/src/views/material/report/scrapReport.vue @@ -1,6 +1,6 @@ - - - - - - - - - - + + + + + + + + + + - - + - - - - - + From 4c97737dc62dea8b922ce5e4d55d5ea44cae6b00 Mon Sep 17 00:00:00 2001 From: hongchao <3228015117@qq.com> Date: Fri, 21 Mar 2025 09:16:45 +0800 Subject: [PATCH 03/64] =?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 --- .../material/cost/component/applyDetail.vue | 2 ++ .../repair/repairManage/component/home.vue | 17 ++++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/views/material/cost/component/applyDetail.vue b/src/views/material/cost/component/applyDetail.vue index 1e8e0f20..0e6e3afe 100644 --- a/src/views/material/cost/component/applyDetail.vue +++ b/src/views/material/cost/component/applyDetail.vue @@ -14,6 +14,8 @@ >减免明细导出 全部明细导出 + 各结算明细导出 提交 diff --git a/src/views/material/repair/repairManage/component/home.vue b/src/views/material/repair/repairManage/component/home.vue index c6a778f5..53884e6a 100644 --- a/src/views/material/repair/repairManage/component/home.vue +++ b/src/views/material/repair/repairManage/component/home.vue @@ -160,10 +160,18 @@
{{ scope.row.maTypeName }}-{{ scope.row.typeName }}
- - From 638080ca7db9a6792f9376ed2325a32c47b2d251 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Mon, 24 Mar 2025 17:11:33 +0800 Subject: [PATCH 11/64] =?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/views/business/reliefRecord/index.vue | 2274 +++++++++++---------- 1 file changed, 1191 insertions(+), 1083 deletions(-) diff --git a/src/views/business/reliefRecord/index.vue b/src/views/business/reliefRecord/index.vue index 6072e56f..1a9955a0 100644 --- a/src/views/business/reliefRecord/index.vue +++ b/src/views/business/reliefRecord/index.vue @@ -1,1088 +1,1197 @@ @@ -343,7 +344,7 @@ export default { { label: '类型名称', prop: 'typeName' }, { label: '规格型号', prop: 'typeModelName' }, { label: '计量单位', prop: 'unitName' }, - { label: '领料数量', prop: 'useNum' }, + { label: '在用数量', prop: 'useNum' }, { label: '领料人', prop: 'leasePerson' }, { label: '领料日期', prop: 'startTime' } ], @@ -715,6 +716,15 @@ export default { } }) }, + // 数量变更 + directNumChange(row) { + if (row.directNum > row.useNum) { + this.$message.error('直转数量不能大于领料数量') + this.$nextTick(() => { + row.directNum = row.useNum + }) + } + }, /** 保存按钮操作 */ handleSave() { console.log('maForm', this.maForm) From 3633b2cf715b2b16b673fa58dfbf30cecb9475af Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Tue, 25 Mar 2025 18:48:55 +0800 Subject: [PATCH 22/64] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/home/equipment-supply/components/card-model.vue | 2 +- src/views/home/equipment-supply/index.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/home/equipment-supply/components/card-model.vue b/src/views/home/equipment-supply/components/card-model.vue index bb26bf46..2d4a7aa2 100644 --- a/src/views/home/equipment-supply/components/card-model.vue +++ b/src/views/home/equipment-supply/components/card-model.vue @@ -8,7 +8,7 @@
较上月{{ isReduce ? '增高' : '降低' }}{{ ratio }}% - +
diff --git a/src/views/home/equipment-supply/index.vue b/src/views/home/equipment-supply/index.vue index d245bfc6..88dc6c4b 100644 --- a/src/views/home/equipment-supply/index.vue +++ b/src/views/home/equipment-supply/index.vue @@ -286,7 +286,6 @@ export default { this.cardList_3[0].cardNum = projectNum this.cardList_3[1].cardNum = suppliedQuantityAllNum || 0 this.cardList_3[2].cardNum = suppliedQuantityPrice || 0 - console.log(res, '--') }, // 获取公司和工程 async getCompanyAndProjectFun() { @@ -327,6 +326,7 @@ export default { }, created() { this.getCompanyAndProjectFun() + this.getCardListFun() } } From de01771e8b1e644fdcfd1d878170985dc3dd623d Mon Sep 17 00:00:00 2001 From: hongchao <3228015117@qq.com> Date: Wed, 26 Mar 2025 11:53:30 +0800 Subject: [PATCH 23/64] =?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/views/material/ma/type/index.vue | 4 ++-- src/views/system/user/index.vue | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/material/ma/type/index.vue b/src/views/material/ma/type/index.vue index 9fceffe1..89e3374e 100644 --- a/src/views/material/ma/type/index.vue +++ b/src/views/material/ma/type/index.vue @@ -504,8 +504,8 @@ placeholder="请选择" style="width: 100%" > - 未试验 - 已试验 + + diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 7e7ff221..7667ea78 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -619,6 +619,7 @@ export default { this.open = true this.title = '添加用户' this.form.password = this.initPassword + this.form.deptId = this.queryParams.deptId; }) }, /** 修改按钮操作 */ From 0cd1273e59a19e109660d0693b864c34c553882c Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 26 Mar 2025 13:55:21 +0800 Subject: [PATCH 24/64] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E4=BB=A5=E5=8F=8Abug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../receive-apply/business-details.vue | 13 ++++--------- .../reduction-apply/business-details.vue | 15 +++++---------- src/views/home/equipment-supply/index.vue | 6 ++++-- 3 files changed, 13 insertions(+), 21 deletions(-) diff --git a/src/views/business-examine/receive-apply/business-details.vue b/src/views/business-examine/receive-apply/business-details.vue index 575dd6f4..54afd6a2 100644 --- a/src/views/business-examine/receive-apply/business-details.vue +++ b/src/views/business-examine/receive-apply/business-details.vue @@ -223,17 +223,12 @@ export default { .file-box { padding: 10px; - display: flex; - flex-wrap: wrap; - box-sizing: border-box; + display: grid; + grid-template-columns: repeat(12, 1fr); + grid-gap: 10px; div { - width: calc((100% - 110px) / 12); - height: 60px; - margin-right: 10px; - margin-top: 10px; + height: 80px; text-align: center; - line-height: 60px; - background-color: #19a4a0; } & div:nth-child(12n) { diff --git a/src/views/business-examine/reduction-apply/business-details.vue b/src/views/business-examine/reduction-apply/business-details.vue index 05d97b1c..c21ecc48 100644 --- a/src/views/business-examine/reduction-apply/business-details.vue +++ b/src/views/business-examine/reduction-apply/business-details.vue @@ -37,7 +37,7 @@ - + @@ -302,6 +303,7 @@ export default { onHandleReset() { this.queryDate = [] this.$refs.queryFormRef.resetFields() + this.getCardListFun() }, // 自定义事件 打开二级页面 onOpenLevelTwoPages(title) { From 1a9253c6a46d6bf8c57446bf820ed842dfda3b94 Mon Sep 17 00:00:00 2001 From: bb_pan Date: Wed, 26 Mar 2025 14:05:56 +0800 Subject: [PATCH 25/64] =?UTF-8?q?=E8=B4=AD=E7=BD=AE=E6=89=B9=E6=AC=A1?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=82=B9=E5=87=BB=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/material/ma/device/index.vue | 22 +++++++++++++++---- src/views/material/ma/type/index.vue | 4 ++-- .../material/purchase/goodsEntry/index.vue | 3 +++ 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/views/material/ma/device/index.vue b/src/views/material/ma/device/index.vue index 7fd9b734..883acb6a 100644 --- a/src/views/material/ma/device/index.vue +++ b/src/views/material/ma/device/index.vue @@ -70,11 +70,17 @@ - - + + + + - + From bedb9623357728eca0753a6c0aee12a0d073f328 Mon Sep 17 00:00:00 2001 From: bb_pan Date: Wed, 26 Mar 2025 18:13:50 +0800 Subject: [PATCH 29/64] =?UTF-8?q?=E6=96=B0=E8=B4=AD=E5=88=B0=E8=B4=A7?= =?UTF-8?q?=E9=AA=8C=E6=94=B6-=E5=A2=9E=E5=8A=A0=E9=AA=8C=E6=94=B6?= =?UTF-8?q?=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/purchase/goodsAccept.js | 11 ++++++-- .../material/purchase/goodsAccept/detail.vue | 28 ++++++++++++++++++- 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/src/api/purchase/goodsAccept.js b/src/api/purchase/goodsAccept.js index a7fd57e0..1e0416db 100644 --- a/src/api/purchase/goodsAccept.js +++ b/src/api/purchase/goodsAccept.js @@ -68,9 +68,14 @@ export function getPurchaseCheckFormByTaskId(taskId) { }) } - - - +// 验收人查询 +export function getCheckUserList(query) { + return request({ + url: '/material/purchase_check_info/getCheckUserList', + method: 'get', + params: query + }) +} diff --git a/src/views/material/purchase/goodsAccept/detail.vue b/src/views/material/purchase/goodsAccept/detail.vue index c916e1ba..65b5c90e 100644 --- a/src/views/material/purchase/goodsAccept/detail.vue +++ b/src/views/material/purchase/goodsAccept/detail.vue @@ -38,7 +38,7 @@ - + 新购到货验收 @@ -57,6 +57,9 @@ 不合格 + + 验收人:{{ checkUser }} + @@ -170,6 +173,7 @@ import { acceptInnerVerifyer, getPurchaseFileList, uploadPurchaseFile, + getCheckUserList, } from "@/api/purchase/goodsAccept"; import { downloadFile } from "@/utils/download"; import { getToken } from "@/utils/auth"; @@ -235,6 +239,8 @@ export default { // 上传的地址 url: process.env.VUE_APP_BASE_API + "/file/upload", }, + checkUserList: [], // 验收人列表 + checkUser: '', // 验收人 }; }, mounted() { @@ -252,8 +258,28 @@ export default { // this.getSupplierList() console.log(this.isView); this.getList(); + this.getCheckUser() }, methods: { + // 获取验收人 + async getCheckUser() { + try { + const res = await getCheckUserList({taskId: this.taskId}) + console.log('🚀 ~ getCheckUser ~ res:', res) + if (res.data) { + res.data.forEach(item => { + if (item.checkUser) { + this.checkUserList.push(item.checkUser) + } + }) + } + this.$nextTick(() => { + this.checkUser = this.checkUserList.join(', ') + }) + } catch (error) { + console.log('🚀 ~ getCheckUser ~ error:', error) + } + }, //是否可用勾选框 selectable(row) { console.log(row) From 822623eeefb900f58baf26af40457956577764ee Mon Sep 17 00:00:00 2001 From: bb_pan Date: Thu, 27 Mar 2025 15:28:12 +0800 Subject: [PATCH 30/64] =?UTF-8?q?bug=20=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../repair/repairManage/component/edit.vue | 31 ++++++++++++------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/src/views/material/repair/repairManage/component/edit.vue b/src/views/material/repair/repairManage/component/edit.vue index ebe62c0f..4d8874f3 100644 --- a/src/views/material/repair/repairManage/component/edit.vue +++ b/src/views/material/repair/repairManage/component/edit.vue @@ -1163,25 +1163,25 @@ export default { }, //编码-内部维修- 弹窗保存 saveInnerDialog() { - const isNum = this.partTableList.some( - (item) => item.partNum == 0 || item.partNum == undefined - ); - if (isNum) { - this.$message.error("配件数量不能为0!"); - return; - } + // const isNum = this.partTableList.some( + // (item) => item.partNum == 0 || item.partNum == undefined + // ); + // if (isNum) { + // this.$message.error("配件数量不能为0!"); + // return; + // } this.innerRowData.partTableList = this.partTableList; this.innerRowData.repairType = 1; this.innerRowData.partTableList.forEach((item) => { this.innerRowData.codeInRepairPartList.push(item); }); - if(this.partTableList.length==0) { - this.$message.error("请添加配件!"); - return; - }else{ + // if(this.partTableList.length==0) { + // this.$message.error("请添加配件!"); + // return; + // }else{ this.innerRowData.status = 1; this.openInner = false; - } + // } // console.log(this.equipmentList) }, @@ -1526,6 +1526,13 @@ export default { }, //数量管理保存 async saveNumAll() { + if((Number(this.formLeft.repairNum) + Number(this.formMiddle.repairNum)+ Number(this.formRight.scrapNum)) >this.disrepairNumTemp) { + this.$message({ + message: '维修总数不能大于待维修数量', + type: 'warning' + }) + return + } let refTemp = []; if(this.formLeft.repairNum!=0){ refTemp.push(this.$refs.formLeft) From 93d078d2be8e1fcbcbe686d23e1a4a01155b10b7 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Thu, 27 Mar 2025 15:48:32 +0800 Subject: [PATCH 31/64] =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/home/equipment-supply/components/card-model.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/home/equipment-supply/components/card-model.vue b/src/views/home/equipment-supply/components/card-model.vue index 2d4a7aa2..25434093 100644 --- a/src/views/home/equipment-supply/components/card-model.vue +++ b/src/views/home/equipment-supply/components/card-model.vue @@ -42,7 +42,7 @@ export default { type: Number, default: 0 }, - // 数量 + // 百分比 ratio: { type: Number, default: 0 @@ -53,7 +53,7 @@ export default { onHandleViewDetails() { console.log('查询二级页面', this.cardTitle) // 使用自定义事件 通知父组件打开二级页面 - this.$emit('onOpenLevelTwoPages', this.cardTitle) + // this.$emit('onOpenLevelTwoPages', this.cardTitle) } } } From dc6efc9d906adddf063c09ace99d3a81e51997e6 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Thu, 27 Mar 2025 16:58:44 +0800 Subject: [PATCH 32/64] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=9C=BA=E5=85=B7?= =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=B1=95=E7=A4=BA=E5=9B=BE=E8=A1=A8=E7=AD=89?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=B0=83=E8=AF=95=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/home/equipment-supply.js | 16 ++++++ .../equipment-supply/components/BarChart.vue | 39 ++++++++++++-- .../equipment-supply/components/LineChart.vue | 43 ++++++++++++--- .../components/PieChart_1.vue | 41 ++++++++++---- .../components/chart-model-box.vue | 53 ++++++++++++++++++- src/views/home/equipment-supply/index.vue | 50 +++++++++++++++-- 6 files changed, 219 insertions(+), 23 deletions(-) diff --git a/src/api/home/equipment-supply.js b/src/api/home/equipment-supply.js index 145846b0..0d8fecab 100644 --- a/src/api/home/equipment-supply.js +++ b/src/api/home/equipment-supply.js @@ -8,3 +8,19 @@ export const getCardListApi = data => { params: data }) } +// 获取饼图1数据信息 +export const getPie_1DataApi = data => { + return request({ + url: '/material/mainPage/getDemandTotal', + method: 'get', + params: data + }) +} +// 获取柱状图和折线图数据信息 +export const getBarAndLineDataApi = data => { + return request({ + url: '/material/mainPage/getDemandList', + method: 'get', + params: data + }) +} diff --git a/src/views/home/equipment-supply/components/BarChart.vue b/src/views/home/equipment-supply/components/BarChart.vue index a55a3914..f9d32853 100644 --- a/src/views/home/equipment-supply/components/BarChart.vue +++ b/src/views/home/equipment-supply/components/BarChart.vue @@ -23,6 +23,18 @@ export default { height: { type: String, default: '100%' + }, + barAndLineX: { + type: Array, + default: () => ['机具'] + }, + barY1: { + type: Array, + default: () => ['0'] + }, + barY2: { + type: Array, + default: () => ['0'] } }, data() { @@ -42,6 +54,26 @@ export default { this.chart.dispose() this.chart = null }, + watch: { + barAndLineX: { + deep: true, + handler() { + this.initChart() + } + }, + barY1: { + deep: true, + handler() { + this.initChart() + } + }, + barY2: { + deep: true, + handler() { + this.initChart() + } + } + }, methods: { initChart() { this.chart = echarts.init(this.$el, 'macarons') @@ -77,7 +109,8 @@ export default { xAxis: [ { type: 'category', - data: ['卸扣5t', '卸扣8t', '手扳葫芦', '绞磨', '机具1', '机具2', '机具13'], + // data: ['卸扣5t', '卸扣8t', '手扳葫芦', '绞磨', '机具1', '机具2', '机具13'], + data: this.barAndLineX, axisTick: { alignWithLabel: true }, @@ -111,7 +144,7 @@ export default { name: '需求', type: 'bar', barWidth: '20%', // 柱子宽度 - data: [79, 52, 200, 334, 390, 330, 220], + data: this.barY1, animationDuration: 2000, itemStyle: { color: '#26a8ff' // 自定义颜色 @@ -121,7 +154,7 @@ export default { name: '供应', type: 'bar', barWidth: '20%', // 柱子宽度 - data: [80, 52, 200, 334, 390, 330, 220], + data: this.barY2, animationDuration: 2000, itemStyle: { color: '#ff8e9d' // 自定义颜色 diff --git a/src/views/home/equipment-supply/components/LineChart.vue b/src/views/home/equipment-supply/components/LineChart.vue index 978c868d..298eda3e 100644 --- a/src/views/home/equipment-supply/components/LineChart.vue +++ b/src/views/home/equipment-supply/components/LineChart.vue @@ -29,6 +29,24 @@ export default { chartData: { type: Object, required: true + }, + barAndLineX: { + type: Array, + default: () => ['机具'] + }, + // 折线图 Y 轴数据源1 + lineY1: { + type: Array, + default: () => { + return [] + } + }, + // 折线图 Y 轴数据源2 + lineY2: { + type: Array, + default: () => { + return [] + } } }, data() { @@ -37,10 +55,22 @@ export default { } }, watch: { - chartData: { + barAndLineX: { deep: true, - handler(val) { - this.setOptions(val) + handler() { + this.initChart() + } + }, + lineY1: { + deep: true, + handler() { + this.initChart() + } + }, + lineY2: { + deep: true, + handler() { + this.initChart() } } }, @@ -65,7 +95,8 @@ export default { this.chart.setOption({ xAxis: { type: 'category', - data: ['卸扣5t', '卸扣8t', '手扳葫芦', '绞磨', '机具1', '机具2', '机具13'], + // data: ['卸扣5t', '卸扣8t', '手扳葫芦', '绞磨', '机具1', '机具2', '机具13'], + data: this.barAndLineX, boundaryGap: false, // 折线与 y 轴不留间隙 axisTick: { show: true // 隐藏刻度线 @@ -124,7 +155,7 @@ export default { name: '需求量', type: 'line', smooth: false, // 平滑曲线 - data: [12, 66, 88, 90, 70, 110, 20], // 数据 + data: this.lineY1, // 数据 itemStyle: { color: '#33aeff' // 折线颜色 }, @@ -144,7 +175,7 @@ export default { name: '待供应量', type: 'line', smooth: false, // 平滑曲线 - data: [12, 20, 22, 30, 99, 60, 3], // 数据 + data: this.lineY2, // 数据 itemStyle: { color: '#ff8e9d' // 折线颜色 }, diff --git a/src/views/home/equipment-supply/components/PieChart_1.vue b/src/views/home/equipment-supply/components/PieChart_1.vue index fb7f750e..a3d46d8b 100644 --- a/src/views/home/equipment-supply/components/PieChart_1.vue +++ b/src/views/home/equipment-supply/components/PieChart_1.vue @@ -21,6 +21,16 @@ export default { height: { type: String, default: '100%' + }, + pie_1Data: { + type: Array, + default: () => { + return [ + { value: 0, name: '计划需求量', itemStyle: { color: '#65dfe0' } }, + { value: 0, name: '已供应量', itemStyle: { color: '#ff8e9d' } }, + { value: 0, name: '待供应量', itemStyle: { color: '#6ccaf6' } } + ] + } } }, data() { @@ -30,7 +40,7 @@ export default { }, mounted() { this.$nextTick(() => { - this.initChart() + this.initChart(this.pie_1Data) }) }, beforeDestroy() { @@ -40,20 +50,29 @@ export default { this.chart.dispose() this.chart = null }, + watch: { + pie_1Data: { + deep: true, + handler(val) { + this.initChart(val) + } + } + }, methods: { - initChart() { + initChart(pie_1Data) { this.chart = echarts.init(this.$el, 'macarons') this.chart.setOption({ tooltip: { trigger: 'item', - formatter: '{b} : {c} ({d}%)' + // formatter: '{b} : {c} ({d}%)' + formatter: '{b} {c}' }, legend: { left: 'center', bottom: '0', icon: 'circle', - data: ['待供应量', '计划需求量', '已供应量'] + data: ['计划需求量', '已供应量', '待供应量'] }, series: [ { @@ -61,11 +80,12 @@ export default { // roseType: 'radius', // radius 为玫瑰饼图 radius: [0, 95], center: ['50%', '50%'], - data: [ - { value: 320, name: '待供应量', itemStyle: { color: '#6ccaf6' } }, - { value: 240, name: '计划需求量', itemStyle: { color: '#65dfe0' } }, - { value: 149, name: '已供应量', itemStyle: { color: '#ff8e9d' } } - ], + // data: [ + // { value: 320, name: '待供应量', itemStyle: { color: '#6ccaf6' } }, + // { value: 240, name: '计划需求量', itemStyle: { color: '#65dfe0' } }, + // { value: 149, name: '已供应量', itemStyle: { color: '#ff8e9d' } } + // ], + data: pie_1Data, animationEasing: 'cubicInOut', animationDuration: 2600, itemStyle: { @@ -74,7 +94,8 @@ export default { }, label: { show: true, // 显示标签 - formatter: '{b}: {d}%', // 显示 name 和比率 + // formatter: '{b}: {d}%', // 显示 name 和比率 + formatter: '{b} {c}%', // 显示 name 和比率 fontSize: 12, // 字体大小 color: '#333' // 字体颜色 } diff --git a/src/views/home/equipment-supply/components/chart-model-box.vue b/src/views/home/equipment-supply/components/chart-model-box.vue index 491a1504..0e7fffdb 100644 --- a/src/views/home/equipment-supply/components/chart-model-box.vue +++ b/src/views/home/equipment-supply/components/chart-model-box.vue @@ -3,7 +3,16 @@
{{ chartTitle }}
- +
@@ -28,6 +37,48 @@ export default { ChartTypeName: { type: String, default: 'PieChart' + }, + // 饼图 1 数据源 + pie_1Data: { + type: Array, + default: () => { + return [] + } + }, + // 饼图和折线图 X 轴数据源 + barAndLineX: { + type: Array, + default: () => { + return [] + } + }, + // 柱图 Y 轴数据源1 + barY1: { + type: Array, + default: () => { + return [] + } + }, + // 柱图 Y 轴数据源2 + barY2: { + type: Array, + default: () => { + return [] + } + }, + // 折线图 Y 轴数据源1 + lineY1: { + type: Array, + default: () => { + return [] + } + }, + // 折线图 Y 轴数据源2 + lineY2: { + type: Array, + default: () => { + return [] + } } }, data() { diff --git a/src/views/home/equipment-supply/index.vue b/src/views/home/equipment-supply/index.vue index 34bdc411..b01f359f 100644 --- a/src/views/home/equipment-supply/index.vue +++ b/src/views/home/equipment-supply/index.vue @@ -104,7 +104,16 @@
- +
@@ -123,7 +132,7 @@ import TableModel from './components/table-model' // 二级页面列表组件 import Treeselect from '@riophae/vue-treeselect' import '@riophae/vue-treeselect/dist/vue-treeselect.css' -import { getCardListApi } from '@/api/home/equipment-supply.js' +import { getCardListApi, getPie_1DataApi, getBarAndLineDataApi } from '@/api/home/equipment-supply.js' import { getListProject, getListUnite } from '@/api/lease/apply' export default { components: { @@ -250,7 +259,13 @@ export default { title: '待供应占比统计', type: 'LineChart' } - ] + ], + pie_1Data: [], + barAndLineX: [], + barY1: [], + lineY1: [], + barY2: [], + lineY2: [] } }, methods: { @@ -287,7 +302,34 @@ export default { this.cardList_3[0].cardNum = projectNum this.cardList_3[1].cardNum = suppliedQuantityAllNum || 0 this.cardList_3[2].cardNum = suppliedQuantityPrice || 0 + + // 获取饼图和柱状图 + const { data: barAndLine } = await getBarAndLineDataApi(queryParams) + const { typeNameList, demandNumList, suppliedQuantityNumList, suppliedToBeQuantityNumList } = barAndLine + this.barAndLineX = typeNameList + this.barY1 = demandNumList + this.lineY1 = demandNumList + this.barY2 = suppliedQuantityNumList + this.lineY2 = suppliedToBeQuantityNumList + + console.log('barAndLine', barAndLine) }, + // 获取图表数据 + async getPie_1DataFun() { + const queryParams = { + ...this.queryParams, + startTime: this.queryDate && this.queryDate.length > 0 ? this.queryDate[0] : '', + endTime: this.queryDate && this.queryDate.length > 0 ? this.queryDate[1] : '' + } + const { data: pie1 } = await getPie_1DataApi(queryParams) + const { demandNum, suppliedQuantityNum, suppliedToBeQuantityNum } = pie1 + this.pie_1Data = [ + { value: demandNum, name: '计划需求量', itemStyle: { color: '#65dfe0' } }, + { value: suppliedQuantityNum, name: '已供应量', itemStyle: { color: '#ff8e9d' } }, + { value: suppliedToBeQuantityNum, name: '待供应量', itemStyle: { color: '#6ccaf6' } } + ] + }, + // 获取公司和工程 async getCompanyAndProjectFun() { const comRes = await getListUnite({ projectId: null }) @@ -298,6 +340,7 @@ export default { // 查询 onHandleSearch() { this.getCardListFun() + this.getPie_1DataFun() }, // 重置 onHandleReset() { @@ -354,6 +397,7 @@ export default { this.queryDate = this.getDefaultDateRange() this.getCompanyAndProjectFun() this.getCardListFun() + this.getPie_1DataFun() } } From cfb377d74c180b0347cf163f23a75809125f2b79 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Thu, 27 Mar 2025 17:55:22 +0800 Subject: [PATCH 33/64] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/home/equipment-supply/index.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/home/equipment-supply/index.vue b/src/views/home/equipment-supply/index.vue index b01f359f..38695876 100644 --- a/src/views/home/equipment-supply/index.vue +++ b/src/views/home/equipment-supply/index.vue @@ -347,6 +347,7 @@ export default { this.queryDate = this.getDefaultDateRange() this.$refs.queryFormRef.resetFields() this.getCardListFun() + this.getPie_1DataFun() }, // 自定义事件 打开二级页面 onOpenLevelTwoPages(title) { From 982fb201eacdafcfa0ec70ac711973aa2726c340 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Fri, 28 Mar 2025 11:21:38 +0800 Subject: [PATCH 34/64] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=9C=BA=E5=85=B7?= =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=9B=BE=E8=A1=A8=E7=AD=89=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/home/equipment-supply.js | 18 +++++ .../components/PieChart_1.vue | 12 ++- .../components/PieChart_2.vue | 48 +++++++++--- .../components/chart-model-box.vue | 8 ++ src/views/home/equipment-supply/index.vue | 77 ++++++++++++++++--- 5 files changed, 139 insertions(+), 24 deletions(-) diff --git a/src/api/home/equipment-supply.js b/src/api/home/equipment-supply.js index 0d8fecab..52f93b84 100644 --- a/src/api/home/equipment-supply.js +++ b/src/api/home/equipment-supply.js @@ -8,6 +8,15 @@ export const getCardListApi = data => { params: data }) } + +// 获取第二行卡片列表信息 +export const getCardList_2Api = data => { + return request({ + url: '/material//mainPage/getMaTypeHomeList', + method: 'get', + params: data + }) +} // 获取饼图1数据信息 export const getPie_1DataApi = data => { return request({ @@ -16,6 +25,15 @@ export const getPie_1DataApi = data => { params: data }) } +// 获取饼图2数据信息 +export const getPie_2DataApi = data => { + return request({ + url: '/material/mainPage/getMaTypeStatusTotal', + method: 'get', + params: data + }) +} + // 获取柱状图和折线图数据信息 export const getBarAndLineDataApi = data => { return request({ diff --git a/src/views/home/equipment-supply/components/PieChart_1.vue b/src/views/home/equipment-supply/components/PieChart_1.vue index a3d46d8b..4fa598f0 100644 --- a/src/views/home/equipment-supply/components/PieChart_1.vue +++ b/src/views/home/equipment-supply/components/PieChart_1.vue @@ -61,12 +61,12 @@ export default { methods: { initChart(pie_1Data) { this.chart = echarts.init(this.$el, 'macarons') - + const total = pie_1Data.reduce((sum, item) => sum + item.value, 0) this.chart.setOption({ tooltip: { trigger: 'item', - // formatter: '{b} : {c} ({d}%)' - formatter: '{b} {c}' + formatter: '{b} : {c} ({d}%)' + // formatter: '{b} {c}' }, legend: { left: 'center', @@ -95,7 +95,11 @@ export default { label: { show: true, // 显示标签 // formatter: '{b}: {d}%', // 显示 name 和比率 - formatter: '{b} {c}%', // 显示 name 和比率 + formatter: function (params) { + const percent = + params.data.value == 0 ? 0 : ((params.data.value / total) * 100).toFixed(2) + return `${params.name}: ${percent}%` + }, fontSize: 12, // 字体大小 color: '#333' // 字体颜色 } diff --git a/src/views/home/equipment-supply/components/PieChart_2.vue b/src/views/home/equipment-supply/components/PieChart_2.vue index aaafcb13..32b72e1f 100644 --- a/src/views/home/equipment-supply/components/PieChart_2.vue +++ b/src/views/home/equipment-supply/components/PieChart_2.vue @@ -21,6 +21,18 @@ export default { height: { type: String, default: '100%' + }, + pie_2Data: { + type: Array, + default: () => { + return [ + { value: 0, name: '在库量', itemStyle: { color: '#26a8ff' } }, + { value: 0, name: '在用量', itemStyle: { color: '#45d8d9' } }, + { value: 0, name: '在修量', itemStyle: { color: '#ff8e9d' } }, + { value: 0, name: '新购待入库量', itemStyle: { color: '#6ccaf6' } }, + { value: 0, name: '修试待入库量', itemStyle: { color: '#ffb667' } } + ] + } } }, data() { @@ -30,7 +42,7 @@ export default { }, mounted() { this.$nextTick(() => { - this.initChart() + this.initChart(this.pie_2Data) }) }, beforeDestroy() { @@ -40,10 +52,18 @@ export default { this.chart.dispose() this.chart = null }, + watch: { + pie_2Data: { + deep: true, + handler(val) { + this.initChart(val) + } + } + }, methods: { - initChart() { + initChart(pie_2Data) { this.chart = echarts.init(this.$el, 'macarons') - + const total = pie_2Data.reduce((sum, item) => sum + item.value, 0) this.chart.setOption({ tooltip: { trigger: 'item', @@ -61,13 +81,14 @@ export default { // roseType: 'radius', // radius 为玫瑰饼图 radius: [60, 95], center: ['50%', '50%'], - data: [ - { value: 320, name: '在库量', itemStyle: { color: '#26a8ff' } }, - { value: 240, name: '在用量', itemStyle: { color: '#45d8d9' } }, - { value: 120, name: '在修量', itemStyle: { color: '#ff8e9d' } }, - { value: 80, name: '新购待入库量', itemStyle: { color: '#6ccaf6' } }, - { value: 90, name: '修试待入库量', itemStyle: { color: '#ffb667' } } - ], + // data: [ + // { value: 320, name: '在库量', itemStyle: { color: '#26a8ff' } }, + // { value: 240, name: '在用量', itemStyle: { color: '#45d8d9' } }, + // { value: 120, name: '在修量', itemStyle: { color: '#ff8e9d' } }, + // { value: 80, name: '新购待入库量', itemStyle: { color: '#6ccaf6' } }, + // { value: 90, name: '修试待入库量', itemStyle: { color: '#ffb667' } } + // ], + data: pie_2Data, animationEasing: 'cubicInOut', animationDuration: 2600, itemStyle: { @@ -76,7 +97,12 @@ export default { }, label: { show: true, // 显示标签 - formatter: '{b}: {d}%', // 显示 name 和比率 + // formatter: '{b}: {d}%', // 显示 name 和比率 + formatter: function (params) { + const percent = + params.data.value == 0 ? 0 : ((params.data.value / total) * 100).toFixed(2) + return `${params.name}: ${percent}%` + }, fontSize: 12, // 字体大小 color: '#333' // 字体颜色 } diff --git a/src/views/home/equipment-supply/components/chart-model-box.vue b/src/views/home/equipment-supply/components/chart-model-box.vue index 0e7fffdb..45bca8b3 100644 --- a/src/views/home/equipment-supply/components/chart-model-box.vue +++ b/src/views/home/equipment-supply/components/chart-model-box.vue @@ -7,6 +7,7 @@ :is="ChartTypeName" :chartData="chartData" :pie_1Data="pie_1Data" + :pie_2Data="pie_2Data" :barAndLineX="barAndLineX" :barY1="barY1" :barY2="barY2" @@ -45,6 +46,13 @@ export default { return [] } }, + // 饼图 2 数据源 + pie_2Data: { + type: Array, + default: () => { + return [] + } + }, // 饼图和折线图 X 轴数据源 barAndLineX: { type: Array, diff --git a/src/views/home/equipment-supply/index.vue b/src/views/home/equipment-supply/index.vue index 38695876..09b9ca19 100644 --- a/src/views/home/equipment-supply/index.vue +++ b/src/views/home/equipment-supply/index.vue @@ -95,6 +95,8 @@ :iconType="card.icon" :cardTitle="card.title" :isReduce="card.isReduce" + :cardNum="card.cardNum" + :ratio="card.ratio" @onOpenLevelTwoPages="onOpenLevelTwoPages" /> @@ -108,6 +110,7 @@ :chartTitle="chart.title" :ChartTypeName="chart.type" :pie_1Data="pie_1Data" + :pie_2Data="pie_2Data" :barAndLineX="barAndLineX" :barY1="barY1" :barY2="barY2" @@ -132,7 +135,13 @@ import TableModel from './components/table-model' // 二级页面列表组件 import Treeselect from '@riophae/vue-treeselect' import '@riophae/vue-treeselect/dist/vue-treeselect.css' -import { getCardListApi, getPie_1DataApi, getBarAndLineDataApi } from '@/api/home/equipment-supply.js' +import { + getCardListApi, + getPie_1DataApi, + getPie_2DataApi, + getCardList_2Api, + getBarAndLineDataApi +} from '@/api/home/equipment-supply.js' import { getListProject, getListUnite } from '@/api/lease/apply' export default { components: { @@ -193,31 +202,41 @@ export default { title: '在库量', theme: '#5ad55a', icon: 'In_the_library', - isReduce: false + isReduce: false, + cardNum: 0, + ratio: 0 }, { title: '在用量', theme: '#0099ff', icon: 'In_use', - isReduce: true + isReduce: true, + cardNum: 0, + ratio: 0 }, { title: '在修量', theme: '#8167f5', icon: 'In_repair', - isReduce: false + isReduce: false, + cardNum: 0, + ratio: 0 }, { title: '新购待入库量', theme: '#bfbf00', icon: 'penning_store', - isReduce: true + isReduce: true, + cardNum: 0, + ratio: 0 }, { title: '修试待入库量', theme: '#b8741a', icon: 'repair_store', - isReduce: true + isReduce: true, + cardNum: 0, + ratio: 0 } ], cardList_3: [ @@ -261,6 +280,7 @@ export default { } ], pie_1Data: [], + pie_2Data: [], barAndLineX: [], barY1: [], lineY1: [], @@ -289,13 +309,13 @@ export default { suppliedQuantityPrice } = res this.cardList_1[0].cardNum = demandNum - this.cardList_1[0].ratio = demandIncrease + this.cardList_1[0].ratio = Math.abs(demandIncrease) demandIncrease > 0 ? (this.cardList_1[0].isReduce = true) : (this.cardList_1[0].isReduce = false) this.cardList_1[1].cardNum = suppliedQuantityNum - this.cardList_1[1].ratio = suppliedQuantityIncrease + this.cardList_1[1].ratio = Math.abs(suppliedQuantityIncrease) suppliedQuantityIncrease > 0 ? (this.cardList_1[1].isReduce = true) : (this.cardList_1[1].isReduce = false) this.cardList_1[2].cardNum = suppliedToBeQuantityNum - this.cardList_1[2].ratio = suppliedToBeQuantityIncrease + this.cardList_1[2].ratio = Math.abs(suppliedToBeQuantityIncrease) suppliedToBeQuantityIncrease > 0 ? (this.cardList_1[2].isReduce = true) : (this.cardList_1[2].isReduce = false) @@ -303,6 +323,45 @@ export default { this.cardList_3[1].cardNum = suppliedQuantityAllNum || 0 this.cardList_3[2].cardNum = suppliedQuantityPrice || 0 + // 获取第二行卡片数据 + const { data: result } = await getCardList_2Api(queryParams) + const { + inStockNum, + inStockIncrease, + inUseNum, + inUseIncrease, + inRepairNum, + inRepairIncrease, + newPurchaseNum, + newPurchaseIncrease, + newRepairNum, + newRepairIncrease + } = result + + this.cardList_2[0].cardNum = inStockNum + this.cardList_2[0].ratio = Math.abs(inStockIncrease) + inStockIncrease > 0 ? (this.cardList_2[0].isReduce = true) : (this.cardList_2[0].isReduce = false) + this.cardList_2[1].cardNum = inUseNum + this.cardList_2[1].ratio = Math.abs(inUseIncrease) + inUseIncrease > 0 ? (this.cardList_2[1].isReduce = true) : (this.cardList_2[1].isReduce = false) + this.cardList_2[2].cardNum = inRepairNum + this.cardList_2[2].ratio = Math.abs(inRepairIncrease) + inRepairIncrease > 0 ? (this.cardList_2[2].isReduce = true) : (this.cardList_2[2].isReduce = false) + this.cardList_2[3].cardNum = newPurchaseNum + this.cardList_2[3].ratio = Math.abs(newPurchaseIncrease) + newPurchaseIncrease > 0 ? (this.cardList_2[3].isReduce = true) : (this.cardList_2[3].isReduce = false) + this.cardList_2[4].cardNum = newRepairNum + this.cardList_2[4].ratio = Math.abs(newRepairIncrease) + newRepairIncrease > 0 ? (this.cardList_2[4].isReduce = true) : (this.cardList_2[4].isReduce = false) + + this.pie_2Data = [ + { value: inStockNum, name: '在库量', itemStyle: { color: '#26a8ff' } }, + { value: inUseNum, name: '在用量', itemStyle: { color: '#45d8d9' } }, + { value: inRepairNum, name: '在修量', itemStyle: { color: '#ff8e9d' } }, + { value: newPurchaseNum, name: '新购待入库量', itemStyle: { color: '#6ccaf6' } }, + { value: newRepairNum, name: '修试待入库量', itemStyle: { color: '#ffb667' } } + ] + // 获取饼图和柱状图 const { data: barAndLine } = await getBarAndLineDataApi(queryParams) const { typeNameList, demandNumList, suppliedQuantityNumList, suppliedToBeQuantityNumList } = barAndLine From 5ffd0000cb6b7d437dd64f5a18ce726cb3871740 Mon Sep 17 00:00:00 2001 From: bb_pan Date: Mon, 31 Mar 2025 09:53:28 +0800 Subject: [PATCH 35/64] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/home/equipment-supply/index.vue | 12 +++++------- src/views/home/maintain-balance/index.vue | 12 +++++------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/views/home/equipment-supply/index.vue b/src/views/home/equipment-supply/index.vue index 09b9ca19..daf6b8a6 100644 --- a/src/views/home/equipment-supply/index.vue +++ b/src/views/home/equipment-supply/index.vue @@ -431,15 +431,14 @@ export default { // 默认日期范围 getDefaultDateRange() { const today = new Date() - const lastMonth = new Date() - // 设置为前一个月 + // 获取上个月的同一天 + const lastMonth = new Date(today) lastMonth.setMonth(today.getMonth() - 1) - // 处理跨年情况 - if (today.getMonth() === 0) { - lastMonth.setFullYear(today.getFullYear() - 1) - lastMonth.setMonth(11) + // 处理日期溢出问题 + if (lastMonth.getDate() !== today.getDate()) { + lastMonth.setDate(0) // 设置为上个月的最后一天 } const formatDate = date => { @@ -449,7 +448,6 @@ export default { return `${y}-${m}-${d}` } - // 返回从前一个月到今天的日期范围 return [formatDate(lastMonth), formatDate(today)] } }, diff --git a/src/views/home/maintain-balance/index.vue b/src/views/home/maintain-balance/index.vue index 4f995c37..6afa25d4 100644 --- a/src/views/home/maintain-balance/index.vue +++ b/src/views/home/maintain-balance/index.vue @@ -224,15 +224,14 @@ export default { // 默认日期范围 getDefaultDateRange() { const today = new Date() - const lastMonth = new Date() - // 设置为前一个月 + // 获取上个月的同一天 + const lastMonth = new Date(today) lastMonth.setMonth(today.getMonth() - 1) - // 处理跨年情况 - if (today.getMonth() === 0) { - lastMonth.setFullYear(today.getFullYear() - 1) - lastMonth.setMonth(11) + // 处理日期溢出问题 + if (lastMonth.getDate() !== today.getDate()) { + lastMonth.setDate(0) // 设置为上个月的最后一天 } const formatDate = date => { @@ -242,7 +241,6 @@ export default { return `${y}-${m}-${d}` } - // 返回从前一个月到今天的日期范围 return [formatDate(lastMonth), formatDate(today)] }, // 导出数据 From a85d9ef1b47ec341ea90823a5e41d64fa03a930d Mon Sep 17 00:00:00 2001 From: bb_pan Date: Mon, 31 Mar 2025 12:12:28 +0800 Subject: [PATCH 36/64] =?UTF-8?q?=E5=AE=8F=E6=BA=90=E7=8E=AF=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.env.production b/.env.production index 428e553f..3cb81c02 100644 --- a/.env.production +++ b/.env.production @@ -5,4 +5,6 @@ VUE_APP_TITLE = 智能机具管理系统 ENV = 'production' # 智能机具管理系统/生产环境 -VUE_APP_BASE_API = '/prod-api' +# VUE_APP_BASE_API = '/prod-api' +# 智能机具管理系统/宏源环境 +VUE_APP_BASE_API = '/jiju-api' From e8c14c01d87b7e16bdec7c376ab9298dc9c5fdb3 Mon Sep 17 00:00:00 2001 From: bb_pan Date: Mon, 31 Mar 2025 14:21:10 +0800 Subject: [PATCH 37/64] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/material/back/component/addReturn.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/views/material/back/component/addReturn.vue b/src/views/material/back/component/addReturn.vue index 425aac07..a71a1b88 100644 --- a/src/views/material/back/component/addReturn.vue +++ b/src/views/material/back/component/addReturn.vue @@ -1131,9 +1131,8 @@ export default { this.maCodeList.forEach(sub => { if (sub.maId == item.maId) { this.$nextTick(() => { - setTimeout(() => { - this.$refs.codeTableList.toggleRowSelection(item, true) - }, 500) + this.$refs.codeTableList.toggleRowSelection(item, true) + item.apDetection = sub.apDetection }) } }) @@ -1141,13 +1140,13 @@ export default { } else { //新增回显勾选 // console.log("新增") + console.log(this.maCodeList, '新增') this.machineList.forEach(item => { this.maCodeList.forEach(sub => { if (sub.maId == item.maId) { this.$nextTick(() => { - setTimeout(() => { - this.$refs.codeTableList.toggleRowSelection(item, true) - }, 500) + this.$refs.codeTableList.toggleRowSelection(item, true) + item.apDetection = sub.apDetection }) } }) @@ -1159,6 +1158,7 @@ export default { this.open = true }, codeSelectionChange(selection) { + if (!this.open) return this.maCodeList = selection // console.log(selection) // this.queryParams.equipmentList = selection From b264c3d0605261071d2a181ee96ac2e113e9153b Mon Sep 17 00:00:00 2001 From: bb_pan Date: Mon, 31 Mar 2025 16:07:11 +0800 Subject: [PATCH 38/64] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../material/back/component/addReturn.vue | 18 +++++------ src/views/material/report/scrapReport.vue | 31 +++++++++++++------ 2 files changed, 30 insertions(+), 19 deletions(-) diff --git a/src/views/material/back/component/addReturn.vue b/src/views/material/back/component/addReturn.vue index a71a1b88..14b1c8c5 100644 --- a/src/views/material/back/component/addReturn.vue +++ b/src/views/material/back/component/addReturn.vue @@ -866,6 +866,9 @@ export default { // 获取 任务详情数据 async GetViewByApply(params) { const res = await getBackApplyInfo(this.rowId) + if (res.msg) { + this.$message.warning(res.msg) + } console.log(res) const data = res.data this.queryParams.unitId = data.backApplyInfo.unitId @@ -1103,6 +1106,7 @@ export default { typeId: typeId } await getMachineById(param).then(res => { + console.log('🚀 ~ awaitgetMachineById ~ res.data:', res.data) this.machineList = res.data this.machineList.forEach(item => { item.bmFileInfos = [] @@ -1119,20 +1123,16 @@ export default { console.log(this.maCodeList) console.log(this.machineList) if (this.rowId != '') { - // //编辑插入已选数据后再回显勾选 - this.rowData.tempMaCodeList.forEach(item => { - this.machineList.unshift(item) //插入 - // this.$nextTick(() => { - // this.$refs.codeTableList.toggleRowSelection(item, true) - // }) - }) this.maCodeList = this.rowData.maCodeList + console.log('🚀 ~ 编辑 ~ this.maCodeList:', this.maCodeList) this.machineList.forEach(item => { this.maCodeList.forEach(sub => { if (sub.maId == item.maId) { this.$nextTick(() => { - this.$refs.codeTableList.toggleRowSelection(item, true) - item.apDetection = sub.apDetection + setTimeout(() => { + this.$refs.codeTableList.toggleRowSelection(item, true) + item.apDetection = sub.apDetection + }, 200) }) } }) diff --git a/src/views/material/report/scrapReport.vue b/src/views/material/report/scrapReport.vue index 3636bf0e..a1021497 100644 --- a/src/views/material/report/scrapReport.vue +++ b/src/views/material/report/scrapReport.vue @@ -42,31 +42,42 @@ {{ (queryParams.pageNum - 1) * 10 + scope.$index }}
- - + + - + - --> + + + + + - - - - + Date: Mon, 31 Mar 2025 16:13:56 +0800 Subject: [PATCH 39/64] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/material/back/component/queryReturn.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/views/material/back/component/queryReturn.vue b/src/views/material/back/component/queryReturn.vue index 7d4f39dd..55a4ba4d 100644 --- a/src/views/material/back/component/queryReturn.vue +++ b/src/views/material/back/component/queryReturn.vue @@ -645,6 +645,9 @@ export default { // 获取 任务详情数据 async GetViewByApply(params) { const res = await getBackApplyInfo(this.rowId) + if (res.msg) { + this.$message.warning(res.msg) + } console.log(res) const data = res.data console.log(data) From 0bb1823d793405c3469912f9785768e8ed494c5e Mon Sep 17 00:00:00 2001 From: bb_pan Date: Mon, 31 Mar 2025 16:32:43 +0800 Subject: [PATCH 40/64] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/material/back/component/addReturn.vue | 2 +- src/views/material/back/component/queryReturn.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/material/back/component/addReturn.vue b/src/views/material/back/component/addReturn.vue index 14b1c8c5..e7d1290b 100644 --- a/src/views/material/back/component/addReturn.vue +++ b/src/views/material/back/component/addReturn.vue @@ -866,7 +866,7 @@ export default { // 获取 任务详情数据 async GetViewByApply(params) { const res = await getBackApplyInfo(this.rowId) - if (res.msg) { + if (res.msg && res.msg != '操作成功') { this.$message.warning(res.msg) } console.log(res) diff --git a/src/views/material/back/component/queryReturn.vue b/src/views/material/back/component/queryReturn.vue index 55a4ba4d..d452d2b4 100644 --- a/src/views/material/back/component/queryReturn.vue +++ b/src/views/material/back/component/queryReturn.vue @@ -645,7 +645,7 @@ export default { // 获取 任务详情数据 async GetViewByApply(params) { const res = await getBackApplyInfo(this.rowId) - if (res.msg) { + if (res.msg && res.msg != '操作成功') { this.$message.warning(res.msg) } console.log(res) From 4833acff1cf0d59fd35875b8567a21474fc5936a Mon Sep 17 00:00:00 2001 From: bb_pan Date: Mon, 31 Mar 2025 19:13:08 +0800 Subject: [PATCH 41/64] =?UTF-8?q?=E9=80=80=E6=96=99=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 6 +- src/api/repair-testing/material-return.js | 4 +- .../components/dialogModel.vue | 108 ++++------ .../repair-testing/material-return/index.vue | 190 +++++++++++------- 4 files changed, 159 insertions(+), 149 deletions(-) diff --git a/.env.production b/.env.production index 3cb81c02..90c9871f 100644 --- a/.env.production +++ b/.env.production @@ -5,6 +5,6 @@ VUE_APP_TITLE = 智能机具管理系统 ENV = 'production' # 智能机具管理系统/生产环境 -# VUE_APP_BASE_API = '/prod-api' -# 智能机具管理系统/宏源环境 -VUE_APP_BASE_API = '/jiju-api' +VUE_APP_BASE_API = '/prod-api' +# 智能机具管理系统/宏源环境 iws/jxhzb-api +# VUE_APP_BASE_API = '/iws/jiju-api' diff --git a/src/api/repair-testing/material-return.js b/src/api/repair-testing/material-return.js index ac18524a..e2f7e3bb 100644 --- a/src/api/repair-testing/material-return.js +++ b/src/api/repair-testing/material-return.js @@ -3,7 +3,7 @@ import request from '@/utils/request' // 获取列表 export const getTableListApi = data => { return request({ - url: '/***', + url: '/material/back_apply_info/selectBackApplyList', method: 'get', params: data }) @@ -11,7 +11,7 @@ export const getTableListApi = data => { // 获取退料数量详情 export const getReturnNumDetailsApi = data => { return request({ - url: '/***', + url: '/material/back_apply_info/selectSecondList', method: 'get', params: data }) diff --git a/src/views/repair-testing/material-return/components/dialogModel.vue b/src/views/repair-testing/material-return/components/dialogModel.vue index 10ea6b6c..922e1a5d 100644 --- a/src/views/repair-testing/material-return/components/dialogModel.vue +++ b/src/views/repair-testing/material-return/components/dialogModel.vue @@ -3,7 +3,7 @@ - + @@ -30,15 +30,18 @@ > diff --git a/src/views/repair-testing/repair-accessory/components/dialogModel.vue b/src/views/repair-testing/repair-accessory/components/dialogModel.vue index b938a932..80bd81b0 100644 --- a/src/views/repair-testing/repair-accessory/components/dialogModel.vue +++ b/src/views/repair-testing/repair-accessory/components/dialogModel.vue @@ -1,18 +1,19 @@