周宾
2 天以前 b80934d8bb58f356abcb00a145d0305be519de8c
src/views/inventoryManagement/receiptManagement/components/formDiaManual.vue
@@ -34,27 +34,32 @@
            </el-upload>
          </template>
        </el-table-column>
        <el-table-column label="产品大类" prop="productCategory" width="200">
        <el-table-column label="产品名称" prop="productCategory" width="200">
          <template #default="scope">
            <el-input v-model="scope.row.productCategory" placeholder="请输入产品大类" />
            <el-input v-model="scope.row.productCategory" placeholder="请输入产品名称" />
          </template>
        </el-table-column>
        <el-table-column label="规格型号" prop="specificationModel" width="200">
        <el-table-column label="产品高度" prop="specificationModel" width="200">
          <template #default="scope">
            <el-input v-model="scope.row.specificationModel" placeholder="请输入规格型号" />
            <el-input v-model="scope.row.specificationModel" placeholder="请输入产品高度" />
          </template>
        </el-table-column>
        <el-table-column label="单位" prop="unit" width="100">
        <el-table-column label="高度单位" prop="unit" width="100">
          <template #default="scope">
            <el-input v-model="scope.row.unit" placeholder="请输入单位" />
            <el-input v-model="scope.row.unit" placeholder="请输入高度单位" />
          </template>
        </el-table-column>
        <el-table-column label="供应商" prop="supplierName" width="200">
        <el-table-column label="纸箱规格" prop="cartonSpecifications" width="200">
          <template #default="scope">
            <el-input v-model="scope.row.cartonSpecifications" placeholder="请输入产品高度" />
          </template>
        </el-table-column>
        <!-- <el-table-column label="供应商" prop="supplierName" width="200">
          <template #default="scope">
            <el-input v-model="scope.row.supplierName" placeholder="请输入供应商" />
          </template>
        </el-table-column>
        <el-table-column label="物品类型" prop="itemType" width="150">
        </el-table-column> -->
        <!-- <el-table-column label="物品类型" prop="itemType" width="150">
          <template #default="scope">
            <el-select v-model="scope.row.itemType" filterable allow-create placeholder="请选择物品类型" style="width: 100%">
              <el-option
@@ -65,12 +70,22 @@
              />
            </el-select>
          </template>
        </el-table-column>
        <el-table-column label="入库数量" prop="inboundNum" width="150">
        </el-table-column> -->
        <el-table-column label="入库数量-件" prop="inboundNum" width="150">
          <template #default="scope">
            <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.inboundNum" @change="() => calculateTotalPrice(scope.row)" />
            <el-input-number :step="1" :min="0" style="width: 100%" v-model="scope.row.inboundNum" @change="() => calculateTotalPrice(scope.row)" />
          </template>
        </el-table-column>
        <el-table-column label="每件数量/支" prop="boxNum" width="150">
          <template #default="scope">
            <el-input-number :step="1" :min="0" style="width: 100%" v-model="scope.row.boxNum" @change="() => calculateTotalPrice(scope.row)" />
          </template>
        </el-table-column>
        <el-table-column label="单价(元)/支" prop="taxInclusiveUnitPrice" width="150">
         <template #default="scope">
           <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.taxInclusiveUnitPrice" @change="() => calculateTotalPrice(scope.row)" />
         </template>
       </el-table-column>
        <el-table-column label="入库日期" prop="inboundDate" width="180">
          <template #default="scope">
            <el-date-picker
@@ -88,11 +103,7 @@
<!--            <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.quantityStock" @change="() => calculateTotalPrice(scope.row)" />-->
<!--          </template>-->
<!--        </el-table-column>-->
<!--        <el-table-column label="单价(元)" prop="taxInclusiveUnitPrice" width="150">-->
<!--          <template #default="scope">-->
<!--            <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.taxInclusiveUnitPrice" @change="() => calculateTotalPrice(scope.row)" />-->
<!--          </template>-->
<!--        </el-table-column>-->
<!--        <el-table-column -->
<!--           label="总价(元)" -->
<!--           prop="taxInclusiveTotalPrice" -->
@@ -127,10 +138,7 @@
  Authorization: "Bearer " + getToken(),
});
const imeUrl = ref(import.meta.env.VITE_APP_ENV)
console.log(import.meta)
const javaApiUrl = __BASE_API__;
console.log('Java API 地址:', javaApiUrl)
const userStore = useUserStore()
const { proxy } = getCurrentInstance()
@@ -200,6 +208,7 @@
    id: null,
    productCategory: '',
    specificationModel: '',
    cartonSpecifications:'',
    unit: '',
    supplierName: form.value.supplierName || '',
    itemType: '',
@@ -210,6 +219,7 @@
    taxInclusiveTotalPrice: 0,
    taxRate: null,
    taxExclusiveTotalPrice: 0,
    boxNum: 0
  });
};
@@ -250,10 +260,10 @@
        proxy.$modal.msgError(`第${i + 1}行产品数据未填写完整(产品大类、规格型号、单位为必填)`)
        return
      }
      if (!product.itemType) {
        proxy.$modal.msgError(`第${i + 1}行请选择物品类型`)
        return
      }
      // if (!product.itemType) {
      //   proxy.$modal.msgError(`第${i + 1}行请选择物品类型`)
      //   return
      // }
      if (!product.inboundDate) {
        proxy.$modal.msgError(`第${i + 1}行请选择入库日期`)
        return
@@ -263,6 +273,12 @@
        proxy.$modal.msgError(`第${i + 1}行本次入库数量需大于0`)
        return
      }
      const boxNum = Number(product?.boxNum ?? 0);
      if (!Number.isFinite(boxNum) || boxNum <= 0) {
        proxy.$modal.msgError(`第${i + 1}每盒数量需大于0`)
        return
      }
    }
    const payloadList = productList.value.map(product => ({
@@ -278,7 +294,9 @@
      taxExclusiveTotalPrice: Number(product.taxExclusiveTotalPrice || 0),
         taxInclusiveUnitPrice: Number(product.taxInclusiveUnitPrice || 0),
         taxInclusiveTotalPrice: Number(product.taxInclusiveTotalPrice || 0),
      url: product.url,
      boxNum:Number(product.boxNum),
      cartonSpecifications: product.cartonSpecifications,
      url: product.url||'/src/assets/logo/logo.png',
    }));
    loading.value = true
    if (operationType.value === 'edit') {