From f6802d9893faa8950a738b5048c525ef1f109558 Mon Sep 17 00:00:00 2001 From: Developer Date: Fri, 22 May 2026 15:23:25 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=87=87=E8=B4=AD=E5=90=88=E5=90=8C?= =?UTF-8?q?=E5=8E=86=E5=8F=B2=E5=8D=95=E4=BB=B7=E6=9F=A5=E8=AF=A2=E5=8F=8A?= =?UTF-8?q?=E4=BA=BA=E5=91=98=E7=AE=A1=E7=90=86=E8=A1=A8=E5=8D=95=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ProcurementContractAudit: 新增历史单价按钮及弹窗(表格+统计) - OrderInquiry: 新增历史单价按钮及弹窗(表格+统计) - PurchasedPartsSearch: 新增历史单价按钮及弹窗(表格+统计) - PersonnelManagement: 取消出生日期/身份证号/学历/家庭住址/民族的必填验证 --- .../BasicData/PersonnelManagement/index.vue | 10 +- .../OrderInquiry/index.vue | 95 ++++++++++++++-- .../PurchasedPartsSearch/index.vue | 89 ++++++++++++++- .../ProcurementContractAudit/index.vue | 101 ++++++++++++++++-- 4 files changed, 267 insertions(+), 28 deletions(-) diff --git a/src/views/BasicData/PersonnelManagement/index.vue b/src/views/BasicData/PersonnelManagement/index.vue index 7028e497..67151b38 100644 --- a/src/views/BasicData/PersonnelManagement/index.vue +++ b/src/views/BasicData/PersonnelManagement/index.vue @@ -740,16 +740,16 @@ export default { AccountNumber: [{ required: true, message: '请输入', trigger: 'blur' }], Password: [{ required: true, message: '请输入', trigger: 'blur' }], Sex: [{ required: true, message: '请输入', trigger: 'change' }], - Birthday: [{ required: true, message: '请输入', trigger: 'change' }], - IDcard: [{ required: true, message: '请输入', trigger: 'blur' }], + Birthday: [{ required: false, message: '请输入', trigger: 'change' }], + IDcard: [{ required: false, message: '请输入', trigger: 'blur' }], TimeOfEntry: [{ required: true, message: '请输入', trigger: 'change' }], ContactInformation: [{ required: true, message: '请输入', trigger: 'blur' }], - Address: [{ required: true, message: '请输入', trigger: 'change' }], - Nation: [{ required: true, message: '请输入', trigger: 'change' }], + Address: [{ required: false, message: '请输入', trigger: 'change' }], + Nation: [{ required: false, message: '请输入', trigger: 'change' }], ForeignLanguageLevel: [{ required: true, message: '请输入', trigger: 'change' }], Title: [{ required: true, message: '请输入', trigger: 'change' }], PositionStatus: [{ required: true, message: '请输入', trigger: 'change' }], - Education: [{ required: true, message: '请输入', trigger: 'change' }], + Education: [{ required: false, message: '请输入', trigger: 'change' }], DepartmentName: [{ required: true, message: '请输入', trigger: 'blur' }] }, SexData: [{ diff --git a/src/views/PurchasingManagement/OrderInquiry/index.vue b/src/views/PurchasingManagement/OrderInquiry/index.vue index 9e50f4b7..64e5c954 100644 --- a/src/views/PurchasingManagement/OrderInquiry/index.vue +++ b/src/views/PurchasingManagement/OrderInquiry/index.vue @@ -304,7 +304,7 @@ {{ scope.row.订单备注 }} - + @@ -525,6 +531,36 @@ + + + + + + + + + + + + + + + + + + + + + + + @@ -586,9 +622,21 @@ export default { ProductionPick: [], pageCurrent: 1, // 分页当前页 pageSize: 50, // 分页每页显示条数 - orderName: '', // 排序列名 + orderName: '', purchaseContractSerialNumber: '', - order: '' // 排序方式 + order: '', + historyPriceVisible: false, + historySummary: { + 采购件: '', + 图号或型号: '', + 物料编码: '', + 采购次数: '', + 平均单价: '', + 最低单价: '', + 最高单价: '', + 最近单价: '' + }, + historyPriceList: [] } }, computed: { @@ -1238,20 +1286,45 @@ export default { this.searchLeftTable() }, getApproverName(approverId) { - // 调试:打印people数组和approverId - // console.log('people数组:', this.people) - // console.log('approverId:', approverId, '类型:', typeof approverId) - - // 尝试类型转换后比较 for (let i = 0; i < this.people.length; i++) { - // console.log('people[i].value:', this.people[i].value, '类型:', typeof this.people[i].value) if (String(this.people[i].value) === String(approverId)) { - // console.log('找到匹配:', this.people[i].label) return this.people[i].label } } - // console.log('未找到匹配,返回原始值:', approverId) return approverId + }, + showHistoryPrice(row) { + var param = [] + param[0] = ['采购合同流水号', row.采购合同流水号] + param[1] = ['物料流水号', row.物料流水号] + var Data = this.CreateData('11', '采购管理_采购合同历史单价_查询', param) + this.ExecDatabase(Data).then(response => { + var list = response.data || [] + if (list.length === 0) { + this.$message.warning('暂无历史单价数据') + return + } + this.historySummary = { + 采购件: row.采购件 || '', + 图号或型号: row.图号或型号 || '', + 物料编码: row.物料编码 || '', + 采购次数: list.length, + 平均单价: '', + 最低单价: '', + 最高单价: '', + 最近单价: '' + } + var prices = list.map(item => Number(item.单价)).filter(v => !isNaN(v)) + if (prices.length > 0) { + var sum = prices.reduce(function(a, b) { return a + b }, 0) + this.historySummary.平均单价 = (sum / prices.length).toFixed(2) + this.historySummary.最低单价 = Math.min.apply(null, prices).toFixed(2) + this.historySummary.最高单价 = Math.max.apply(null, prices).toFixed(2) + this.historySummary.最近单价 = prices[prices.length - 1].toFixed(2) + } + this.historyPriceList = list + this.historyPriceVisible = true + }) } } } diff --git a/src/views/PurchasingManagement/PurchasedPartsSearch/index.vue b/src/views/PurchasingManagement/PurchasedPartsSearch/index.vue index 0fd4e795..7dd0b172 100644 --- a/src/views/PurchasingManagement/PurchasedPartsSearch/index.vue +++ b/src/views/PurchasingManagement/PurchasedPartsSearch/index.vue @@ -215,6 +215,16 @@ {{ scope.row.采购期限 }} + + +
+ + + + + + + + + + + + + + + + + + + + + + +
@@ -318,8 +358,20 @@ export default { tableData: [], // 合同信息表 pageCurrent: 1, // 分页当前页 pageSize: 30, // 分页每页显示条数 - orderName: '', // 排序列名 - order: '' // 排序方式 + orderName: '', + order: '', + historyPriceVisible: false, + historySummary: { + 采购件: '', + 图号或型号: '', + 物料编码: '', + 采购次数: '', + 平均单价: '', + 最低单价: '', + 最高单价: '', + 最近单价: '' + }, + historyPriceList: [] } }, computed: { @@ -608,6 +660,39 @@ export default { handleCurrentChanges(val) { this.pageCurrent = val this.searchTable() + }, + showHistoryPrice(row) { + var param = [] + param[0] = ['采购合同流水号', row.采购合同流水号] + param[1] = ['物料流水号', row.物料流水号] + var Data = this.CreateData('11', '采购管理_采购合同历史单价_查询', param) + this.ExecDatabase(Data).then(response => { + var list = response.data || [] + if (list.length === 0) { + this.$message.warning('暂无历史单价数据') + return + } + this.historySummary = { + 采购件: row.采购件 || '', + 图号或型号: row.图号或型号 || '', + 物料编码: row.物料编码 || '', + 采购次数: list.length, + 平均单价: '', + 最低单价: '', + 最高单价: '', + 最近单价: '' + } + var prices = list.map(item => Number(item.单价)).filter(v => !isNaN(v)) + if (prices.length > 0) { + var sum = prices.reduce(function(a, b) { return a + b }, 0) + this.historySummary.平均单价 = (sum / prices.length).toFixed(2) + this.historySummary.最低单价 = Math.min.apply(null, prices).toFixed(2) + this.historySummary.最高单价 = Math.max.apply(null, prices).toFixed(2) + this.historySummary.最近单价 = prices[prices.length - 1].toFixed(2) + } + this.historyPriceList = list + this.historyPriceVisible = true + }) } } } diff --git a/src/views/SeikoWorkshop/ProcurementContractAudit/index.vue b/src/views/SeikoWorkshop/ProcurementContractAudit/index.vue index c2ee6b5f..02510709 100644 --- a/src/views/SeikoWorkshop/ProcurementContractAudit/index.vue +++ b/src/views/SeikoWorkshop/ProcurementContractAudit/index.vue @@ -153,7 +153,7 @@ {{ scope.row.订单备注 }} - + @@ -212,6 +218,36 @@ + + + + + + + + + + + + + + + + + + + + + + + @@ -225,15 +261,27 @@ export default { data() { return { hadFile: [], - loading: false, // 数据加载 - dialogVisible: false, // 查看图片 - dialogFormVisible: false, // 查看图片 - urls: [], // 图片数组 - total: 0, // 分页总数 - tableData: [], // 合同信息表 - tableData1: [], // 合同信息表 - pageCurrent: 1, // 分页当前页 - pageSize: 100 // 分页每页显示条数 + loading: false, + dialogVisible: false, + dialogFormVisible: false, + urls: [], + total: 0, + tableData: [], + tableData1: [], + pageCurrent: 1, + pageSize: 100, + historyPriceVisible: false, + historySummary: { + 采购件: '', + 图号或型号: '', + 物料编码: '', + 采购次数: '', + 平均单价: '', + 最低单价: '', + 最高单价: '', + 最近单价: '' + }, + historyPriceList: [] } }, computed: { @@ -404,6 +452,39 @@ export default { } }) }, + showHistoryPrice(row) { + var param = [] + param[0] = ['采购合同流水号', row.采购合同流水号] + param[1] = ['物料流水号',row.物料流水号] + var Data = this.CreateData('11', '采购管理_采购合同历史单价_查询', param) + this.ExecDatabase(Data).then(response => { + var list = response.data || [] + if (list.length === 0) { + this.$message.warning('暂无历史单价数据') + return + } + this.historySummary = { + 采购件: row.采购件 || '', + 图号或型号: row.图号或型号 || '', + 物料编码: row.物料编码 || '', + 采购次数: list.length, + 平均单价: '', + 最低单价: '', + 最高单价: '', + 最近单价: '' + } + var prices = list.map(item => Number(item.单价)).filter(v => !isNaN(v)) + if (prices.length > 0) { + var sum = prices.reduce(function(a, b) { return a + b }, 0) + this.historySummary.平均单价 = (sum / prices.length).toFixed(2) + this.historySummary.最低单价 = Math.min.apply(null, prices).toFixed(2) + this.historySummary.最高单价 = Math.max.apply(null, prices).toFixed(2) + this.historySummary.最近单价 = prices[prices.length - 1].toFixed(2) + } + this.historyPriceList = list + this.historyPriceVisible = true + }) + }, getSummaries(param) { const { columns, data } = param const sums = []