gaoluyang
2025-11-19 a3d0412c3cfcec269e0bec57b844b1fc0b44c767
src/views/salesManagement/salesLedger/index.vue
@@ -45,16 +45,22 @@
        <el-table-column align="center" type="selection" width="55" />
        <el-table-column type="expand">
          <template #default="props">
            <el-table :data="props.row.children" border show-summary :summary-method="summarizeChildrenTable">
              <el-table-column align="center" label="序号" type="index" width="60" />
              <el-table-column label="产品大类" prop="productCategory" />
              <el-table-column label="规格型号" prop="specificationModel" />
              <el-table-column label="单位" prop="unit" />
              <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="taxInclusiveTotalPrice" :formatter="formattedNumber" />
              <el-table-column label="不含税总价(元)" prop="taxExclusiveTotalPrice" :formatter="formattedNumber" />
            <el-table :data="props.row.children" border show-summary :summary-method="summarizeChildrenTable" style="min-width: 1200px;"
                      scrollbar-always-on>
              <el-table-column align="center" label="序号" type="index" width="70" />
              <el-table-column label="产品大类" prop="productCategory" width="160" />
              <el-table-column label="规格型号" prop="specificationModel" width="220" />
              <el-table-column label="单位" prop="unit" width="100" />
              <el-table-column label="数量" prop="quantity" width="120" />
              <el-table-column label="税率(%)" prop="taxRate" width="120" />
              <el-table-column label="含税单价(元)" prop="taxInclusiveUnitPrice" :formatter="formattedNumber" width="160" />
              <el-table-column label="含税总价(元)" prop="taxInclusiveTotalPrice" :formatter="formattedNumber" width="180" />
              <el-table-column label="不含税总价(元)" prop="taxExclusiveTotalPrice" :formatter="formattedNumber" width="180" />
              <el-table-column fixed="right" label="操作" width="150" align="center">
                <template #default="scope">
                  <el-button link type="primary" size="small" @click="openDeliveryForm(props.row, scope.row)">发货</el-button>
                </template>
              </el-table-column>
            </el-table>
          </template>
        </el-table-column>
@@ -70,12 +76,11 @@
        <el-table-column label="录入人" prop="entryPersonName" width="100" show-overflow-tooltip />
        <el-table-column label="录入日期" prop="entryDate" width="120" show-overflow-tooltip />
        <el-table-column label="签订日期" prop="executionDate" width="120" show-overflow-tooltip />
        <el-table-column fixed="right" label="操作" min-width="200" align="center">
        <el-table-column fixed="right" label="操作" min-width="150" align="center">
          <template #default="scope">
            <el-button link type="primary" size="small" :disabled="scope.row.invoiceTotal>0 || scope.row.entryPersonName !== userStore.nickName" @click="openForm('edit', scope.row)">编辑</el-button>
            <el-button link type="primary" size="small" @click="openForm('edit', scope.row)">编辑</el-button>
<!--            <el-button link type="primary" size="small" @click="openForm('view', scope.row)">详情</el-button>-->
            <el-button link type="primary" size="small" @click="downLoadFile(scope.row)">附件</el-button>
            <el-button link type="primary" size="small" @click="openDeliveryForm(scope.row)">发货</el-button>
          </template>
        </el-table-column>
      </el-table>
@@ -588,7 +593,7 @@
// 发货相关
const deliveryFormVisible = ref(false);
const currentDeliveryRow = ref(null);
const currentDeliveryContext = ref(null);
const deliveryFormData = reactive({
  deliveryForm: {
    shippingDate: "",
@@ -1523,8 +1528,8 @@
}
// 打开发货弹框
const openDeliveryForm = (row) => {
  currentDeliveryRow.value = row;
const openDeliveryForm = (parentRow, productRow) => {
  currentDeliveryContext.value = { parentRow, productRow };
  deliveryForm.value = {
    shippingDate: getCurrentDate(),
    shippingCarNumber: "",
@@ -1537,14 +1542,14 @@
  proxy.$refs["deliveryFormRef"].validate((valid) => {
    if (valid) {
      addShippingInfo({
        salesLedgerId: currentDeliveryRow.value.id,
        salesLedgerId: currentDeliveryContext.value.parentRow.id,
        salesLedgerProductId: currentDeliveryContext.value.productRow.id,
        shippingDate: deliveryForm.value.shippingDate,
        shippingCarNumber: deliveryForm.value.shippingCarNumber,
      })
        .then(() => {
          proxy.$modal.msgSuccess("发货成功");
          closeDeliveryDia();
          getList();
        })
        .catch(() => {
          proxy.$modal.msgError("发货失败,请重试");
@@ -1557,7 +1562,7 @@
const closeDeliveryDia = () => {
  proxy.resetForm("deliveryFormRef");
  deliveryFormVisible.value = false;
  currentDeliveryRow.value = null;
  currentDeliveryContext.value = null;
};
onMounted(() => {