Prechádzať zdrojové kódy

Merge branch '对账单-导出货物交接单'

lxf 1 rok pred
rodič
commit
046d794012

+ 2 - 1
src/components/byTable/index.vue

@@ -146,7 +146,8 @@
                     handleNativeClick(getAttrsValue(item), $event, item);
                   }
                 "
-                :key="scope.row.id" />
+                :key="scope.row.id"
+                :btnNum="item.attrs.btnNum"/>
             </div>
             <div v-else>
               {{ getValue(scope, item) }}

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

@@ -205,6 +205,7 @@ const config = computed(() => {
       attrs: {
         label: "对账单号",
         prop: "code",
+        'min-width': 200,
       },
     },
     {
@@ -218,6 +219,7 @@ const config = computed(() => {
       attrs: {
         label: "客户",
         prop: "departmentName",
+        width:200
       },
     },
     {
@@ -262,9 +264,10 @@ const config = computed(() => {
     {
       attrs: {
         label: "操作",
-        width: 180,
+        width: 300,
         align: "center",
         fixed: "right",
+        btnNum: 6,
       },
       renderHTML(row) {
         return [
@@ -281,6 +284,17 @@ const config = computed(() => {
           },
           {
             attrs: {
+              label: "导出",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              deriveExcel(row);
+            },
+          },
+          {
+            attrs: {
               label: "打印",
               type: "primary",
               text: true,
@@ -701,6 +715,19 @@ const clickManualSynchronization = () => {
     }
   );
 };
+const deriveExcel = (row) => {
+  ElMessageBox.confirm("你是否确认此操作", "提示", {
+    confirmButtonText: "确定",
+    cancelButtonText: "取消",
+    type: "warning",
+  })
+    .then(() => {
+      proxy.postFile("/statementOfAccountMerge/exportDeliveryOfGoodsExcel", [row.id]).then((res) => {
+        proxy.downloadFile(res, "货物交接单-" + row.code + ".xlsx");
+      });
+    })
+    .catch(() => {});
+};
 </script>
 
 <style lang="scss" scoped>