Ver código fonte

对账单,对账单报表优化

lxf 1 ano atrás
pai
commit
2cbf1a3713

+ 3 - 3
src/views/group/finance/check-bill/index.vue

@@ -120,13 +120,13 @@
     <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="94%">
       <el-tabs v-model="activeName" class="demo-tabs">
         <el-tab-pane label="SKU对账单" name="sku">
-          <PrintSKU :rowData="rowData" v-if="activeName === 'sku'" @clickCancel="openPrint = false"></PrintSKU>
+          <PrintSKU :rowData="rowData" :activeName="activeName" @clickCancel="openPrint = false"></PrintSKU>
         </el-tab-pane>
         <el-tab-pane label="BOM对账单" name="bom">
-          <PrintBOM :rowData="rowData" v-if="activeName === 'bom'" @clickCancel="openPrint = false"></PrintBOM>
+          <PrintBOM :rowData="rowData" :activeName="activeName" @clickCancel="openPrint = false"></PrintBOM>
         </el-tab-pane>
         <el-tab-pane label="订单对账单" name="order">
-          <PrintOrder :rowData="rowData" v-if="activeName === 'order'" @clickCancel="openPrint = false"></PrintOrder>
+          <PrintOrder :rowData="rowData" :activeName="activeName" @clickCancel="openPrint = false"></PrintOrder>
         </el-tab-pane>
       </el-tabs>
     </el-dialog>

+ 23 - 13
src/views/group/finance/check-bill/printBOM.vue

@@ -41,24 +41,34 @@
 const { proxy } = getCurrentInstance();
 const props = defineProps({
   rowData: Object,
+  activeName: String,
 });
 const loading = ref(false);
 const tableData = ref([]);
-onMounted(() => {
-  if (props.rowData && props.rowData.id) {
-    loading.value = true;
-    proxy.post("/statementOfAccount/getDocumentByBom", { id: props.rowData.id }).then(
-      (res) => {
-        tableData.value = Object.freeze(res);
-        loading.value = false;
-      },
-      (err) => {
-        console.log(err);
-        loading.value = false;
+watch(
+  () => props.activeName,
+  (val) => {
+    if (val === "bom" && !(tableData.value && tableData.value.length > 0)) {
+      if (props.rowData && props.rowData.id) {
+        loading.value = true;
+        proxy.post("/statementOfAccount/getDocumentByBom", { id: props.rowData.id }).then(
+          (res) => {
+            tableData.value = Object.freeze(res);
+            loading.value = false;
+          },
+          (err) => {
+            console.log(err);
+            loading.value = false;
+          }
+        );
       }
-    );
+    }
+  },
+  {
+    deep: true,
+    immediate: true,
   }
-});
+);
 const labelList = ref({
   2: "quantity",
   4: "laserLogoSummary",

+ 71 - 61
src/views/group/finance/check-bill/printOrder.vue

@@ -26,6 +26,7 @@ import { cloneVNode } from "vue";
 const { proxy } = getCurrentInstance();
 const props = defineProps({
   rowData: Object,
+  activeName: String,
 });
 const loading = ref(false);
 const tableData = ref([]);
@@ -40,77 +41,86 @@ const getAggregate = (data) => {
   }
   return total;
 };
-onMounted(() => {
-  if (props.rowData && props.rowData.id) {
-    loading.value = true;
-    proxy.post("/statementOfAccount/getDocumentByOrder", { id: props.rowData.id }).then(
-      (res) => {
-        let total = getAggregate(proxy.deepClone(res));
-        let list = [];
-        if (res && res.length > 0) {
-          for (let i = 0; i < res.length; i++) {
-            if (res[i].skuSpecList && res[i].skuSpecList.length > 0) {
-              for (let j = 0; j < res[i].skuSpecList.length; j++) {
-                if (res[i].skuSpecList[j].bomSpecList && res[i].skuSpecList[j].bomSpecList.length > 0) {
-                  for (let y = 0; y < res[i].skuSpecList[j].bomSpecList.length; y++) {
-                    let indexOne = 0;
-                    if (j === 0 && y === 0) {
-                      for (let z = 0; z < res[i].skuSpecList.length; z++) {
-                        if (res[i].skuSpecList[z].bomSpecList && res[i].skuSpecList[z].bomSpecList.length > 0) {
-                          indexOne = Number(indexOne + res[i].skuSpecList[z].bomSpecList.length);
+watch(
+  () => props.activeName,
+  (val) => {
+    if (val === "order" && !(tableData.value && tableData.value.length > 0)) {
+      if (props.rowData && props.rowData.id) {
+        loading.value = true;
+        proxy.post("/statementOfAccount/getDocumentByOrder", { id: props.rowData.id }).then(
+          (res) => {
+            let total = getAggregate(proxy.deepClone(res));
+            let list = [];
+            if (res && res.length > 0) {
+              for (let i = 0; i < res.length; i++) {
+                if (res[i].skuSpecList && res[i].skuSpecList.length > 0) {
+                  for (let j = 0; j < res[i].skuSpecList.length; j++) {
+                    if (res[i].skuSpecList[j].bomSpecList && res[i].skuSpecList[j].bomSpecList.length > 0) {
+                      for (let y = 0; y < res[i].skuSpecList[j].bomSpecList.length; y++) {
+                        let indexOne = 0;
+                        if (j === 0 && y === 0) {
+                          for (let z = 0; z < res[i].skuSpecList.length; z++) {
+                            if (res[i].skuSpecList[z].bomSpecList && res[i].skuSpecList[z].bomSpecList.length > 0) {
+                              indexOne = Number(indexOne + res[i].skuSpecList[z].bomSpecList.length);
+                            }
+                          }
                         }
+                        let indexTwo = 0;
+                        if (y === 0) {
+                          indexTwo = res[i].skuSpecList[j].bomSpecList.length;
+                        }
+                        list.push({
+                          wlnCreateTime: res[i].wlnCreateTime,
+                          code: res[i].code,
+                          wlnCode: res[i].wlnCode,
+                          skuSpecCode: res[i].skuSpecList[j].skuSpecCode,
+                          skuSpecName: res[i].skuSpecList[j].skuSpecName,
+                          quantitySKU: res[i].skuSpecList[j].quantity,
+                          subtotal: res[i].skuSpecList[j].subtotal,
+                          bomSpecCode: res[i].skuSpecList[j].bomSpecList[y].bomSpecCode,
+                          bomSpecName: res[i].skuSpecList[j].bomSpecList[y].bomSpecName,
+                          quantityBOM: res[i].skuSpecList[j].bomSpecList[y].quantity,
+                          unitPriceBOM: res[i].skuSpecList[j].bomSpecList[y].unitPrice,
+                          laserLogoSummary: res[i].skuSpecList[j].bomSpecList[y].laserLogoSummary,
+                          laserMitochondrialSummary: res[i].skuSpecList[j].bomSpecList[y].laserMitochondrialSummary,
+                          lssueFeeSummary: res[i].skuSpecList[j].bomSpecList[y].lssueFeeSummary,
+                          deliveryMaterialsFeeSummary: res[i].skuSpecList[j].bomSpecList[y].deliveryMaterialsFeeSummary,
+                          packingLaborSummary: res[i].skuSpecList[j].bomSpecList[y].packingLaborSummary,
+                          managementFeeSummary: res[i].skuSpecList[j].bomSpecList[y].managementFeeSummary,
+                          unitPriceSKU: res[i].skuSpecList[j].unitPrice,
+                          outerBoxPackingFee: res[i].outerBoxPackingFee,
+                          total: res[i].total,
+                          indexOne: indexOne,
+                          indexTwo: indexTwo,
+                        });
                       }
                     }
-                    let indexTwo = 0;
-                    if (y === 0) {
-                      indexTwo = res[i].skuSpecList[j].bomSpecList.length;
-                    }
-                    list.push({
-                      wlnCreateTime: res[i].wlnCreateTime,
-                      code: res[i].code,
-                      wlnCode: res[i].wlnCode,
-                      skuSpecCode: res[i].skuSpecList[j].skuSpecCode,
-                      skuSpecName: res[i].skuSpecList[j].skuSpecName,
-                      quantitySKU: res[i].skuSpecList[j].quantity,
-                      subtotal: res[i].skuSpecList[j].subtotal,
-                      bomSpecCode: res[i].skuSpecList[j].bomSpecList[y].bomSpecCode,
-                      bomSpecName: res[i].skuSpecList[j].bomSpecList[y].bomSpecName,
-                      quantityBOM: res[i].skuSpecList[j].bomSpecList[y].quantity,
-                      unitPriceBOM: res[i].skuSpecList[j].bomSpecList[y].unitPrice,
-                      laserLogoSummary: res[i].skuSpecList[j].bomSpecList[y].laserLogoSummary,
-                      laserMitochondrialSummary: res[i].skuSpecList[j].bomSpecList[y].laserMitochondrialSummary,
-                      lssueFeeSummary: res[i].skuSpecList[j].bomSpecList[y].lssueFeeSummary,
-                      deliveryMaterialsFeeSummary: res[i].skuSpecList[j].bomSpecList[y].deliveryMaterialsFeeSummary,
-                      packingLaborSummary: res[i].skuSpecList[j].bomSpecList[y].packingLaborSummary,
-                      managementFeeSummary: res[i].skuSpecList[j].bomSpecList[y].managementFeeSummary,
-                      unitPriceSKU: res[i].skuSpecList[j].unitPrice,
-                      outerBoxPackingFee: res[i].outerBoxPackingFee,
-                      total: res[i].total,
-                      indexOne: indexOne,
-                      indexTwo: indexTwo,
-                    });
                   }
                 }
               }
             }
+            list.push({
+              indexOne: 1,
+              indexTwo: 1,
+              total: total,
+              wlnCreateTime: "总计:",
+            });
+            tableData.value = Object.freeze(list);
+            loading.value = false;
+          },
+          (err) => {
+            console.log(err);
+            loading.value = false;
           }
-        }
-        list.push({
-          indexOne: 1,
-          indexTwo: 1,
-          total: total,
-          wlnCreateTime: "总计:",
-        });
-        tableData.value = Object.freeze(list);
-        loading.value = false;
-      },
-      (err) => {
-        console.log(err);
-        loading.value = false;
+        );
       }
-    );
+    }
+  },
+  {
+    deep: true,
+    immediate: true,
   }
-});
+);
 const emit = defineEmits(["clickCancel"]);
 const clickCancel = () => {
   emit("clickCancel", "");

+ 23 - 13
src/views/group/finance/check-bill/printSKU.vue

@@ -35,24 +35,34 @@
 const { proxy } = getCurrentInstance();
 const props = defineProps({
   rowData: Object,
+  activeName: String,
 });
 const loading = ref(false);
 const tableData = ref([]);
-onMounted(() => {
-  if (props.rowData && props.rowData.id) {
-    loading.value = true;
-    proxy.post("/statementOfAccount/getDocumentBySku", { id: props.rowData.id }).then(
-      (res) => {
-        tableData.value = Object.freeze(res);
-        loading.value = false;
-      },
-      (err) => {
-        console.log(err);
-        loading.value = false;
+watch(
+  () => props.activeName,
+  (val) => {
+    if (val === "sku" && !(tableData.value && tableData.value.length > 0)) {
+      if (props.rowData && props.rowData.id) {
+        loading.value = true;
+        proxy.post("/statementOfAccount/getDocumentBySku", { id: props.rowData.id }).then(
+          (res) => {
+            tableData.value = Object.freeze(res);
+            loading.value = false;
+          },
+          (err) => {
+            console.log(err);
+            loading.value = false;
+          }
+        );
       }
-    );
+    }
+  },
+  {
+    deep: true,
+    immediate: true,
   }
-});
+);
 const labelList = ref({
   2: "quantity",
   5: "total",

+ 3 - 3
src/views/group/finance/summary/index.vue

@@ -17,13 +17,13 @@
     <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="94%">
       <el-tabs v-model="activeName" class="demo-tabs">
         <el-tab-pane label="SKU对账单" name="sku">
-          <PrintSKU :rowData="rowData" v-if="activeName === 'sku'" @clickCancel="openPrint = false"></PrintSKU>
+          <PrintSKU :rowData="rowData" :activeName="activeName" @clickCancel="openPrint = false"></PrintSKU>
         </el-tab-pane>
         <el-tab-pane label="BOM对账单" name="bom">
-          <PrintBOM :rowData="rowData" v-if="activeName === 'bom'" @clickCancel="openPrint = false"></PrintBOM>
+          <PrintBOM :rowData="rowData" :activeName="activeName" @clickCancel="openPrint = false"></PrintBOM>
         </el-tab-pane>
         <el-tab-pane label="订单对账单" name="order">
-          <PrintOrder :rowData="rowData" v-if="activeName === 'order'" @clickCancel="openPrint = false"></PrintOrder>
+          <PrintOrder :rowData="rowData" :activeName="activeName" @clickCancel="openPrint = false"></PrintOrder>
         </el-tab-pane>
       </el-tabs>
     </el-dialog>

+ 23 - 13
src/views/group/finance/summary/printBOM.vue

@@ -41,24 +41,34 @@
 const { proxy } = getCurrentInstance();
 const props = defineProps({
   rowData: Object,
+  activeName: String,
 });
 const loading = ref(false);
 const tableData = ref([]);
-onMounted(() => {
-  if (props.rowData && props.rowData.idGroupConcat) {
-    loading.value = true;
-    proxy.post("/statementOfAccountMerge/getDocumentByBom", { idGroupConcat: props.rowData.idGroupConcat }).then(
-      (res) => {
-        tableData.value = Object.freeze(res);
-        loading.value = false;
-      },
-      (err) => {
-        console.log(err);
-        loading.value = false;
+watch(
+  () => props.activeName,
+  (val) => {
+    if (val === "bom" && !(tableData.value && tableData.value.length > 0)) {
+      if (props.rowData && props.rowData.idGroupConcat) {
+        loading.value = true;
+        proxy.post("/statementOfAccountMerge/getDocumentByBom", { idGroupConcat: props.rowData.idGroupConcat }).then(
+          (res) => {
+            tableData.value = Object.freeze(res);
+            loading.value = false;
+          },
+          (err) => {
+            console.log(err);
+            loading.value = false;
+          }
+        );
       }
-    );
+    }
+  },
+  {
+    deep: true,
+    immediate: true,
   }
-});
+);
 const labelList = ref({
   2: "quantity",
   4: "laserLogoSummary",

+ 71 - 61
src/views/group/finance/summary/printOrder.vue

@@ -26,6 +26,7 @@ import { cloneVNode } from "vue";
 const { proxy } = getCurrentInstance();
 const props = defineProps({
   rowData: Object,
+  activeName: String,
 });
 const loading = ref(false);
 const tableData = ref([]);
@@ -40,77 +41,86 @@ const getAggregate = (data) => {
   }
   return total;
 };
-onMounted(() => {
-  if (props.rowData && props.rowData.idGroupConcat) {
-    loading.value = true;
-    proxy.post("/statementOfAccountMerge/getDocumentByOrder", { idGroupConcat: props.rowData.idGroupConcat }).then(
-      (res) => {
-        let total = getAggregate(proxy.deepClone(res));
-        let list = [];
-        if (res && res.length > 0) {
-          for (let i = 0; i < res.length; i++) {
-            if (res[i].skuSpecList && res[i].skuSpecList.length > 0) {
-              for (let j = 0; j < res[i].skuSpecList.length; j++) {
-                if (res[i].skuSpecList[j].bomSpecList && res[i].skuSpecList[j].bomSpecList.length > 0) {
-                  for (let y = 0; y < res[i].skuSpecList[j].bomSpecList.length; y++) {
-                    let indexOne = 0;
-                    if (j === 0 && y === 0) {
-                      for (let z = 0; z < res[i].skuSpecList.length; z++) {
-                        if (res[i].skuSpecList[z].bomSpecList && res[i].skuSpecList[z].bomSpecList.length > 0) {
-                          indexOne = Number(indexOne + res[i].skuSpecList[z].bomSpecList.length);
+watch(
+  () => props.activeName,
+  (val) => {
+    if (val === "order" && !(tableData.value && tableData.value.length > 0)) {
+      if (props.rowData && props.rowData.idGroupConcat) {
+        loading.value = true;
+        proxy.post("/statementOfAccountMerge/getDocumentByOrder", { idGroupConcat: props.rowData.idGroupConcat }).then(
+          (res) => {
+            let total = getAggregate(proxy.deepClone(res));
+            let list = [];
+            if (res && res.length > 0) {
+              for (let i = 0; i < res.length; i++) {
+                if (res[i].skuSpecList && res[i].skuSpecList.length > 0) {
+                  for (let j = 0; j < res[i].skuSpecList.length; j++) {
+                    if (res[i].skuSpecList[j].bomSpecList && res[i].skuSpecList[j].bomSpecList.length > 0) {
+                      for (let y = 0; y < res[i].skuSpecList[j].bomSpecList.length; y++) {
+                        let indexOne = 0;
+                        if (j === 0 && y === 0) {
+                          for (let z = 0; z < res[i].skuSpecList.length; z++) {
+                            if (res[i].skuSpecList[z].bomSpecList && res[i].skuSpecList[z].bomSpecList.length > 0) {
+                              indexOne = Number(indexOne + res[i].skuSpecList[z].bomSpecList.length);
+                            }
+                          }
                         }
+                        let indexTwo = 0;
+                        if (y === 0) {
+                          indexTwo = res[i].skuSpecList[j].bomSpecList.length;
+                        }
+                        list.push({
+                          wlnCreateTime: res[i].wlnCreateTime,
+                          code: res[i].code,
+                          wlnCode: res[i].wlnCode,
+                          skuSpecCode: res[i].skuSpecList[j].skuSpecCode,
+                          skuSpecName: res[i].skuSpecList[j].skuSpecName,
+                          quantitySKU: res[i].skuSpecList[j].quantity,
+                          subtotal: res[i].skuSpecList[j].subtotal,
+                          bomSpecCode: res[i].skuSpecList[j].bomSpecList[y].bomSpecCode,
+                          bomSpecName: res[i].skuSpecList[j].bomSpecList[y].bomSpecName,
+                          quantityBOM: res[i].skuSpecList[j].bomSpecList[y].quantity,
+                          unitPriceBOM: res[i].skuSpecList[j].bomSpecList[y].unitPrice,
+                          laserLogoSummary: res[i].skuSpecList[j].bomSpecList[y].laserLogoSummary,
+                          laserMitochondrialSummary: res[i].skuSpecList[j].bomSpecList[y].laserMitochondrialSummary,
+                          lssueFeeSummary: res[i].skuSpecList[j].bomSpecList[y].lssueFeeSummary,
+                          deliveryMaterialsFeeSummary: res[i].skuSpecList[j].bomSpecList[y].deliveryMaterialsFeeSummary,
+                          packingLaborSummary: res[i].skuSpecList[j].bomSpecList[y].packingLaborSummary,
+                          managementFeeSummary: res[i].skuSpecList[j].bomSpecList[y].managementFeeSummary,
+                          unitPriceSKU: res[i].skuSpecList[j].unitPrice,
+                          outerBoxPackingFee: res[i].outerBoxPackingFee,
+                          total: res[i].total,
+                          indexOne: indexOne,
+                          indexTwo: indexTwo,
+                        });
                       }
                     }
-                    let indexTwo = 0;
-                    if (y === 0) {
-                      indexTwo = res[i].skuSpecList[j].bomSpecList.length;
-                    }
-                    list.push({
-                      wlnCreateTime: res[i].wlnCreateTime,
-                      code: res[i].code,
-                      wlnCode: res[i].wlnCode,
-                      skuSpecCode: res[i].skuSpecList[j].skuSpecCode,
-                      skuSpecName: res[i].skuSpecList[j].skuSpecName,
-                      quantitySKU: res[i].skuSpecList[j].quantity,
-                      subtotal: res[i].skuSpecList[j].subtotal,
-                      bomSpecCode: res[i].skuSpecList[j].bomSpecList[y].bomSpecCode,
-                      bomSpecName: res[i].skuSpecList[j].bomSpecList[y].bomSpecName,
-                      quantityBOM: res[i].skuSpecList[j].bomSpecList[y].quantity,
-                      unitPriceBOM: res[i].skuSpecList[j].bomSpecList[y].unitPrice,
-                      laserLogoSummary: res[i].skuSpecList[j].bomSpecList[y].laserLogoSummary,
-                      laserMitochondrialSummary: res[i].skuSpecList[j].bomSpecList[y].laserMitochondrialSummary,
-                      lssueFeeSummary: res[i].skuSpecList[j].bomSpecList[y].lssueFeeSummary,
-                      deliveryMaterialsFeeSummary: res[i].skuSpecList[j].bomSpecList[y].deliveryMaterialsFeeSummary,
-                      packingLaborSummary: res[i].skuSpecList[j].bomSpecList[y].packingLaborSummary,
-                      managementFeeSummary: res[i].skuSpecList[j].bomSpecList[y].managementFeeSummary,
-                      unitPriceSKU: res[i].skuSpecList[j].unitPrice,
-                      outerBoxPackingFee: res[i].outerBoxPackingFee,
-                      total: res[i].total,
-                      indexOne: indexOne,
-                      indexTwo: indexTwo,
-                    });
                   }
                 }
               }
             }
+            list.push({
+              indexOne: 1,
+              indexTwo: 1,
+              total: total,
+              wlnCreateTime: "总计:",
+            });
+            tableData.value = Object.freeze(list);
+            loading.value = false;
+          },
+          (err) => {
+            console.log(err);
+            loading.value = false;
           }
-        }
-        list.push({
-          indexOne: 1,
-          indexTwo: 1,
-          total: total,
-          wlnCreateTime: "总计:",
-        });
-        tableData.value = Object.freeze(list);
-        loading.value = false;
-      },
-      (err) => {
-        console.log(err);
-        loading.value = false;
+        );
       }
-    );
+    }
+  },
+  {
+    deep: true,
+    immediate: true,
   }
-});
+);
 const emit = defineEmits(["clickCancel"]);
 const clickCancel = () => {
   emit("clickCancel", "");

+ 23 - 13
src/views/group/finance/summary/printSKU.vue

@@ -35,24 +35,34 @@
 const { proxy } = getCurrentInstance();
 const props = defineProps({
   rowData: Object,
+  activeName: String,
 });
 const loading = ref(false);
 const tableData = ref([]);
-onMounted(() => {
-  if (props.rowData && props.rowData.idGroupConcat) {
-    loading.value = true;
-    proxy.post("/statementOfAccountMerge/getDocumentBySku", { idGroupConcat: props.rowData.idGroupConcat }).then(
-      (res) => {
-        tableData.value = Object.freeze(res);
-        loading.value = false;
-      },
-      (err) => {
-        console.log(err);
-        loading.value = false;
+watch(
+  () => props.activeName,
+  (val) => {
+    if (val === "sku" && !(tableData.value && tableData.value.length > 0)) {
+      if (props.rowData && props.rowData.idGroupConcat) {
+        loading.value = true;
+        proxy.post("/statementOfAccountMerge/getDocumentBySku", { idGroupConcat: props.rowData.idGroupConcat }).then(
+          (res) => {
+            tableData.value = Object.freeze(res);
+            loading.value = false;
+          },
+          (err) => {
+            console.log(err);
+            loading.value = false;
+          }
+        );
       }
-    );
+    }
+  },
+  {
+    deep: true,
+    immediate: true,
   }
-});
+);
 const labelList = ref({
   2: "quantity",
   5: "total",

+ 3 - 3
src/views/subsidiary/finance/check-bill/index.vue

@@ -46,13 +46,13 @@
     <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="94%">
       <el-tabs v-model="activeName" class="demo-tabs">
         <el-tab-pane label="SKU对账单" name="sku">
-          <PrintSKU :rowData="rowData" v-if="activeName === 'sku'" @clickCancel="openPrint = false"></PrintSKU>
+          <PrintSKU :rowData="rowData" :activeName="activeName" @clickCancel="openPrint = false"></PrintSKU>
         </el-tab-pane>
         <el-tab-pane label="BOM对账单" name="bom">
-          <PrintBOM :rowData="rowData" v-if="activeName === 'bom'" @clickCancel="openPrint = false"></PrintBOM>
+          <PrintBOM :rowData="rowData" :activeName="activeName" @clickCancel="openPrint = false"></PrintBOM>
         </el-tab-pane>
         <el-tab-pane label="订单对账单" name="order">
-          <PrintOrder :rowData="rowData" v-if="activeName === 'order'" @clickCancel="openPrint = false"></PrintOrder>
+          <PrintOrder :rowData="rowData" :activeName="activeName" @clickCancel="openPrint = false"></PrintOrder>
         </el-tab-pane>
       </el-tabs>
     </el-dialog>

+ 3 - 3
src/views/subsidiary/finance/summary/index.vue

@@ -17,13 +17,13 @@
     <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="94%">
       <el-tabs v-model="activeName" class="demo-tabs">
         <el-tab-pane label="SKU对账单" name="sku">
-          <PrintSKU :rowData="rowData" v-if="activeName === 'sku'" @clickCancel="openPrint = false"></PrintSKU>
+          <PrintSKU :rowData="rowData" :activeName="activeName" @clickCancel="openPrint = false"></PrintSKU>
         </el-tab-pane>
         <el-tab-pane label="BOM对账单" name="bom">
-          <PrintBOM :rowData="rowData" v-if="activeName === 'bom'" @clickCancel="openPrint = false"></PrintBOM>
+          <PrintBOM :rowData="rowData" :activeName="activeName" @clickCancel="openPrint = false"></PrintBOM>
         </el-tab-pane>
         <el-tab-pane label="订单对账单" name="order">
-          <PrintOrder :rowData="rowData" v-if="activeName === 'order'" @clickCancel="openPrint = false"></PrintOrder>
+          <PrintOrder :rowData="rowData" :activeName="activeName" @clickCancel="openPrint = false"></PrintOrder>
         </el-tab-pane>
       </el-tabs>
     </el-dialog>