zouyu
2026-01-15 13d4911b890817bfb586a95dfb827fda6e41cb9a
代码调整12
已修改1个文件
63 ■■■■ 文件已修改
src/views/procurementManagement/procurementLedger/index.vue 63 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/procurementManagement/procurementLedger/index.vue
@@ -199,21 +199,26 @@
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="销售合同号:" prop="salesLedgerId">
              <el-select
                v-model="form.salesLedgerId"
                placeholder="请选择"
                                filterable
                clearable
                @change="salesLedgerChange"
              >
                <el-option
                  v-for="item in salesContractList"
                  :key="item.id"
                  :label="item.salesContractNo"
                  :value="item.id"
                />
              </el-select>
            <el-form-item label="销售合同号:" prop="salesContractNo">
              <el-input
                  v-model="form.salesContractNo"
                  placeholder="请输入"
                  clearable
              />
<!--              <el-select-->
<!--                v-model="form.salesLedgerId"-->
<!--                placeholder="请选择"-->
<!--                                filterable-->
<!--                clearable-->
<!--                @change="salesLedgerChange"-->
<!--              >-->
<!--                <el-option-->
<!--                  v-for="item in salesContractList"-->
<!--                  :key="item.id"-->
<!--                  :label="item.salesContractNo"-->
<!--                  :value="item.id"-->
<!--                />-->
<!--              </el-select>-->
            </el-form-item>
          </el-col>
        </el-row>
@@ -532,7 +537,7 @@
              label="不含税总价(元):"
              prop="taxExclusiveTotalPrice"
            >
              <el-input
              <el-input
                v-model="productForm.taxExclusiveTotalPrice"
                @change="reverseMathNum('taxExclusiveTotalPrice')"
              />
@@ -572,7 +577,7 @@
        </div>
      </template>
    </el-dialog>
    <!-- 二维码显示对话框 -->
    <el-dialog
      v-model="qrCodeDialogVisible"
@@ -1095,9 +1100,9 @@
// 移除文件
function handleRemove(file) {
  console.log("handleRemove", file.id);
  if (file.size > 1024 * 1024 * 10) {
  if (file.size > 1024 * 1024 * 10) {
    // 仅前端清理,不调用删除接口和提示
    return;
    return;
  }
  if (operationType.value === "edit") {
    let ids = [];
@@ -1375,29 +1380,29 @@
  if (field === 'taxInclusiveTotalPrice') {
    // 已知含税总价和数量,反算含税单价
    if (productForm.value.quantity) {
      productForm.value.taxInclusiveUnitPrice =
      productForm.value.taxInclusiveUnitPrice =
        (Number(productForm.value.taxInclusiveTotalPrice) / Number(productForm.value.quantity)).toFixed(2);
    }
    // 已知含税总价和含税单价,反算数量
    else if (productForm.value.taxInclusiveUnitPrice) {
      productForm.value.quantity =
      productForm.value.quantity =
        (Number(productForm.value.taxInclusiveTotalPrice) / Number(productForm.value.taxInclusiveUnitPrice)).toFixed(2);
    }
    // 反算不含税总价
    productForm.value.taxExclusiveTotalPrice =
    productForm.value.taxExclusiveTotalPrice =
      (Number(productForm.value.taxInclusiveTotalPrice) / (1 + taxRate / 100)).toFixed(2);
  } else if (field === 'taxExclusiveTotalPrice') {
    // 反算含税总价
    productForm.value.taxInclusiveTotalPrice =
    productForm.value.taxInclusiveTotalPrice =
      (Number(productForm.value.taxExclusiveTotalPrice) * (1 + taxRate / 100)).toFixed(2);
    // 已知数量,反算含税单价
    if (productForm.value.quantity) {
      productForm.value.taxInclusiveUnitPrice =
      productForm.value.taxInclusiveUnitPrice =
        (Number(productForm.value.taxInclusiveTotalPrice) / Number(productForm.value.quantity)).toFixed(2);
    }
    // 已知含税单价,反算数量
    else if (productForm.value.taxInclusiveUnitPrice) {
      productForm.value.quantity =
      productForm.value.quantity =
        (Number(productForm.value.taxInclusiveTotalPrice) / Number(productForm.value.taxInclusiveUnitPrice)).toFixed(2);
    }
  }
@@ -1458,7 +1463,7 @@
    proxy.$modal.msgWarning("二维码未生成");
    return;
  }
  const a = document.createElement('a');
  a.href = qrCodeUrl.value;
  a.download = `采购合同号二维码_${new Date().getTime()}.png`;
@@ -1518,7 +1523,7 @@
// 解析扫码内容(模拟解析二维码数据)
const parseScanContent = (content) => {
  if (!content) return;
  // 模拟解析二维码内容,这里可以根据实际需求调整解析逻辑
  // 假设扫码内容格式为:合同号|供应商|项目|金额|付款方式
  const parts = content.split('|');
@@ -1553,11 +1558,11 @@
        remark: scanAddForm.scanRemark,
        type: 2
      };
      // 模拟新增成功
      proxy.$modal.msgSuccess("扫码新增成功!");
      closeScanAddDialog();
      // 可以选择是否刷新列表
      // getList();
    }