周宾
2 天以前 3806a7b94bc2b069d22743c22f8d3dc54101850e
src/views/inventoryManagement/receiptManagement/components/formDia.vue
@@ -34,21 +34,40 @@
          type="index"
          width="60"
        />
        <el-table-column label="产品大类" prop="productCategory" />
        <el-table-column label="规格型号" prop="specificationModel" />
        <el-table-column label="单位" prop="unit" width="70" />
        <el-table-column label="产品" prop="productCategory" />
        <el-table-column label="产品高度" prop="specificationModel" >
          <template #default="scope">
            <div>{{ scope.row.specificationModel }}{{ scope.row.unit }}</div>
          </template>
        </el-table-column>
        <!-- <el-table-column label="高度单位" prop="unit" width="70" /> -->
        <!-- <el-table-column label="供应商" prop="supplierName" width="100" /> -->
        <el-table-column label="采购数量" prop="quantity" width="100" />
        <el-table-column label="待入库数量" prop="quantity0" width="100" />
        <el-table-column label="本次入库数量" prop="quantityStock" width="150">
        <el-table-column label="采购数量/件" prop="quantity" width="100" />
        <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"/>
          </template>
        </el-table-column>
        <el-table-column label="待入库数量/件" prop="quantity0" width="150" />
        <el-table-column label="本次入库数量/件" prop="quantityStock" width="150">
          <template #default="scope">
            <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="taxRate" width="120" />
        <el-table-column label="单价(元)" prop="taxInclusiveUnitPrice" width="150">
        <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)" :disabled="operationType === 'edit'"/>
               </template>
            </el-table-column>
        <el-table-column label="单价(美元)/件" prop="dollarPrice" width="150">
               <template #default="scope">
                  <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.dollarPrice" :disabled="operationType === 'edit'"/>
               </template>
            </el-table-column>
        <el-table-column label="纸箱规格" prop="cartonSpecifications" width="150">
               <template #default="scope">
            <el-input v-model="scope.row.cartonSpecifications" placeholder="请输入纸箱规格" style="width: 100%" />
               </template>
            </el-table-column>
        <el-table-column
@@ -224,6 +243,9 @@
      taxInclusiveUnitPrice: Number(item?.taxInclusiveUnitPrice ?? 0),
      taxInclusiveTotalPrice: 0,
      originalQuantityStock: Number(item.quantityStock ?? item.inboundQuantity ?? 0),
      boxNum: item.boxNum || 0,
      dollarPrice: item.dollarPrice || 0,
    }))
  } catch (error) {
    console.error('查询产品记录失败:', error)
@@ -282,6 +304,27 @@
      proxy.$modal.msgError('本次入库数量需大于0,且不能超过待入库数量')
      return
    }
    let isVerify = true
    selectedRows.value.some((product) => {
        if(!product.boxNum){
          proxy.$modal.msgError('请填写每件数量/支')
          isVerify = false
          return true
        }
        if(!product.cartonSpecifications){
          proxy.$modal.msgError('请填写纸箱规格')
          isVerify = false
          return true
        }
        if(!product.dollarPrice){
          proxy.$modal.msgError('请填写单价(美元)/件')
          isVerify = false
          return true
        }
        return false
    })
    if(!isVerify)return
    const stockInData = {
      ...form.value,
@@ -291,7 +334,11 @@
        id: product.id,
        inboundQuantity: Number(product.quantityStock),
            unitPrice: Number(product.taxInclusiveUnitPrice),
            taxInclusiveTotalPrice: Number(product.taxInclusiveTotalPrice)
            taxInclusiveTotalPrice: Number(product.taxInclusiveTotalPrice),
        boxNum: Number(product.boxNum),
        cartonSpecifications: product.cartonSpecifications,
        dollarPrice: Number(product.dollarPrice)
      })),
    };
    loading.value = true