gaoluyang
10 天以前 a2c33664f683aee11fdc62391c8d1e21cc74f5b2
src/views/salesManagement/salesQuotation/index.vue
@@ -35,7 +35,7 @@
      >
        <el-table-column align="center" label="序号" type="index" width="60" />
        <el-table-column prop="product" label="产品名称" min-width="180" show-overflow-tooltip />
        <el-table-column prop="specification" label="尺寸" min-width="140" show-overflow-tooltip />
        <el-table-column prop="specification" label="规格型号" min-width="140" show-overflow-tooltip />
        <el-table-column prop="paper" label="纸张" min-width="120" show-overflow-tooltip />
        <el-table-column prop="paperWeight" label="定量" min-width="100" show-overflow-tooltip />
        <el-table-column prop="unitPrice" label="单价" width="120" align="right">
@@ -104,7 +104,7 @@
                </el-form-item>
              </template>
            </el-table-column>
            <el-table-column prop="specification" label="尺寸" width="200">
            <el-table-column prop="specification" label="规格型号" width="200">
              <template #default="scope">
                <el-form-item :prop="`products.${scope.$index}.specificationId`" class="product-table-form-item">
                  <el-select
@@ -214,7 +214,7 @@
        <h4>产品明细</h4>
        <el-table :data="currentQuotation.products" border style="width: 100%">
          <el-table-column prop="product" label="产品名称" />
          <el-table-column prop="specification" label="尺寸" />
          <el-table-column prop="specification" label="规格型号" />
          <el-table-column prop="unit" label="单位" />
          <el-table-column prop="paper" label="纸张" />
          <el-table-column prop="paperWeight" label="定量" />
@@ -306,7 +306,7 @@
const productRowRules = {
  productId: [{ required: true, message: '请选择产品名称', trigger: 'change' }],
  specificationId: [{ required: true, message: '请选择尺寸', trigger: 'change' }],
  specificationId: [{ required: true, message: '请选择规格型号', trigger: 'change' }],
  unit: [{ required: true, message: '请填写单位', trigger: 'blur' }],
  unitPrice: [{ required: true, message: '请填写单价', trigger: 'change' }]
}
@@ -410,7 +410,7 @@
   if (label) {
      row.product = label;
   }
   // 获取尺寸列表,设置到当前行的 modelOptions
   // 获取规格型号列表,设置到当前行的 modelOptions
   modelList({ id: value }).then((res) => {
      row.modelOptions = res || [];
   });
@@ -590,7 +590,7 @@
      ? Number(product.productId)
      : findNodeIdByLabel(productOptions.value, productName) || ''
    
    // 如果有产品ID,加载对应的尺寸列表
    // 如果有产品ID,加载对应的规格型号列表
    let modelOptions = [];
    let resolvedSpecificationId = product.specificationId || '';
    
@@ -607,7 +607,7 @@
          }
        }
      } catch (error) {
        console.error('加载尺寸失败:', error);
        console.error('加载规格型号失败:', error);
      }
    }
    
@@ -625,7 +625,7 @@
      dieCuttingFee: Number(product.dieCuttingFee || 0),
      grindingFee: Number(product.grindingFee || 0),
      amount: product.amount || 0,
      modelOptions: modelOptions // 为每行添加独立的尺寸列表
      modelOptions: modelOptions // 为每行添加独立的规格型号列表
    }
  }))
  form.subtotal = source.subtotal || 0
@@ -696,7 +696,7 @@
    dieCuttingFee: 0,
    grindingFee: 0,
    amount: 0,
    modelOptions: [] // 为每行添加独立的尺寸列表
    modelOptions: [] // 为每行添加独立的规格型号列表
  })
}