zhangwencui
2 天以前 7d5b4ab84d9b36bdf3f6733f55c70981dcba4f22
src/views/salesManagement/salesLedger/index.vue
@@ -180,7 +180,7 @@
                  {{ scope.row.perimeter ?? "" }}
                </template>
              </el-table-column>
              <el-table-column label="总面积(cm²)"
              <el-table-column label="总面积(m²)"
                               prop="actualTotalArea"
                               min-width="100">
                <template #default="scope">
@@ -351,6 +351,10 @@
                         show-overflow-tooltip />
        <el-table-column label="备注"
                         prop="remarks"
                         width="200"
                         show-overflow-tooltip />
        <el-table-column label="客户备注"
                         prop="customerRemarks"
                         width="200"
                         show-overflow-tooltip />
        <el-table-column fixed="right"
@@ -820,12 +824,12 @@
                               type="primary"
                               size="small"
                               @click="openOtherAmountInline(scope.row)">
                      其他金额({{ (scope.row.salesProductProcessList || []).length || 0 }})
                      额外加工({{ (scope.row.salesProductProcessList || []).length || 0 }})
                    </el-button>
                  </template>
                  <div style="display:flex; align-items:center; justify-content:space-between; gap: 10px; margin-bottom: 8px;">
                    <div style="font-weight: 600; color:#303133;">
                      其他金额
                      额外加工
                    </div>
                    <el-button type="primary"
                               plain
@@ -840,7 +844,7 @@
                    <el-select v-model="scope.row.__inlineOtherAmountAddId"
                               filterable
                               clearable
                               placeholder="请选择其他金额项目"
                               placeholder="请选择额外加工项目"
                               style="width: 100%;">
                      <el-option v-for="item in otherAmountSelectOptions"
                                 :key="item.id"
@@ -887,7 +891,7 @@
                  </div>
                  <div v-else
                       style="color:#909399; font-size: 13px;">
                    暂无其他金额
                    暂无额外加工
                  </div>
                </el-popover>
              </template>
@@ -910,12 +914,12 @@
                               size="small"
                               :disabled="isProductShipped(scope.row)"
                               @click="openOtherAmountInline(scope.row)">
                      其他金额({{ (scope.row.salesProductProcessList || []).length || 0 }})
                      额外加工({{ (scope.row.salesProductProcessList || []).length || 0 }})
                    </el-button>
                  </template>
                  <div style="display:flex; align-items:center; justify-content:space-between; gap: 10px; margin-bottom: 8px;">
                    <div style="font-weight: 600; color:#303133;">
                      其他金额
                      额外加工
                    </div>
                    <el-button type="primary"
                               plain
@@ -931,7 +935,7 @@
                    <el-select v-model="scope.row.__inlineOtherAmountAddId"
                               filterable
                               clearable
                               placeholder="请选择其他金额项目"
                               placeholder="请选择额外加工项目"
                               style="width: 100%;"
                               :disabled="isProductShipped(scope.row)">
                      <el-option v-for="item in otherAmountSelectOptions"
@@ -981,7 +985,7 @@
                  </div>
                  <div v-else
                       style="color:#909399; font-size: 13px;">
                    暂无其他金额
                    暂无额外加工
                  </div>
                </el-popover>
              </template>
@@ -1952,6 +1956,30 @@
    if (!row) return false;
    if (!row.productCategory) {
      proxy.$modal.msgWarning("请选择产品大类");
      return false;
    }
    if (row.width <= 0) {
      proxy.$modal.msgWarning("宽必须大于0");
      return false;
    }
    if (row.height <= 0) {
      proxy.$modal.msgWarning("高必须大于0");
      return false;
    }
    if (row.settlePieceArea <= 0) {
      proxy.$modal.msgWarning("结算单片面积必须大于0");
      return false;
    }
    if (row.quantity <= 0) {
      proxy.$modal.msgWarning("数量必须大于0");
      return false;
    }
    if (row.actualTotalArea <= 0) {
      proxy.$modal.msgWarning("面积必须大于0");
      return false;
    }
    if (row.taxInclusiveUnitPrice <= 0) {
      proxy.$modal.msgWarning("含税单价必须大于0");
      return false;
    }
    if (!row.productModelId) {
@@ -3927,12 +3955,21 @@
    }
    // 只允许【未发货/审批失败】进入发货流程
    const canDeliveryLedgers = selectedRows.value.filter(r => {
      const status = Number(r.deliveryStatus);
      return status === 1 || status === 3;
    const statusItem = selectedRows.value[0].deliveryStatus;
    const isTrue = true;
    selectedRows.value.forEach(row => {
      if (row.deliveryStatus != 1 && row.deliveryStatus != 3) {
        proxy.$modal.msgWarning("仅未发货或审批失败的台账可以合并发货");
        isTrue = false;
        return;
      }
      if (row.deliveryStatus !== statusItem) {
        proxy.$modal.msgWarning("请选择相同状态的销售台账");
        isTrue = false;
        return;
      }
    });
    if (canDeliveryLedgers.length === 0) {
      proxy.$modal.msgWarning("仅未发货或审批失败的台账可以发货");
    if (!isTrue) {
      return;
    }