From 34feba9e9749fdb5298c2904d0fc5aa79135c428 Mon Sep 17 00:00:00 2001 From: qiankanghui Date: Tue, 15 Sep 2026 17:27:45 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat(user):=20=E6=96=B0=E5=A2=9E=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E6=97=B6=E9=BB=98=E8=AE=A4=E8=AE=BE=E7=BD=AE=E5=B7=A5?= =?UTF-8?q?=E5=8E=82=E4=B8=BA1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在新增用户初始化时,默认将site字段设置为'1' - 仅当id不存在时应用默认值,确保编辑功能不受影响 - 保持原有数据加载逻辑不变 --- src/views/modules/sys/user-add-or-update.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/views/modules/sys/user-add-or-update.vue b/src/views/modules/sys/user-add-or-update.vue index d8a1ec7..55d6d49 100644 --- a/src/views/modules/sys/user-add-or-update.vue +++ b/src/views/modules/sys/user-add-or-update.vue @@ -221,6 +221,10 @@ export default { init(id) { this.dataForm.id = id || 0 + // 新增用户时,工厂默认设置为 1 + if (!id) { + this.dataForm.site = '1' + } this.loadSiteOptions() this.getLanguageList(); this.$http({ From d4f5ce29ee7e84c4de6e1ea560ff128df604f319 Mon Sep 17 00:00:00 2001 From: qiankanghui Date: Wed, 16 Sep 2026 16:57:31 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat(srmPart):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E9=9B=B6=E4=BB=B6=E4=BF=A1=E6=81=AF=E7=AE=A1=E7=90=86=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 隐藏关联供应商标签页以简化界面 - 为SKU字段添加点击查询功能并增加必填验证 - 为属性模板字段增加必填验证规则 - 在基础数据查询中新增SKU类型支持 - 限制新增物料按钮仅在主表待提交状态下显示 - 移除报价表单的未税单价和税率必填验证 - 简化报价提交流程,仅验证阶梯价格表填写情况 - 将价格表查询整合到价格阶梯标签页中 - 移除独立的价格表查询对话框组件 - 添加价格阶梯数据展示和刷新功能 - 优化数值格式化和显示方法 --- src/views/modules/srmPart/partInfoList.vue | 22 +- src/views/modules/supplier/purHeaderList.vue | 3 +- .../modules/supplier/quoPurDetailList.vue | 87 +++----- .../modules/supplier/supPurReplyHistList.vue | 197 +++++------------- 4 files changed, 107 insertions(+), 202 deletions(-) diff --git a/src/views/modules/srmPart/partInfoList.vue b/src/views/modules/srmPart/partInfoList.vue index ba0262e..b40013c 100644 --- a/src/views/modules/srmPart/partInfoList.vue +++ b/src/views/modules/srmPart/partInfoList.vue @@ -119,9 +119,9 @@ - - - + + + @@ -184,8 +184,9 @@ - - + + SKU + @@ -246,7 +247,7 @@ - + 属性模板 @@ -917,6 +918,9 @@ export default { ], partSpec: [ { required: true, message: ' ', trigger: 'blur' } + ], + codeNo: [ + { required: true, message: ' ', trigger: 'blur' } ] }, copyDialogVisible: false, @@ -1307,6 +1311,9 @@ export default { if (this.tagNo === 510) { strVal = this.currentpart.unit } + if (val === 508) { + strVal = this.currentpart.sku + } if (val === 529) { strVal = this.currentpart.buyerName } @@ -1333,6 +1340,9 @@ export default { if (this.tagNo === 510) { this.currentpart.unit = val.UMID } + if (this.tagNo === 508) { + this.currentpart.sku = val.sku + } if (this.tagNo === 529) { this.currentpart.buyerName = val.UserName } diff --git a/src/views/modules/supplier/purHeaderList.vue b/src/views/modules/supplier/purHeaderList.vue index fcfbc86..dfaad5b 100644 --- a/src/views/modules/supplier/purHeaderList.vue +++ b/src/views/modules/supplier/purHeaderList.vue @@ -1018,8 +1018,9 @@ export default { isMaterialEditable(row) { return row && (row.status === '待提交' || row.status === '待报价') }, + // 新增物料按钮只在主表状态为待提交时才显示 canAddMaterial() { - return this.currentInquiry && (this.currentInquiry.status === '待提交' || this.currentInquiry.status === '待报价') + return this.currentInquiry && this.currentInquiry.status === '待提交' }, openMaterialDialog(row) { if (!this.currentInquiry) { diff --git a/src/views/modules/supplier/quoPurDetailList.vue b/src/views/modules/supplier/quoPurDetailList.vue index ed4d2f2..22239cc 100644 --- a/src/views/modules/supplier/quoPurDetailList.vue +++ b/src/views/modules/supplier/quoPurDetailList.vue @@ -454,22 +454,8 @@ export default { site: this.$store.state.user.site, createdBy: this.$store.state.user.name }, - quoteRules: { - price: [ - { required: true, message: '请输入未税单价', trigger: 'blur' }, - { - validator: (rule, value, callback) => { - if (value == null || Number(value) <= 0) { - callback(new Error('未税单价必须大于0')) - } else { - callback() - } - }, - trigger: 'blur' - } - ], - taxRate: [{ required: true, message: '请输入税率', trigger: 'blur' }] - }, + // 报价弹窗取消必填字段校验,提交时仅校验阶梯价格表是否填写 + quoteRules: {}, // 上次填写的报价信息(用于残留功能) lastQuoteData: null, lastTierPriceData: null @@ -769,48 +755,39 @@ export default { // 提交报价 submitQuote() { this.calculatePrice() - this.$refs.quoteForm.validate((valid) => { - if (valid) { - if (!this.quoteForm.price || Number(this.quoteForm.price) <= 0) { - this.$message.error('未税单价必须大于0') - return - } - if (!this.validateTierPriceList()) { - return - } - // 计算总成本(可选) - const totalCost = this.quoteForm.materialCost + this.quoteForm.produceFee + - this.quoteForm.surfaceFee + this.quoteForm.profit + - this.quoteForm.mouldFee + this.quoteForm.additionalCost + - this.quoteForm.freight + this.quoteForm.duty - - const submitData = { - ...this.quoteForm, - tierPriceList: this.buildTierPricePayload(), - totalCost: totalCost - } + // 取消必填字段校验,仅校验阶梯价格表是否填写 + if (!this.validateTierPriceList()) { + return + } + // 计算总成本(可选) + const totalCost = this.quoteForm.materialCost + this.quoteForm.produceFee + + this.quoteForm.surfaceFee + this.quoteForm.profit + + this.quoteForm.mouldFee + this.quoteForm.additionalCost + + this.quoteForm.freight + this.quoteForm.duty + + const submitData = { + ...this.quoteForm, + tierPriceList: this.buildTierPricePayload(), + totalCost: totalCost + } - createPurReplyHist(submitData).then(({ data }) => { - if (data && data.code === 0) { - this.$message.success('报价提交成功') - // 提交成功后清除残留数据 - this.lastQuoteData = null - this.lastTierPriceData = null - this.quoteDialogVisible = false - this.tierPriceDialogVisible = false - // 刷新报价记录列表 - this.refreshCurrentTabTable() - // 刷新主列表状态 - this.getMainData() - } else { - this.$message.error(data.msg || '报价提交失败') - } - }).catch(error => { - this.$message.error('报价提交失败: ' + error.message) - }) + createPurReplyHist(submitData).then(({ data }) => { + if (data && data.code === 0) { + this.$message.success('报价提交成功') + // 提交成功后清除残留数据 + this.lastQuoteData = null + this.lastTierPriceData = null + this.quoteDialogVisible = false + this.tierPriceDialogVisible = false + // 刷新报价记录列表 + this.refreshCurrentTabTable() + // 刷新主列表状态 + this.getMainData() } else { - this.$message.warning('请填写必填字段') + this.$message.error(data.msg || '报价提交失败') } + }).catch(error => { + this.$message.error('报价提交失败: ' + error.message) }) }, diff --git a/src/views/modules/supplier/supPurReplyHistList.vue b/src/views/modules/supplier/supPurReplyHistList.vue index 1c5e41e..c406f89 100644 --- a/src/views/modules/supplier/supPurReplyHistList.vue +++ b/src/views/modules/supplier/supPurReplyHistList.vue @@ -46,10 +46,9 @@ - + @@ -650,6 +617,7 @@ export default { data() { return { height: 200, + tabHeight: 300, loading: false, submitLoading: false, dataList: [], @@ -657,7 +625,7 @@ export default { pageSize: 20, totalPage: 0, currentRow: {}, - activeName: 'attachments', + activeName: 'tierPrice', searchData: { site: this.$store.state.user.site, createdBy: this.$store.state.user.name, @@ -747,18 +715,8 @@ export default { overReceiveFlag: 'N', overReceiveTolerance: 0 }, - priceSheetDialogVisible: false, - priceSheetLoading: false, - priceSheetHeader: { - quotationReplyHistId: null, - partNo: '', - partDesc: '', - priceDate: '', - supplierId: '', - supplierName: '', - currency: '' - }, - priceSheetDetailList: [] + tierPriceList: [], + tierPriceLoading: false } }, mounted() { @@ -795,9 +753,35 @@ export default { this.currentRow = {site: '', orderNo: ''} } + if (this.activeName === 'tierPrice') { + this.refreshTierPrice() + } if (this.activeName === 'attachments') { this.refreshAttachments() } + }, + // 价格阶梯页签:查询逻辑与报价记录的价格表查询一致 + refreshTierPrice() { + if (!this.currentRow || !this.currentRow.id) { + this.tierPriceList = [] + return + } + const params = { + site: this.$store.state.user.site, + quotationReplyHistId: this.currentRow.id + } + this.tierPriceLoading = true + getPurReplyPriceSheet(params).then(({ data }) => { + if (data && data.code === 0 && data.row) { + this.tierPriceList = data.row.tierPriceList || [] + } else { + this.tierPriceList = [] + } + this.tierPriceLoading = false + }).catch(() => { + this.tierPriceLoading = false + this.tierPriceList = [] + }) }, refreshAttachments () { console.log('刷新附件组件,当前行数据:', this.currentRow) @@ -830,24 +814,6 @@ export default { if (value === null || value === undefined) return '-' return new Intl.NumberFormat('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 }).format(value) }, - displayText(value) { - if (value === null || value === undefined || value === '') { - return '-' - } - return value - }, - formatDateOnly(value) { - if (!value) return '' - if (typeof value === 'string') { - return value.length >= 10 ? value.slice(0, 10) : value - } - const date = new Date(value) - if (Number.isNaN(date.getTime())) { - return '' - } - const pad = num => String(num).padStart(2, '0') - return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}` - }, formatNumber(value) { if (value === null || value === undefined || value === '') { return '0' @@ -858,51 +824,6 @@ export default { } return String(Object.is(num, -0) ? 0 : num) }, - openPriceSheet(row) { - if (!row || !row.id) { - this.$message.warning('当前报价记录缺少主键,无法查询价格表') - return - } - const params = { - site: this.$store.state.user.site, - quotationReplyHistId: row.id - } - this.priceSheetDialogVisible = true - this.priceSheetLoading = true - this.priceSheetHeader = { - quotationReplyHistId: row.id, - partNo: row.partNo || '', - partDesc: row.partDesc || '', - priceDate: row.createdDate || '', - supplierId: row.supplierId || '', - supplierName: row.supplierName || '', - currency: row.currency || '' - } - this.priceSheetDetailList = [] - getPurReplyPriceSheet(params).then(({ data }) => { - if (data && data.code === 0 && data.row) { - const responseRow = data.row - this.priceSheetHeader = { - quotationReplyHistId: responseRow.quotationReplyHistId || row.id, - partNo: responseRow.partNo || row.partNo || '', - partDesc: responseRow.partDesc || row.partDesc || '', - priceDate: responseRow.priceDate || row.createdDate || '', - supplierId: responseRow.supplierId || row.supplierId || '', - supplierName: responseRow.supplierName || row.supplierName || '', - currency: responseRow.currency || row.currency || '' - } - this.priceSheetDetailList = responseRow.tierPriceList || [] - } else { - this.priceSheetDetailList = [] - this.$message.error((data && data.msg) || '获取价格表失败') - } - this.priceSheetLoading = false - }).catch(() => { - this.priceSheetLoading = false - this.priceSheetDetailList = [] - this.$message.error('获取价格表失败') - }) - }, getList() { this.loading = true const params = { @@ -1182,10 +1103,6 @@ export default { margin-right: 10px; } -.price-sheet-header-form { - margin-bottom: 8px; -} - /* 页签样式穿透 */ /deep/ .customer-tab.el-tabs--border-card > .el-tabs__content { padding: 0;