Browse Source

部分页面excel导出

cz 1 year ago
parent
commit
7f6832fae6

+ 24 - 8
src/assets/styles/index.scss

@@ -12,7 +12,7 @@ body {
   -moz-osx-font-smoothing: grayscale;
   -webkit-font-smoothing: antialiased;
   text-rendering: optimizeLegibility;
-  font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
+  font-family: Helvetica, Microsoft YaHei, Helvetica Neue, PingFang SC, Hiragino Sans GB, Arial, sans-serif;
 }
 
 label {
@@ -261,28 +261,44 @@ aside {
 
 
 
+// ::-webkit-scrollbar {
+//   /* 垂直滚动条宽度 */
+//   width: 8px !important;
+//   /* 水平滚动条高度 */
+//   height: 8px !important;
+// }
+
 ::-webkit-scrollbar {
-  /* 垂直滚动条宽度 */
-  width: 8px !important;
-  /* 水平滚动条高度 */
-  height: 8px !important;
+  width: 0px !important;
+  height: 0px !important;
+
+}
+
+:hover {
+  &::-webkit-scrollbar {
+    width: 7px !important;
+    height: 7px !important;
+  }
 }
 
 /* 轨道 */
 ::-webkit-scrollbar-track {
   border-radius: 10px !important;
-  background: #ebe9e9;
+  background: #fff;
 }
 
 /* 滑块 */
 ::-webkit-scrollbar-thumb {
   border-radius: 10px !important;
-  background-color: rgb(206, 206, 206) !important;
+  background-color: rgb(224, 222, 222) !important;
+  opacity: 0.8;
 }
 
 /* 鼠标悬停在滑块上的样式 */
 ::-webkit-scrollbar-thumb:hover {
   border-radius: 10px !important;
-  background-color: rgb(192, 192, 192) !important;
+  background-color: rgb(206, 204, 204) !important;
+  cursor: pointer;
+  opacity: 0.8;
   /* 悬停时的滑块背景色 */
 }

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

@@ -1,5 +1,5 @@
 <template>
-  <div class="header-actions" v-if="getActionList.length != 0 &&getActionList.length>2">
+  <div class="header-actions" v-if="getActionList.length != 0 &&getActionList.length>3">
     <div class="overflow-box">
       <el-button v-for="(item, index) in getActionList" :key="index" :type="item.type || 'primary'" :plain="item.plain || false"
                  v-bind="getHeaderActions(item)" @click="item.action" :disabled="item.disabled || false">
@@ -49,7 +49,7 @@
     </header>
     <div class="by-search" v-if="!hideSearch">
       <div style="display: flex">
-        <div v-if="getActionList.length != 0 &&getActionList.length <=2" style="margin-right:10px">
+        <div v-if="getActionList.length != 0 &&getActionList.length <=3" style="margin-right:10px">
           <el-button v-for="(item, index) in getActionList" :key="index" :type="item.type || 'primary'" :plain="item.plain || false"
                      v-bind="getHeaderActions(item)" @click="item.action" :disabled="item.disabled || false">
             {{ item.text }}

+ 8 - 2
src/components/headerBar/header-bar.vue

@@ -994,8 +994,14 @@ const showSearchStyle = (name) => {
     overflow: auto;
     box-shadow: 2px 0px 0px #eee;
     &::-webkit-scrollbar {
-      width: 5px !important;
-      height: 5px !important;
+      width: 0px !important;
+      height: 0px !important;
+    }
+    &:hover {
+      &::-webkit-scrollbar {
+        width: 5px !important;
+        height: 5px !important;
+      }
     }
     .layout-box {
       // 瀑布流布局 分四列

+ 4 - 4
src/components/headerBar/header.scss

@@ -143,10 +143,10 @@
 			overflow: auto;
 			box-shadow: 2px 0px 0px #eee;
 
-			&::-webkit-scrollbar {
-				width: 2px !important;
-				height: 2px !important;
-			}
+			// &::-webkit-scrollbar {
+			// 	width: 2px !important;
+			// 	height: 2px !important;
+			// }
 
 			.btn-warp {
 				margin: 40px 0 20px;

+ 2 - 1
src/components/process/SF/UseSeal.vue

@@ -177,7 +177,8 @@ const formConfig = computed(() => {
       slotName: "btn",
       label: "",
       itemWidth: 50,
-      isShow: formData.data.useMethod == "2",
+      isShow:
+        formData.data.useMethod == "2" && formData.data.isContract == "10",
     },
     {
       type: "date",

+ 14 - 0
src/views/EHSD/productLibrary/companyProduct/index.vue

@@ -8,6 +8,11 @@
     <div class="content">
       <byTable :source="sourceList.data" :tableHeight="tableHeight" :pagination="sourceList.pagination" :config="config" :loading="loading"
                highlight-current-row :selectConfig="selectConfig" :action-list="[
+                 {
+                text: '导出产品BOM Excel',
+                action: () => exportBomExcel(),
+                disabled: false,
+              },
                {
                 text: '导出Excel',
                 action: () => exportExcel(),
@@ -1682,6 +1687,15 @@ const exportExcel = () => {
     });
 };
 
+const exportBomExcel = () => {
+  proxy.msgTip("正在导出,请稍后", 2);
+  proxy
+    .postTwo("/productBomInfo/exportExcel", sourceList.value.pagination)
+    .then((res) => {
+      proxy.downloadFile(res, "产品BOM.xlsx");
+    });
+};
+
 const handleBeforeUploadOne = async (file, index) => {
   const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
   file.id = res.id;

+ 7 - 7
src/views/EHSD/productLibrary/waitCreateProduct/index.vue

@@ -514,13 +514,13 @@ const config = computed(() => {
     //     width: 120,
     //   },
     // },
-    {
-      attrs: {
-        label: "原材料",
-        prop: "rawMaterialName",
-        // "min-width": 300,
-      },
-    },
+    // {
+    //   attrs: {
+    //     label: "原材料",
+    //     prop: "rawMaterialName",
+    //     // "min-width": 300,
+    //   },
+    // },
     {
       attrs: {
         label: "颜色",

+ 0 - 1
src/views/EHSD/saleContract/contractEHSD/index.vue

@@ -1993,7 +1993,6 @@ const tableDom = ref(null);
 onMounted(() => {
   $bus.on("refreshTableData", () => {
     getList();
-    tableDom.value.hocElTable.value.doLayout();
   });
 });
 

+ 4 - 3
src/views/EHSD/saleContract/priceSheetEHSD/index.vue

@@ -2977,9 +2977,10 @@ const changeMinPrice = () => {
 
 const isDetailData = ref(false);
 const getConfirmDtl = (row, flag) => {
-  if (!proxy.useUserStore().roles.includes("GM")) {
-    return proxy.msgTip("您的身份不对,无法进行确认", 2);
-  }
+  console.log(proxy.useUserStore().roles, "adws");
+  // if (!proxy.useUserStore().roles.includes("GM")) {
+  //   return proxy.msgTip("您的身份不对,无法进行确认", 2);
+  // }
   isDetailData.value = flag;
   formOptionTwo.disabled = flag;
   modalType.value = "edit";

+ 14 - 0
src/views/customer/file/index.vue

@@ -92,6 +92,11 @@
       <div style="width:calc(100% - 250px);height:100%;overflow:auto">
         <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :statConfig="[]"
                  :selectConfig="selectConfig" highlight-current-row :action-list="[
+                  isSelect?{}:{
+                text: '导出Excel',
+                action: () => exportExcel(),
+                disabled: false,
+              },
           isSelect?{}:{
             text: '添加客户',
             action: () => openModal(),
@@ -1332,6 +1337,15 @@ const refreshList = () => {
 const handleSelectCustomer = (row) => {
   proxy.$emit("selectCustomer", row);
 };
+
+const exportExcel = () => {
+  proxy.msgTip("正在导出,请稍后", 2);
+  proxy
+    .postTwo("/customer/exportExcel", sourceList.value.pagination)
+    .then((res) => {
+      proxy.downloadFile(res, "客户.xlsx");
+    });
+};
 </script>
 
 <style lang="scss" scoped>

+ 14 - 0
src/views/customer/highseas/index.vue

@@ -92,6 +92,11 @@
       <div style="width:calc(100% - 250px);height:100%;overflow:auto">
         <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :statConfig="[]"
                  :selectConfig="selectConfig" highlight-current-row :action-list="[
+                 {
+                text: '导出Excel',
+                action: () => exportExcel(),
+                disabled: false,
+              },
           {
             text: '添加客户',
             action: () => openModal(),
@@ -1329,6 +1334,15 @@ const refreshList = () => {
   dialogVisible.value = false;
   getList();
 };
+
+const exportExcel = () => {
+  proxy.msgTip("正在导出,请稍后", 2);
+  proxy
+    .postTwo("/customer/exportExcel", sourceList.value.pagination)
+    .then((res) => {
+      proxy.downloadFile(res, "公海客户.xlsx");
+    });
+};
 </script>
 
 <style lang="scss" scoped>

+ 20 - 3
src/views/customer/privatesea/index.vue

@@ -91,6 +91,11 @@
       <div style="width:calc(100% - 250px);height:100%;overflow:auto">
         <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :statConfig="[]"
                  :selectConfig="selectConfig" highlight-current-row :action-list="[
+                    {
+                text: '导出Excel',
+                action: () => exportExcel(),
+                disabled: false,
+              },
           {
             text: '添加客户',
             action: () => openModal(),
@@ -385,7 +390,7 @@ const sourceList = ref({
     pageNum: 1,
     pageSize: 10,
     keyword: route.query.name || "",
-    type: "",
+    type: 1,
     source: "",
     status: "",
     name: "",
@@ -1138,7 +1143,7 @@ const handleSearch = (value, att) => {
     pageNum: 1,
     pageSize: 10,
     keyword: "",
-    type: "",
+    type: 1,
     source: "",
     status: "",
     name: "",
@@ -1162,7 +1167,7 @@ const handleSearchOne = (type, att = "follow") => {
     pageNum: 1,
     pageSize: 10,
     keyword: "",
-    type: "",
+    type: 1,
     source: "",
     status: "",
     name: "",
@@ -1386,6 +1391,18 @@ const submitAllocation = () => {
     });
   });
 };
+
+const exportExcel = () => {
+  proxy.msgTip("正在导出,请稍后", 2);
+  proxy
+    .postTwo("/customer/exportExcel", {
+      ...sourceList.value.pagination,
+      userId: proxy.useUserStore().user.userId,
+    })
+    .then((res) => {
+      proxy.downloadFile(res, "私海客户.xlsx");
+    });
+};
 </script>
 
 <style lang="scss" scoped>

+ 1 - 1
src/views/oa/application/invoicingApplication/index.vue

@@ -190,7 +190,7 @@ const config = computed(() => {
       attrs: {
         label: "下单渠道",
         prop: "orderingChannels",
-        width: 110,
+        width: 130,
       },
       render(val) {
         return proxy.dictKeyValue(val, internalOrderChannels.value);

+ 15 - 7
src/views/purchaseSales/outAndInWarehouse/inventoryInquiry/index.vue

@@ -8,13 +8,14 @@
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
                highlight-current-row :action-list="[
-        ]" @get-list="getList">
-        <!-- selectStatus
+                   selectStatus
             ? {}
             : {
                 text: '导出Excel',
-                action: () => deriveExcel(),
-              }, -->
+                action: () => exportExcel(),
+              },
+        ]" @get-list="getList">
+
         <template #pic="{ item }">
           <div v-if="item.fileList&&item.fileList.length > 0">
             <img :src="item.fileList[0].fileUrl" class="pic" @click="handleClickFile(item.fileList[0])" />
@@ -376,9 +377,7 @@ const checkTheFlow = (item) => {
     },
   });
 };
-const deriveExcel = () => {
-  console.log("deriveExcel");
-};
+
 // const clickSelect = (item) => {
 //   proxy.$emit("select", item);
 // };
@@ -422,6 +421,15 @@ const handleSubmit = () => {
   proxy.$emit("select", goodList.value);
   goodList.value = [];
 };
+
+const exportExcel = () => {
+  proxy.msgTip("正在导出,请稍后", 2);
+  proxy
+    .postTwo("/stock/exportExcel", sourceList.value.pagination)
+    .then((res) => {
+      proxy.downloadFile(res, "库存.xlsx");
+    });
+};
 </script>
 
 <style lang="scss" scoped>

+ 8 - 1
src/views/systemTenant/tenant/userTenant/index.vue

@@ -42,7 +42,7 @@
         <template #deptId>
           <div style="width: 100%">
             <el-tree-select v-model="formData.data.deptId" :data="deptList" check-strictly :render-after-expand="false" node-key="deptId"
-                            :props="defaultProps" style="width:100%" :disabled="modalType=='edit'" @change="handleDeptIdChange" />
+                            :props="defaultProps" style="width:100%" @change="handleDeptIdChange" />
           </div>
         </template>
         <template #account>
@@ -463,6 +463,7 @@ const getUserList = () => {
           ...item,
           id: item.roleId,
           label: item.roleName,
+          disabled: false,
         };
       });
     });
@@ -528,6 +529,7 @@ const getUserList = () => {
 };
 getUserList();
 const openModal = () => {
+  roleData.value[0].disabled = false;
   modalType.value = "add";
   formData.data = {
     userType: 1,
@@ -651,6 +653,11 @@ const submitForm = () => {
 };
 
 const getDtl = (row) => {
+  if (row.userId == "1") {
+    roleData.value[0].disabled = true;
+  } else {
+    roleData.value[0].disabled = false;
+  }
   companyData.value = companyData.value.map((x) => ({
     ...x,
     disabled: row.companyId == x.value,