From bb97abdb1a185c785bbfa429c91b09fac1b15acf Mon Sep 17 00:00:00 2001 From: "hongrui.an" <297504645@qq.com> Date: Sat, 9 Aug 2025 18:11:20 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=BA=E9=99=B7=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pg-fis/basedate/customerPartCfg/index.vue | 2 +- .../basedate/m100Online/RepetitionMB.vue | 18 +- .../basedate/m100Online/normalPritIndex.vue | 193 +++++----- .../pg-fis/basedate/m110Search/index.vue | 4 +- .../pg-fis/basedate/r100Online/index.vue | 14 +- .../pg-fis/basedate/repeatR100/index.vue | 346 +++++++++--------- .../views/pg-fis/basedate/select/index.vue | 4 +- 7 files changed, 303 insertions(+), 278 deletions(-) diff --git a/vue/src/views/pg-fis/basedate/customerPartCfg/index.vue b/vue/src/views/pg-fis/basedate/customerPartCfg/index.vue index 0ab1dd2..0a1f0dd 100644 --- a/vue/src/views/pg-fis/basedate/customerPartCfg/index.vue +++ b/vue/src/views/pg-fis/basedate/customerPartCfg/index.vue @@ -371,7 +371,7 @@ export default { prop: "description", }); tempsTabs.push({ - label: "厂内零代码", + label: "厂内零件代码", prop: "relationKey", }); return tempsTabs; diff --git a/vue/src/views/pg-fis/basedate/m100Online/RepetitionMB.vue b/vue/src/views/pg-fis/basedate/m100Online/RepetitionMB.vue index 4d8b344..3f4c1fb 100644 --- a/vue/src/views/pg-fis/basedate/m100Online/RepetitionMB.vue +++ b/vue/src/views/pg-fis/basedate/m100Online/RepetitionMB.vue @@ -167,6 +167,22 @@ label="车型代码" > + + + + diff --git a/vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue b/vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue index 0a396eb..427aba7 100644 --- a/vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue +++ b/vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue @@ -38,7 +38,7 @@ icon="el-icon-download" size="mini" style="margin-left: 15px" - @click="downloadPopShow = true" + @click="downloadForm.time=null;downloadPopShow=true;" >导出(Excel) 重新打印 - 作废 - + -->
@@ -142,30 +142,6 @@ {{ scope.column.label }} - - - -
@@ -219,6 +195,7 @@ v-model.number="form.beginHostSN" placeholder="" clearable + :disabled="true" type="number" size="small" style="width: 240px" @@ -308,14 +285,18 @@ :visible.sync="downloadPopShow" width="60%" > - + + + + + 取 消 确 定 @@ -374,7 +355,7 @@ export default { drawerMBPrint: false, drawerMBDelete: false, activeNames: ["1"], - printNum: "12", + printNum: null, rules: { erpAssemblyName: [ { required: true, message: "必须输入!", trigger: "blur" }, @@ -499,7 +480,12 @@ export default { ], // 导出弹窗 downloadPopShow:false, - downloadTime:null, + downloadForm:{ + time:null, + }, + downloadRules:{ + time: [ { required: true, message: '请输入时间', trigger: 'blur' }], + }, timer:null, timerList:null }; @@ -653,47 +639,56 @@ export default { }, /** 导出功能 assembly-cfg-erp/export */ handleDownload() { - console.log(this.downloadTime) - this.listLoading = true; - this.listExportQuery.erpAssemblyCode = this.listQuery.ErpAssemblyCode; - this.listExportQuery.erpAssemblyName = this.listQuery.ErpAssemblyName; - let _data = { - onlineTimeBegin: this.downloadTime[0], - onlineTimeEnd: this.downloadTime[1], - productLine: this.listQuery.productLine, - } - this.$axios - .posts("/api/newjit/bill-m100/export", _data) - .then((res) => { - let filename = res.item; + console.log(this.downloadForm.time) + this.$refs.downloadForm.validate((valid) => { + if (valid) { + this.listLoading = true; + this.listExportQuery.erpAssemblyCode = this.listQuery.ErpAssemblyCode; + this.listExportQuery.erpAssemblyName = this.listQuery.ErpAssemblyName; + let _data = { + onlineTimeBegin: this.downloadForm.time[0], + onlineTimeEnd: this.downloadForm.time[1], + productLine: this.listQuery.productLine, + } this.$axios - .BolbGets("/api/newjit/exclude-part-cfg/download/" + filename) - .then((response) => { - if (filename.indexOf("_") != -1) { - let downName = - filename.slice(0, filename.lastIndexOf("_")) + - filename.slice(filename.lastIndexOf(".")); - downloadFile(response, downName); - this.$notify({ - title: "成功", - message: "数据-导出成功!", - type: "success", - duration: 2000, - }); - } else { - downloadFile(response, filename); - this.$notify({ - title: "成功", - message: "数据-导出成功!", - type: "success", - duration: 2000, - }); - } + .posts("/api/newjit/bill-m100/export", _data) + .then((res) => { + let filename = res.item; + this.$axios + .BolbGets("/api/newjit/exclude-part-cfg/download/" + filename) + .then((response) => { + if (filename.indexOf("_") != -1) { + let downName = + filename.slice(0, filename.lastIndexOf("_")) + + filename.slice(filename.lastIndexOf(".")); + downloadFile(response, downName); + this.$notify({ + title: "成功", + message: "数据-导出成功!", + type: "success", + duration: 2000, + }); + } else { + downloadFile(response, filename); + this.$notify({ + title: "成功", + message: "数据-导出成功!", + type: "success", + duration: 2000, + }); + } + this.listLoading = false; + this.downloadPopShow = false + }) + .catch(err=>{ + this.listLoading = false; + }) + }) + .catch(err=>{ this.listLoading = false; - this.downloadPopShow = false - }); - }); - this.listLoading = false; + }) + } + }) }, /** 重置按钮操作 */ resetQuery(refName) { @@ -779,10 +774,13 @@ export default { ) }) } - this.tableColums = [ - ...this.tableColums_main, - ..._tableColums_detail - ] + // 需求将明细插入到第5列(在M100上线时间后侧) + this.tableColums = JSON.parse(JSON.stringify(this.tableColums_main)) + this.tableColums.splice(4, 0, ..._tableColums_detail); + // this.tableColums = [ + // ...this.tableColums_main, + // ..._tableColums_detail, + // ] this.list = response.m100Dtos; let _M110Row = response.m110_Dtos[0] _M110Row.isM110Data = true @@ -924,7 +922,11 @@ export default { .then(res=>{ let _currentLines = res.item.filter(item=>item.dicItemSort2 == this.listQuery.productLine) if(_currentLines && _currentLines.length > 0){ - this.printNum = _currentLines[0].dicItemSort9 + // 取dicItemSort9为最大的一条 + const maxItem = _currentLines.reduce((prev, current) => { + return Number(current.dicItemSort9) > Number(prev.dicItemSort9) ? current : prev; + }, _currentLines[0]); + this.printNum = maxItem.dicItemSort9 } //后端服务更改了 前端跟着更改成以下方式 this.hostSNQuery.isZhuHuBan = "0"; @@ -1040,19 +1042,20 @@ export default { type: "error", }); return; - } else { - if ( - parseInt(this.form.endHostSN) - - parseInt(this.form.beginHostSN) <= - 0 - ) { - this.$message({ - message: "起止大众顺序号相减不能为零!", - type: "error", - }); - return; - } - } + } + // else { + // if ( + // parseInt(this.form.endHostSN) - + // parseInt(this.form.beginHostSN) <= + // 0 + // ) { + // this.$message({ + // message: "起止大众顺序号相减不能为零!", + // type: "error", + // }); + // return; + // } + // } } if (this.isShowVin === true) { if (this.form.beginVin === "" || this.form.endVin === "") { diff --git a/vue/src/views/pg-fis/basedate/m110Search/index.vue b/vue/src/views/pg-fis/basedate/m110Search/index.vue index daa6332..c489dff 100644 --- a/vue/src/views/pg-fis/basedate/m110Search/index.vue +++ b/vue/src/views/pg-fis/basedate/m110Search/index.vue @@ -55,7 +55,7 @@ @keyup.enter.native="handleQuery" /> - + - + - + - + - - - - - - + + + + + + - - - - - + + + + + -