From 9c6f4ce8c9c35717185c22ea62a811341abdb7b1 Mon Sep 17 00:00:00 2001 From: ruanqi Date: Thu, 17 Oct 2024 15:27:10 +0800 Subject: [PATCH] plm BMM --- src/main.js | 1 + .../project/projectInfo/projectInfo.vue | 8 +++- .../project/projectPart/searchProjectPart.vue | 2 +- src/views/modules/tooling/searchToolApply.vue | 41 +++++++++++++++-- src/views/modules/tooling/toolingInfo.vue | 46 +++++++++++++------ 5 files changed, 79 insertions(+), 19 deletions(-) diff --git a/src/main.js b/src/main.js index a6874ca..5c494b9 100644 --- a/src/main.js +++ b/src/main.js @@ -24,6 +24,7 @@ import selectDiv from '@/views/common/selectDiv.vue' import {resetForm} from "./utils/system"; import echarts from "echarts"; import highlightContainer from './utils/highlight'; +import 'element-ui/lib/theme-chalk/divider.css' Vue.prototype.$echarts = echarts; Vue.component('downloadExcel', JsonExcel) diff --git a/src/views/modules/project/projectInfo/projectInfo.vue b/src/views/modules/project/projectInfo/projectInfo.vue index 39bbc72..58735fc 100644 --- a/src/views/modules/project/projectInfo/projectInfo.vue +++ b/src/views/modules/project/projectInfo/projectInfo.vue @@ -9,7 +9,7 @@ - + @@ -132,7 +132,7 @@
- +
@@ -162,6 +162,7 @@ + 直接客户
@@ -207,6 +208,7 @@
+ 终端客户
@@ -473,6 +475,7 @@ import ChangeRecord from "./com_project_change_record.vue"; import OssComponents from "../../oss/ossComponents.vue"; import toolApply from "./com_project_toolApplyCation.vue"; + import { Divider } from 'element-ui'; /*組件*/ export default { components: { @@ -490,6 +493,7 @@ technicalSpecification, quotationHeader, toolApply, + ElDivider: Divider, }, name: "null", data() { diff --git a/src/views/modules/project/projectPart/searchProjectPart.vue b/src/views/modules/project/projectPart/searchProjectPart.vue index 0ef243f..5ee6062 100644 --- a/src/views/modules/project/projectPart/searchProjectPart.vue +++ b/src/views/modules/project/projectPart/searchProjectPart.vue @@ -133,7 +133,7 @@
- +
diff --git a/src/views/modules/tooling/searchToolApply.vue b/src/views/modules/tooling/searchToolApply.vue index 2b4b6f7..bcb89bf 100644 --- a/src/views/modules/tooling/searchToolApply.vue +++ b/src/views/modules/tooling/searchToolApply.vue @@ -371,7 +371,7 @@ style="width: 100px; height: 80px"/>
-
@@ -1060,7 +1060,8 @@ status: true, fixed: '', columnWidth: 70 - }, { + }, + { userId: this.$store.state.user.name, functionId: 106002, serialNumber: '106002Table2QuotationNo', @@ -1620,6 +1621,12 @@ this.modelFlag=true }, changeSum() { + if(row.standardCost<0||row.standardCost==null||row.standardCost==''){ + row.standardCost='' + this.$alert('成本不能为负数或者不填', '错误', { + confirmButtonText: '确定' + }) + } this.dataForm.applySumQty = 0 this.dataForm.totalCost =0 for (const item of this.toolData) { @@ -1809,6 +1816,7 @@ }, activated() { if (this.$route.params.type === 'tokenLogin') { + console.log("进来啦") if (this.$route.params.docNo) { this.searchData.applyNo = this.$route.params.docNo } @@ -1824,6 +1832,7 @@ if(this.dataList1.length>0){ this.$refs.mainTable.setCurrentRow(this.dataList1[0]); this.currentRow = JSON.parse( JSON.stringify(this.dataList1[0])); + //进入审批界面 this.editModal(this.dataList1[0]) }else { this.currentRow ={} @@ -1832,8 +1841,34 @@ } this.dataListLoading = false }) - } else { + } + if (localStorage.getItem('ToolApplyData') != null) { + let data = JSON.parse(localStorage.getItem('ToolApplyData')); + if (data){ + this.searchData.applyNo = data.applyNo + } + this.searchData.limit = this.pageSize + this.searchData.page = this.pageIndex + console.log(this.searchData) + searchProjectToolApplyHeader(this.searchData).then(({data}) => { + if (data.code == 0) { + this.dataList1 = data.page.list + this.pageIndex = data.page.currPage + this.pageSize = data.page.pageSize + this.totalPage = data.page.totalCount + if(this.dataList1.length>0){ + this.$refs.mainTable.setCurrentRow(this.dataList1[0]); + this.currentRow = JSON.parse( JSON.stringify(this.dataList1[0])); + //进入编辑界面 + this.editModalU(this.dataList1[0]) + }else { + this.currentRow ={} + } + this.refreshCurrentTabTable () + } + this.dataListLoading = false + }) } }, } diff --git a/src/views/modules/tooling/toolingInfo.vue b/src/views/modules/tooling/toolingInfo.vue index 0f4929c..59363e4 100644 --- a/src/views/modules/tooling/toolingInfo.vue +++ b/src/views/modules/tooling/toolingInfo.vue @@ -14,7 +14,7 @@ - + @@ -122,7 +122,9 @@ 采购员 - + + 跳转至申请记录 + @@ -147,7 +149,7 @@ v-loading="dataListLoading" style="width: 100%;"> - + @@ -158,11 +160,14 @@ - + + + + @@ -492,6 +497,7 @@ columnWidth: 80 }, ], + jumpFlag:true, dataForm:{ site: '', applyNo: '', @@ -699,15 +705,16 @@ detailList:[], }; this.visible=true; + this.jumpFlag=true; }, changeSum(row){ - // if(row.applyQty!=null&&row.applyQty!==''&& row.toolQuantity item.applyQty > 0) + this.dataForm.detailList=this.toolData.filter(item => item.applyQty > 0).filter(item => item.standardCost > 0) saveProjectToolApply(this.dataForm).then(({data}) => { if (data && data.code == 0) { this.visible=false; @@ -790,6 +797,19 @@ onClose: () => { } }) + if(this.jumpFlag){ + this.$nextTick(function () { + setTimeout(() => { + let inData = { + site: this.$store.state.user.site, + applyNo: data.applyNo, + username: this.$store.state.user.name + }; + localStorage.setItem('ToolApplyData', JSON.stringify(inData)) + this.$router.push('tooling-searchToolApply') + },500) + }) + } } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定'