diff --git a/src/views/modules/order/poOrder.vue b/src/views/modules/order/poOrder.vue
index cea94de..4f61376 100644
--- a/src/views/modules/order/poOrder.vue
+++ b/src/views/modules/order/poOrder.vue
@@ -24,6 +24,7 @@
取消
新增
+ 查看价格表
+
+
+ 查看价格
+
+
+
+
+
+
+ 供应商:{{ supplierPartPriceDialogSupplierNo }}
+ 物料编码:{{ supplierPartPriceDialogPartNo }}
+
+
+
+
+ {{ scope.row.qtyEnd === null || scope.row.qtyEnd === undefined || scope.row.qtyEnd === '' ? '∞' : scope.row.qtyEnd }}
+
+
+
+
+
+
+
@@ -953,6 +1002,12 @@ export default {
supplierPartDialogSupplierNo: '',
supplierPartDialogSite: '',
supplierPartDialogItemFilter: '',
+ // 供应商可供物料价格表弹窗状态
+ supplierPartPriceDialogVisible: false,
+ supplierPartPriceDialogLoading: false,
+ supplierPartPriceDialogRows: [],
+ supplierPartPriceDialogPartNo: '',
+ supplierPartPriceDialogSupplierNo: '',
addPriceLookupTimer: null,
addPriceLookupSeq: 0,
selectedCustomerScope: null,
@@ -4052,6 +4107,73 @@ export default {
this.supplierPartDialogSite = ''
this.supplierPartDialogItemFilter = ''
},
+ // 打开供应商可供物料价格表弹窗:按当前供应商 + 行物料编码查当前生效阶梯价
+ openSupplierPartPriceDialog (row) {
+ if (!row) {
+ return
+ }
+ const site = this.supplierPartDialogSite
+ const supplierCode = this.supplierPartDialogSupplierNo
+ const partNo = String(row.partNo || '').trim()
+ if (!site || !supplierCode || !partNo) {
+ this.$message.warning('缺少供应商或物料编码,无法查询价格')
+ return
+ }
+ this.loadSupplierPartPriceDialog({ site, supplierCode, partNo })
+ },
+ // 主页面:查看当前选中行(供应商 + 物料)的价格表
+ openCurrentRowPriceDialog () {
+ const row = this.currentRow
+ if (!row) {
+ this.$message.warning('请先选择一行数据')
+ return
+ }
+ const site = String(row.site || this.$store.state.user.site || '').trim()
+ const supplierCode = String(row.supplierNo || row.supplier_no || row.supplierCode || row.supplier_code || '').trim()
+ const partNo = String(row.partNo || row.part_no || '').trim()
+ if (!site || !supplierCode || !partNo) {
+ this.$message.warning('当前行缺少供应商或物料编码,无法查询价格')
+ return
+ }
+ this.loadSupplierPartPriceDialog({ site, supplierCode, partNo })
+ },
+ // 共用的阶梯价加载:拉取当前生效阶梯价并渲染到价格弹窗
+ loadSupplierPartPriceDialog ({ site, supplierCode, partNo }) {
+ this.supplierPartPriceDialogPartNo = partNo
+ this.supplierPartPriceDialogSupplierNo = supplierCode
+ this.supplierPartPriceDialogRows = []
+ this.supplierPartPriceDialogVisible = true
+ this.supplierPartPriceDialogLoading = true
+ listPoCurrentTierPrice({
+ site,
+ supplierCode,
+ partNo
+ }).then(({ data }) => {
+ if (data && data.code === 0) {
+ this.supplierPartPriceDialogRows = (data.rows || []).map(item => ({
+ qtyStart: (item.qtyStart === null || item.qtyStart === undefined) ? '' : item.qtyStart,
+ qtyEnd: (item.qtyEnd === null || item.qtyEnd === undefined) ? '' : item.qtyEnd,
+ unitPrice: (item.unitPrice === null || item.unitPrice === undefined) ? '' : item.unitPrice,
+ priceDate: item.priceDate || '',
+ remark: item.remark || ''
+ }))
+ return
+ }
+ this.supplierPartPriceDialogRows = []
+ this.$message.error((data && data.msg) || '获取供应商价格表失败')
+ }).catch(() => {
+ this.supplierPartPriceDialogRows = []
+ this.$message.error('获取供应商价格表失败')
+ }).finally(() => {
+ this.supplierPartPriceDialogLoading = false
+ })
+ },
+ resetSupplierPartPriceDialog () {
+ this.supplierPartPriceDialogLoading = false
+ this.supplierPartPriceDialogRows = []
+ this.supplierPartPriceDialogPartNo = ''
+ this.supplierPartPriceDialogSupplierNo = ''
+ },
resolveAddOrderTypeByCustomer () {
const customerOrderType = this.selectedCustomerScope && this.selectedCustomerScope.orderType
diff --git a/src/views/modules/srmPart/partInfoList.vue b/src/views/modules/srmPart/partInfoList.vue
index 4feb35f..21fd2f4 100644
--- a/src/views/modules/srmPart/partInfoList.vue
+++ b/src/views/modules/srmPart/partInfoList.vue
@@ -1863,11 +1863,11 @@ export default {
msg = `SKU ${sku} 已在 SKU 管理中维护基准料号 ${data.dbBasePartNo},与本次的基准料号不一致。`
}
if (skipNavigation) {
- this.$message.error(`${msg}基准料号与 SKU 需一一对应,请先到 SKU 管理页手动维护后再指定。`)
+ this.$message.error(`${msg}请先到 SKU 管理页手动维护后再指定。`)
return
}
this.$confirm(
- `${msg}基准料号与 SKU 需一一对应,是否前往 SKU 管理页手动维护?前往后将不再保存本次新增。`,
+ `${msg}是否前往 SKU 管理页手动维护?前往后将不再保存本次新增。`,
'SKU与基准料号冲突',
{
confirmButtonText: '是',