YY 2 years ago
parent
commit
c38dd8f042

+ 7 - 34
src/components/orderParts/parts/detail-2.vue

@@ -138,38 +138,16 @@ export default {
         // 单元格内容
         titleCell.value = '发货清单';
         worksheet.columns.forEach(function (column, i) {
-          column.font = {
-            size: 14,
-          };
+          column.font = { size: 14 };
           column.width = 38;
-          column.alignment = {
-            wrapText: true,
-            vertical: 'middle',
-            horizontal: 'left',
-          };
-          column.border = {
-            top: { style: 'thin' },
-            left: { style: 'thin' },
-            bottom: { style: 'thin' },
-            right: { style: 'thin' },
-          };
+          column.alignment = { wrapText: true, vertical: 'middle', horizontal: 'left' };
+          column.border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } };
         });
         // 单元格内容样式
         titleCell.style = {
-          alignment: {
-            vertical: 'middle',
-            horizontal: 'center',
-          },
-          font: {
-            size: 20,
-            bold: true,
-          },
-          border: {
-            top: { style: 'thin' },
-            left: { style: 'thin' },
-            bottom: { style: 'thin' },
-            right: { style: 'thin' },
-          },
+          alignment: { vertical: 'middle', horizontal: 'center' },
+          font: { size: 20, bold: true },
+          border: { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } },
         };
         // 设置标题-end
         let data = [
@@ -189,12 +167,7 @@ export default {
         }
       }
       workbook.xlsx.writeBuffer().then((buffer) => {
-        FileSaver.saveAs(
-          new Blob([buffer], {
-            type: 'application/octet-stream',
-          }),
-          `发货清单.xlsx`
-        );
+        FileSaver.saveAs(new Blob([buffer], { type: 'application/octet-stream' }), `发货清单.xlsx`);
       });
     },
     // 返回

+ 2 - 9
src/views/platfinance/bill/index.vue

@@ -144,12 +144,7 @@ export default {
         column.width = 20;
       });
       workbook.xlsx.writeBuffer().then((buffer) => {
-        FileSaver.saveAs(
-          new Blob([buffer], {
-            type: 'application/octet-stream',
-          }),
-          `对账单.xlsx`
-        );
+        FileSaver.saveAs(new Blob([buffer], { type: 'application/octet-stream' }), `对账单.xlsx`);
       });
       // this.$confirm('是否确认对账?', '提示', {
       //   confirmButtonText: '确定',
@@ -166,9 +161,7 @@ export default {
       //   }
       //   let res;
       //   res = await this.outCreate({ order, afterSale });
-      //   if (this.$checkRes(res)) {
-      //     this.$message({ type: `success`, message: `对账成功` });
-      //   }
+      //   if (this.$checkRes(res)) this.$message({ type: `success`, message: `对账成功` });
       // });
     },
     // 查询其他信息

+ 7 - 34
src/views/zr/zrOrder/parts/detail-2.vue

@@ -123,38 +123,16 @@ export default {
         // 单元格内容
         titleCell.value = '发货清单';
         worksheet.columns.forEach(function (column, i) {
-          column.font = {
-            size: 14,
-          };
+          column.font = { size: 14 };
           column.width = 38;
-          column.alignment = {
-            wrapText: true,
-            vertical: 'middle',
-            horizontal: 'left',
-          };
-          column.border = {
-            top: { style: 'thin' },
-            left: { style: 'thin' },
-            bottom: { style: 'thin' },
-            right: { style: 'thin' },
-          };
+          column.alignment = { wrapText: true, vertical: 'middle', horizontal: 'left' };
+          column.border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } };
         });
         // 单元格内容样式
         titleCell.style = {
-          alignment: {
-            vertical: 'middle',
-            horizontal: 'center',
-          },
-          font: {
-            size: 20,
-            bold: true,
-          },
-          border: {
-            top: { style: 'thin' },
-            left: { style: 'thin' },
-            bottom: { style: 'thin' },
-            right: { style: 'thin' },
-          },
+          alignment: { vertical: 'middle', horizontal: 'center' },
+          font: { size: 20, bold: true },
+          border: { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } },
         };
         // 设置标题-end
         let data = [
@@ -174,12 +152,7 @@ export default {
         }
       }
       workbook.xlsx.writeBuffer().then((buffer) => {
-        FileSaver.saveAs(
-          new Blob([buffer], {
-            type: 'application/octet-stream',
-          }),
-          `发货清单.xlsx`
-        );
+        FileSaver.saveAs(new Blob([buffer], { type: 'application/octet-stream' }), `发货清单.xlsx`);
       });
     },
     // 返回