gaoluyang
4 天以前 5022e805982370412c16d3b630780595fe9f6cb1
双奇点
1.修改采购、销售相关字段
已修改4个文件
145 ■■■■ 文件已修改
src/views/inventoryManagement/receiptManagement/components/formDia.vue 68 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/receiptManagement/components/formDiaManual.vue 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/receiptManagement/index.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/salesLedger/index.vue 46 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/receiptManagement/components/formDia.vue
@@ -34,40 +34,21 @@
          type="index"
          width="60"
        />
        <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="productCategory" />
                <el-table-column label="规格型号" prop="specificationModel" />
                <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="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">
                <el-table-column label="采购数量" prop="quantity" width="100" />
                <el-table-column label="待入库数量" prop="quantity0" width="100" />
                <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
@@ -243,9 +224,6 @@
      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)
@@ -300,32 +278,6 @@
        return exceedsAddLimit(product);
    })
    if (invalidProducts.length > 0) {
      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,
      inboundTime: formatDateTime(),
@@ -334,11 +286,7 @@
        id: product.id,
        inboundQuantity: Number(product.quantityStock),
                unitPrice: Number(product.taxInclusiveUnitPrice),
                taxInclusiveTotalPrice: Number(product.taxInclusiveTotalPrice),
        boxNum: Number(product.boxNum),
        cartonSpecifications: product.cartonSpecifications,
        dollarPrice: Number(product.dollarPrice)
                taxInclusiveTotalPrice: Number(product.taxInclusiveTotalPrice)
      })),
    };
    loading.value = true
src/views/inventoryManagement/receiptManagement/components/formDiaManual.vue
@@ -81,14 +81,9 @@
            <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">
        <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="dollarPrice" width="150">
         <template #default="scope">
           <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.dollarPrice"/>
         </template>
       </el-table-column>
        <el-table-column label="入库日期" prop="inboundDate" width="180">
@@ -225,7 +220,6 @@
    taxRate: null,
    taxExclusiveTotalPrice: 0,
    boxNum: 0,
    dollarPrice: 0
  });
};
@@ -293,11 +287,6 @@
        proxy.$modal.msgError(`第${i + 1}行单价(元)需大于0`)
        return
      }
      const dollarPrice = Number(product?.dollarPrice ?? 0);
      if (!Number.isFinite(dollarPrice) || dollarPrice <= 0) {
        proxy.$modal.msgError(`第${i + 1}行单价(美元)需大于0`)
        return
      }
      if (!product.inboundDate) {
        proxy.$modal.msgError(`第${i + 1}行请选择入库日期`)
        return
@@ -321,7 +310,6 @@
      boxNum:Number(product.boxNum),
      cartonSpecifications: product.cartonSpecifications,
      url: product.url||'',
      dollarPrice: Number(product.dollarPrice || 0),
    }));
    loading.value = true
    if (operationType.value === 'edit') {
@@ -419,7 +407,6 @@
      boxNum: Number(row?.boxNum ?? 0),
      cartonSpecifications: row?.cartonSpecifications ?? '',
      url: row?.url ?? '',
      dollarPrice: Number(row?.dollarPrice ?? 0),
    }]
  }
}
src/views/inventoryManagement/receiptManagement/index.vue
@@ -42,12 +42,9 @@
              <div>{{ scope.row.specificationModel }}{{ scope.row.unit }}</div>
            </template>
          </el-table-column>
          <el-table-column label="入库数量/件" prop="inboundNum" width="100" show-overflow-tooltip />
          <el-table-column label="每件数量/支" prop="boxNum" width="100" show-overflow-tooltip />
          <el-table-column label="入库数量" prop="inboundNum" width="100" show-overflow-tooltip />
          <el-table-column label="单价(元)/件" prop="taxInclusiveUnitPrice" width="150"></el-table-column>
          <el-table-column label="单价(美元)/件" prop="dollarPrice" width="150"></el-table-column>
          <el-table-column label="纸箱规格" prop="cartonSpecifications" width="150"></el-table-column>
          <el-table-column label="入库人" prop="createBy" width="80" show-overflow-tooltip />
          <el-table-column label="入库人" prop="createBy" width="120" show-overflow-tooltip />
           <el-table-column fixed="right" label="操作" min-width="60" align="center">
             <template #default="scope">
               <el-button link type="primary" size="small" @click="openForm('edit', scope.row, 'purchase');">编辑</el-button>
@@ -110,7 +107,6 @@
                        <el-table-column label="入库数量/件" prop="inboundNum" width="100" show-overflow-tooltip />
                        <el-table-column label="每件数量/支" prop="boxNum" width="100" show-overflow-tooltip />
                        <el-table-column label="单价(元)/件" prop="taxInclusiveUnitPrice" width="150"></el-table-column>
                        <el-table-column label="单价(美元)/件" prop="dollarPrice" width="150"></el-table-column>
                        <el-table-column label="纸箱规格" prop="cartonSpecifications" width="150"></el-table-column>
            <el-table-column label="入库人" prop="createBy" width="150" show-overflow-tooltip />
            <el-table-column fixed="right" label="操作" width="100" align="center">
@@ -187,13 +183,7 @@
          <el-col :span="12">
            <div class="barcode-item">
              <div class="barcode-label">单价</div>
              <div class="barcode-value">{{barcodeDetail.taxInclusiveUnitPrice}}元/件</div>
            </div>
          </el-col>
          <el-col :span="12">
            <div class="barcode-item">
              <div class="barcode-label">单价</div>
              <div class="barcode-value">{{barcodeDetail.dollarPrice}}美元/件</div>
              <div class="barcode-value">{{barcodeDetail.taxInclusiveUnitPrice}}美元/件</div>
            </div>
          </el-col>
        </el-row>
src/views/salesManagement/salesLedger/index.vue
@@ -53,11 +53,8 @@
                  <div>{{ scope.row.specificationModel }}{{ scope.row.unit }}</div>
                </template>
              </el-table-column>
              <el-table-column label="数量/件" prop="quantity"/>
              <el-table-column label="每件数量/支" prop="boxNum" width="100"/>
              <el-table-column label="单价(元)/件" prop="taxInclusiveUnitPrice" :formatter="formattedNumber"></el-table-column>
              <el-table-column label="单价(美元)/件" prop="dollarPrice"></el-table-column>
              <el-table-column label="纸箱规格" prop="cartonSpecifications"></el-table-column>
              <el-table-column label="数量" prop="quantity"/>
              <el-table-column label="单价(美元)/件" prop="taxInclusiveUnitPrice" :formatter="formattedNumber"></el-table-column>
              <el-table-column label="税率(%)" prop="taxRate" />
              <el-table-column label="含税总价(元)" prop="taxInclusiveTotalPrice" :formatter="formattedNumber" />
@@ -177,12 +174,9 @@
            </template>
          </el-table-column>
          <!-- <el-table-column label="单位" prop="unit" /> -->
          <el-table-column label="数量/件" prop="quantity" />
          <el-table-column label="每件数量/支" prop="boxNum" />
          <el-table-column label="数量" prop="quantity" />
          <!-- <el-table-column label="税率(%)" prop="taxRate" /> -->
          <el-table-column label="单价(元)/件" prop="taxInclusiveUnitPrice" :formatter="formattedNumber" />
          <el-table-column label="单价(美元)/件" prop="dollarPrice" />
          <el-table-column label="纸箱规格/cm" prop="cartonSpecifications" />
          <el-table-column label="单价(美元)/件" prop="taxInclusiveUnitPrice" :formatter="formattedNumber" />
          <!-- <el-table-column label="含税总价(元)" prop="taxInclusiveTotalPrice" :formatter="formattedNumber" />
          <el-table-column label="不含税总价(元)" prop="taxExclusiveTotalPrice" :formatter="formattedNumber" /> -->
          <el-table-column fixed="right" label="操作" min-width="60" align="center" v-if="operationType !== 'view'">
@@ -264,30 +258,15 @@
        </el-row>
        <el-row :gutter="30">
          <el-col :span="12">
            <el-form-item label="单价(元)/件:" prop="taxInclusiveUnitPrice">
            <el-form-item label="单价(美元)/件:" prop="taxInclusiveUnitPrice">
              <el-input-number :step="0.01" :min="0" v-model="productForm.taxInclusiveUnitPrice" style="width: 100%"
                                                             :precision="2"
                                                             placeholder="请输入" clearable @change="calculateFromUnitPrice" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="单价(美元)/件:" prop="dollarPrice">
              <el-input-number :step="0.01" :min="0" v-model="productForm.dollarPrice" style="width: 100%"
                                                             :precision="2"
                                                             placeholder="请输入" clearable/>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="30">
                    <el-col :span="12">
                        <el-form-item label="数量/件:" prop="quantity">
                        <el-form-item label="数量:" prop="quantity">
                            <el-input-number  :min="0" v-model="productForm.quantity" placeholder="请输入" clearable
                                                                @change="calculateFromQuantity" style="width: 100%" />
                        </el-form-item>
                    </el-col>
          <el-col :span="12">
            <el-form-item label="每件数量/支:" prop="boxNum">
              <el-input-number  :min="0" v-model="productForm.boxNum" placeholder="请输入" clearable
                                                                @change="calculateFromQuantity" style="width: 100%" />
            </el-form-item>
          </el-col>
@@ -305,11 +284,6 @@
          </el-col>
        </el-row>
        <el-row :gutter="30">
                    <el-col :span="12">
                        <el-form-item label="纸箱规格/cm:" prop="cartonSpecifications">
              <el-input v-model="productForm.cartonSpecifications" placeholder="请输入" clearable />
            </el-form-item>
                    </el-col>
          <el-col :span="12">
            <el-form-item label="发票类型:" prop="invoiceType">
              <el-select v-model="productForm.invoiceType" placeholder="请选择" clearable>
@@ -585,8 +559,6 @@
    taxExclusiveTotalPrice: "",
    invoiceType: "",
    cartonSpecifications:'',
    boxNum: "",
    dollarPrice: ''
  },
  productRules: {
    productCategory: [{ required: true, message: "请选择", trigger: "change" }],
@@ -599,13 +571,7 @@
    taxInclusiveUnitPrice: [
      { required: true, message: "请输入", trigger: "blur" },
    ],
    dollarPrice: [
      { required: true, message: "请输入", trigger: "blur" },
    ],
    cartonSpecifications: [{ required: true, message: "请输入", trigger: "blur" }],
    boxNum: [
      { required: true, message: "请输入", trigger: "blur" },
    ],
    taxRate: [{ required: true, message: "请选择", trigger: "change" }],
    taxInclusiveTotalPrice: [
      { required: true, message: "请输入", trigger: "blur" },