liyong
3 天以前 5b1d48f9bc3f143f3e58d46275163665f7b908be
src/views/salesManagement/salesLedger/index.vue
@@ -284,10 +284,15 @@
          <el-col :span="12">
            <el-form-item label="销售合同号:"
                          prop="salesContractNo">
              <el-input v-model="form.salesContractNo"
                        placeholder="自动生成"
                        clearable
                        disabled />
              <div style="display: flex; align-items: center; gap: 12px;width: 100%;">
                <el-checkbox v-model="form.autoGenerateContractNo" v-if="operationType === 'add'">自动生成
                </el-checkbox>
                <el-input v-model="form.salesContractNo"
                          :placeholder="form.autoGenerateContractNo ? '自动生成' : '请输入'"
                          clearable
                          :disabled="form.autoGenerateContractNo" />
              </div>
            </el-form-item>
          </el-col>
          <el-col :span="12">
@@ -1069,6 +1074,7 @@
    },
    form: {
      salesContractNo: "",
      autoGenerateContractNo: true,
      salesman: "",
      customerId: "",
      entryPerson: "",
@@ -1578,7 +1584,7 @@
    selectedQuotation.value = null;
    let userLists = await userListNoPage();
    userList.value = userLists.data;
    listCustomer({ current: -1, size: -1 }).then(res => {
    listCustomer({ current: -1, size: -1, type: 0 }).then(res => {
      customerOption.value = res.data.records;
    });
    form.value.entryPerson = userStore.id;
@@ -1587,6 +1593,8 @@
      form.value.entryDate = getCurrentDate();
      // 签订日期默认为当天
      form.value.executionDate = getCurrentDate();
      // 默认自动生成销售合同号
      form.value.autoGenerateContractNo = true;
    } else {
      currentId.value = row.id;
      getSalesLedgerWithProducts({ id: row.id, type: 1 }).then(res => {
@@ -1594,6 +1602,8 @@
        form.value.entryPerson = Number(res.entryPerson);
        productData.value = form.value.productData;
        fileList.value = form.value.storageBlobVOs;
        // 编辑时设置自动生成为false,允许手动修改
        form.value.autoGenerateContractNo = false;
      });
    }
    // let userAll = await userStore.getInfo()
@@ -1705,6 +1715,8 @@
        taxExclusiveTotalPrice: taxExclusiveTotalPrice,
        invoiceType: "增普票",
        isProduction: true,
        productId: p.productId,
        productModelId: p.productModelId
      };
    });
@@ -1728,6 +1740,9 @@
        }
        form.value.storageBlobDTOs = fileList;
        form.value.type = 1;
        if (form.value.autoGenerateContractNo) {
          form.value.salesContractNo = '';
        }
        addOrUpdateSalesLedger(form.value).then(res => {
          proxy.$modal.msgSuccess("提交成功");
          closeDia();
@@ -2652,7 +2667,7 @@
    // 发货状态必须是"待发货"或"审核拒绝"
    const statusStr = shippingStatus ? String(shippingStatus).trim() : "";
    return statusStr === "待发货" || statusStr === "审核拒绝";
    return statusStr === "待发货" || statusStr === "审核拒绝" || statusStr === "部分发货";
  };
  // 打开附件弹窗
@@ -3005,4 +3020,4 @@
      page-break-after: avoid;
    }
  }
</style>
</style>