gaoluyang
18 小时以前 7fb3beda17ba7f5e71f949112141455ab7b69970
富边电子
1.协同办公的发货审批点详情时候展示具体的产品明细
已修改1个文件
52 ■■■■■ 文件已修改
src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
@@ -168,6 +168,36 @@
        </el-skeleton>
      </div>
      <!-- 发货审批:展示产品列表 -->
      <div v-if="isDeliveryApproval" style="margin: 10px 0 18px;">
        <el-divider content-position="left">产品详情</el-divider>
        <el-skeleton :loading="deliveryLoading" animated>
          <template #template>
            <el-skeleton-item variant="h3" style="width: 30%" />
            <el-skeleton-item variant="text" style="width: 100%" />
            <el-skeleton-item variant="text" style="width: 100%" />
          </template>
          <template #default>
            <el-empty v-if="!deliveryProducts || deliveryProducts.length === 0" description="未查询到对应产品信息" />
            <div v-else style="margin-top: 20px;">
              <h4>产品明细</h4>
              <el-table :data="deliveryProducts" border style="width: 100%">
                <el-table-column prop="productCategory" label="产品名称" />
                <el-table-column prop="specificationModel" label="规格型号" />
                <el-table-column prop="unit" label="单位" />
                <el-table-column prop="quantity" label="数量" />
                <el-table-column prop="taxInclusiveUnitPrice" label="含税单价">
                  <template #default="scope">¥{{ Number(scope.row.taxInclusiveUnitPrice ?? 0).toFixed(2) }}</template>
                </el-table-column>
                <el-table-column prop="taxInclusiveTotalPrice" label="含税总价">
                  <template #default="scope">¥{{ Number(scope.row.taxInclusiveTotalPrice ?? 0).toFixed(2) }}</template>
                </el-table-column>
              </el-table>
            </div>
          </template>
        </el-skeleton>
      </div>
      <el-form :model="{ activities }" ref="formRef" label-position="top">
        <el-steps :active="getActiveStep()" finish-status="success" process-status="process" align-center direction="vertical">
          <el-step
@@ -232,6 +262,7 @@
import { WarningFilled, Edit, Check, MoreFilled } from '@element-plus/icons-vue'
import { getQuotationList } from "@/api/salesManagement/salesQuotation.js";
import { getPurchaseByCode } from "@/api/procurementManagement/procurementLedger.js";
import { productList } from "@/api/salesManagement/salesLedger.js";
const emit = defineEmits(['close'])
const { proxy } = getCurrentInstance()
@@ -253,8 +284,11 @@
const currentQuotation = ref({})
const purchaseLoading = ref(false)
const currentPurchase = ref({})
const deliveryLoading = ref(false)
const deliveryProducts = ref([])
const isQuotationApproval = computed(() => Number(props.approveType) === 6)
const isPurchaseApproval = computed(() => Number(props.approveType) === 5)
const isDeliveryApproval = computed(() => Number(props.approveType) === 7)
const data = reactive({
    form: {
@@ -355,6 +389,22 @@
    }
  }
  // 发货审批:根据 salesLedgerId 查询产品列表
  if (isDeliveryApproval.value) {
    const salesLedgerId = row?.salesLedgerId;
    if (salesLedgerId) {
      deliveryLoading.value = true
      productList({ salesLedgerId }).then((res) => {
        deliveryProducts.value = res?.data || []
      }).catch((err) => {
        console.error('查询产品列表失败:', err)
        proxy.$modal.msgError('查询产品列表失败')
      }).finally(() => {
        deliveryLoading.value = false
      })
    }
  }
  approveProcessDetails(row.approveId).then((res) => {
    activities.value = res.data
    // 增加isApproval字段
@@ -407,6 +457,8 @@
  currentQuotation.value = {}
  purchaseLoading.value = false
  currentPurchase.value = {}
  deliveryLoading.value = false
  deliveryProducts.value = []
  emit('close')
};
defineExpose({