Quellcode durchsuchen

订单导出完毕

1
mo vor 3 Jahren
Ursprung
Commit
5595571d5c

+ 9 - 2
src/components/Export-chiose/index.vue

@@ -121,9 +121,16 @@ export default {
             url: "/api-web/export/managerDownload",
             fileName: this.fileName,
             method: "post",
-            params: qs.stringify(this.exportData),
+            params: {
+              queryInfo: this.exportData,
+              exportEnum: this.ExportEnum,
+              headColumns: this.checked,
+            },
           },
-          this.message
+          this.message,
+          () => {
+            this.chioseVisiable = false;
+          }
         );
       } else {
         Export(

+ 70 - 68
src/utils/downLoadFile.js

@@ -16,75 +16,77 @@ import cleanDeep from 'clean-deep'
  *      fileName: xxx.xls
  * }
  */
-export const Export = (that, params, message,func) => {
-    // 报表导出
-    let url = params.url
-    const options = {
-        method: params.method ? params.method : 'get',
-        headers: {
-            Authorization: getToken(),
-            tenantId: getTenantId()
-        },
-        // params: params.params,
-        url,
-        responseType: "blob"
-    };
-    if(options.method == 'post') {
-        options.data =params.params
-    } else {
-        options.params = params.params
-    }
-    that.$confirm((message || "您确定下载模板"), "提示", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning"
-        })
-        .then(() => {
-            load.startLoading()
-            axios(cleanDeep(options)).then(res => {
-                let blob = new Blob([res.data], {
-                // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
-                type: "application/vnd.ms-excel;charset=utf-8"
-                //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
-                });
-                let text = (new Response(blob)).text()
-                text.then(res => {
-                // 判断是否报错
-                if (res.indexOf('code') != -1) {
-                    let json = JSON.parse(res)
-                    if(json.code == 403) {
-                        that.$message.error(`登录过期,请重新登录!`)
-                        setTimeout(() => {
-                            that.$store.dispatch('user/resetToken').then(() => {
-                                location.reload()
-                              })
-                        }, 1000);
-                        return
-                    }
-                    that.$message.error(json.msg)
-                } else {
-                    let objectUrl = URL.createObjectURL(blob);
-                    let link = document.createElement("a");
-                    let fname = params.fileName || "导出文件.xls"; //下载文件的名字
-                    link.href = objectUrl;
-                    link.setAttribute("download", fname);
-                    document.body.appendChild(link);
-                    link.click();
-                    if(func){
-                      func()
-                    }
-
-                }
+export const Export = (that, params, message, func) => {
+  // 报表导出
+  let url = params.url
+  const options = {
+    method: params.method ? params.method : 'get',
+    headers: {
+      Authorization: getToken(),
+      tenantId: getTenantId()
+    },
+    // params: params.params,
+    url,
+    responseType: "blob"
+  };
+  if (options.method == 'post') {
+    options.data = params.params
+  } else {
+    options.params = params.params
+  }
+  that.$confirm((message || "您确定下载模板"), "提示", {
+      confirmButtonText: "确定",
+      cancelButtonText: "取消",
+      type: "warning"
+    })
+    .then(() => {
+      load.startLoading()
+      axios(cleanDeep(options)).then(res => {
+        let blob = new Blob([res.data], {
+          // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
+          type: "application/vnd.ms-excel;charset=utf-8"
+          //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
+        });
+        let text = (new Response(blob)).text()
+        text.then(res => {
+          // 判断是否报错
+          if (res.indexOf('code') != -1) {
+            let json = JSON.parse(res)
+            if (json.code == 403) {
+              that.$message.error(`登录过期,请重新登录!`)
+              setTimeout(() => {
+                that.$store.dispatch('user/resetToken').then(() => {
+                  location.reload()
                 })
+              }, 1000);
+              return
+            }
+            if (func) {
+              func()
+            }
+            that.$message.error(json.msg)
+          } else {
+            let objectUrl = URL.createObjectURL(blob);
+            let link = document.createElement("a");
+            let fname = params.fileName || "导出文件.xls"; //下载文件的名字
+            link.href = objectUrl;
+            link.setAttribute("download", fname);
+            document.body.appendChild(link);
+            link.click();
 
-                load.endLoading();
-            }).catch(error => {
-                console.log(error)
-                that.$message.error('下载失败,请联系管理员');
-                load.endLoading();
-            });
-        })
-        .catch(() => {});
-}
+            if (func) {
+              func()
+            }
 
+          }
+        })
 
+        load.endLoading();
+      }).catch(error => {
+        console.log(error)
+        that.$message.error('下载失败,请联系管理员');
+        load.endLoading();
+      });
+    })
+    .catch(() => {});
+}

+ 228 - 158
src/views/businessManager/orderManager/financeManager-taoqi.vue

@@ -14,37 +14,65 @@
           }
         "
         type="primary"
-        style="margin-bottom:20px"
+        style="margin-bottom: 20px"
       >
         添加订单
       </el-button>
-      <el-button
+      <!-- <el-button
         @click="onOrderExport"
-        v-permission="'export/routeOrderList/taoqi'"
+        v-permission="{
+          child: 'export/routeOrderList',
+          parent: '/financeManager',
+        }"
         type="primary"
         style="margin-bottom:20px"
       >
         报表导出
-      </el-button>
-      <el-button
-        v-permission="'adapay/exportBill/taoqi'"
+      </el-button> -->
+      <ExportChiose
+        v-permission="{
+          child: 'export/routeOrderList',
+          parent: '/financeManager',
+        }"
+        style="margin-bottom: 20px; display: inline-block"
+        name="报表导出"
+        ExportEnum="ROUTE_ORDER_LIST1"
+        :exportData="onOrderExport"
+        fileName="财务列表"
+        errorMsg="请选择开始日期和结束日期"
+        :isDownList="true"
+      />
+      <!-- <el-button
+        v-permission="{ child: 'adapay/exportBill', parent: '/financeManager' }"
         @click="onAdaPayExport"
         type="primary"
-        style="margin-bottom:20px"
+        style="margin-bottom: 20px"
       >
         汇付订单导出
-      </el-button>
+      </el-button> -->
+      <ExportChiose
+        v-permission="{ child: 'adapay/exportBill', parent: '/financeManager' }"
+        style="margin-bottom: 20px; display: inline-block"
+        name="汇付订单导出"
+        ExportEnum="EXPORT_BILL"
+        :exportData="onAdaPayExport"
+        fileName="汇付订单"
+        errorMsg="请选择开始日期和结束日期"
+        :flag="
+          !(this.searchForm.orderDate && this.searchForm.orderDate.length > 0)
+        "
+      />
       <el-button
         @click="onDownload"
         v-permission="'import/downloadTemplate?financeManager/taoqi'"
         type="primary"
-        style="margin-bottom:20px"
+        style="margin-bottom: 20px"
       >
         下载模板
       </el-button>
       <el-upload
         v-permission="'import/routeOrder/taoqi'"
-        style="display: inline-block;margin-left:10px;"
+        style="display: inline-block; margin-left: 10px"
         action="/api-web/import/routeOrder"
         :show-file-list="false"
         :before-upload="beforeUpload"
@@ -53,12 +81,7 @@
         :on-error="handleError"
         :on-success="handleSuccess"
       >
-        <el-button
-          type="primary"
-          style="margin-bottom:20px"
-        >
-          导入
-        </el-button>
+        <el-button type="primary" style="margin-bottom: 20px"> 导入 </el-button>
       </el-upload>
       <!-- 搜索类型 -->
       <save-form
@@ -408,7 +431,7 @@
               v-model.trim="form.routeOrganId"
               :disabled="!isAdd"
               @change="changeOrgin"
-               filterable
+              filterable
               style="width: 100% !important"
             >
               <el-option
@@ -705,11 +728,12 @@ import { orderStatus, dealStatus } from "@/utils/searchArray";
 import cleanDeep from "clean-deep";
 import axios from "axios";
 import qs from "qs";
-import { getToken, getTenantId} from "@/utils/auth";
+import { getToken, getTenantId } from "@/utils/auth";
 import load from "@/utils/loading";
 import { orderServerList } from "@/utils/searchArray";
 import { Export } from "@/utils/downLoadFile";
 import Tooltip from "@/components/Tooltip/index";
+import ExportChiose from "@/components/Export-chiose";
 let validAmount = (rule, value, callback) => {
   if (!value) {
     callback(new Error("请输入商品数量"));
@@ -723,7 +747,7 @@ let validAmount = (rule, value, callback) => {
 };
 let that;
 export default {
-  components: { pagination, Tooltip },
+  components: { pagination, Tooltip, ExportChiose },
   name: "incomeTwo",
   computed: {
     extraQuery() {
@@ -823,7 +847,7 @@ export default {
       },
       headers: {
         Authorization: getToken(),
-        tenantId: getTenantId()
+        tenantId: getTenantId(),
       },
       getCalenderList: [],
     };
@@ -887,10 +911,10 @@ export default {
           }
           form.goodsJson =
             form.applyType == "SERVICE" ? null : JSON.stringify(goodsJson);
-          if(this.insertOrderType == 1) {
-            form.calenderId = null
-          } else if(this.insertOrderType == 2) {
-            form.userId = null
+          if (this.insertOrderType == 1) {
+            form.calenderId = null;
+          } else if (this.insertOrderType == 2) {
+            form.userId = null;
           }
           routeOrderAdd(form).then((res) => {
             if (res.code == 200) {
@@ -922,136 +946,136 @@ export default {
       // }
       // 关闭弹窗重置验证
       this.$refs[formName].resetFields();
-      this.insertOrderType = 1
+      this.insertOrderType = 1;
     },
-    onOrderExport() {
-      // 报表导出
-      let url = "/api-web/export/routeOrderList";
-      let searchForm = this.searchForm;
-      let data = {
-        orderType: 3,
-        search: searchForm.search,
-        orderNo: searchForm.orderNo,
-        transNo: searchForm.transNo,
-        merNos: searchForm.merNos,
-        actualAmount: searchForm.actualAmount,
-        balancePaymentAmount: searchForm.balancePaymentAmount,
-        paymentStatus: searchForm.paymentStatus,
-        paymentType: searchForm.paymentType,
-        routingOrganId: this.searchForm.routingOrganId.join(','),
-        lessBalancePaymentAmount: searchForm.lessBalancePaymentAmount,
-        lessActualAmount: searchForm.lessActualAmount,
-        ...this.extraQuery,
-      };
+    // onOrderExport() {
+    //   // 报表导出
+    //   let url = "/api-web/export/routeOrderList";
+    //   let searchForm = this.searchForm;
+    //   let data = {
+    //     orderType: 3,
+    //     search: searchForm.search,
+    //     orderNo: searchForm.orderNo,
+    //     transNo: searchForm.transNo,
+    //     merNos: searchForm.merNos,
+    //     actualAmount: searchForm.actualAmount,
+    //     balancePaymentAmount: searchForm.balancePaymentAmount,
+    //     paymentStatus: searchForm.paymentStatus,
+    //     paymentType: searchForm.paymentType,
+    //     routingOrganId: this.searchForm.routingOrganId.join(","),
+    //     lessBalancePaymentAmount: searchForm.lessBalancePaymentAmount,
+    //     lessActualAmount: searchForm.lessActualAmount,
+    //     ...this.extraQuery,
+    //   };
 
-      if (this.searchForm.orderDate && this.searchForm.orderDate.length > 0) {
-        data.orderStartDate = this.searchForm.orderDate[0];
-        data.orderEndDate = this.searchForm.orderDate[1];
-      } else {
-        data.orderStartDate = null;
-        data.orderEndDate = null;
-      }
-      const options = {
-        method: "POST",
-        headers: {
-          Authorization: getToken(),
-          tenantId: getTenantId()
-        },
-        data: qs.stringify(cleanDeep(data)),
-        url,
-        responseType: "json",
-      };
-      this.$confirm("您确定导出报表", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          load.startLoading();
-          axios(options).then((res) => {
-            load.endLoading();
-            if (res.data.code == 200) {
-              this.$message.info(res.data.msg);
-            } else {
-              this.$message.error(res.data.msg);
-            }
-            // let blob = new Blob([res.data], {
-            //   // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
-            //   type: "application/vnd.ms-excel;charset=utf-8",
-            //   //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
-            // });
-            // let objectUrl = URL.createObjectURL(blob);
-            // let link = document.createElement("a");
-            // let nowTime = new Date();
-            // let ymd =
-            //   nowTime.getFullYear() +
-            //   "" +
-            //   (nowTime.getMonth() + 1) +
-            //   "" +
-            //   nowTime.getDate() +
-            //   "" +
-            //   nowTime.getHours() +
-            //   "" +
-            //   nowTime.getMinutes();
-            // let fname = "报表导出" + new Date().getTime() + ".xls"; //下载文件的名字
-            // link.href = objectUrl;
-            // link.setAttribute("download", fname);
-            // document.body.appendChild(link);
-            // link.click();
-            // load.endLoading();
-          });
-        })
-        .catch(() => {});
-    },
-    onAdaPayExport() {
-      // 报表导出
-      let url = "/api-web/adapay/exportBill";
-      let data = {
-        ...this.extraQuery,
-      };
-       data.routingOrganId= this.searchForm.routingOrganId.join(',')
-      if (this.searchForm.orderDate && this.searchForm.orderDate.length > 0) {
-        data.startTime = this.searchForm.orderDate[0];
-        data.endTime = this.searchForm.orderDate[1];
-      } else {
-        this.$message.error("请选择开始日期和结束日期");
-        return;
-      }
-      const options = {
-        method: "get",
-        headers: {
-          Authorization: getToken(),
-          tenantId: getTenantId()
-        },
-        params: data,
-        url,
-        responseType: "blob",
-      };
-      this.$confirm("您确定导出汇付订单", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          load.startLoading();
-          axios(options).then((res) => {
-            let blob = new Blob([res.data], {
-              // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
-              type: "application/vnd.ms-excel;charset=utf-8",
-              //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
-            });
-            let objectUrl = URL.createObjectURL(blob);
-            let link = document.createElement("a");
-            let fname = "汇付订单" + new Date().getTime() + ".xls"; //下载文件的名字
-            link.href = objectUrl;
-            link.setAttribute("download", fname);
-            document.body.appendChild(link);
-            link.click();
-            load.endLoading();
-          });
-        })
-        .catch(() => {});
-    },
+    //   if (this.searchForm.orderDate && this.searchForm.orderDate.length > 0) {
+    //     data.orderStartDate = this.searchForm.orderDate[0];
+    //     data.orderEndDate = this.searchForm.orderDate[1];
+    //   } else {
+    //     data.orderStartDate = null;
+    //     data.orderEndDate = null;
+    //   }
+    //   const options = {
+    //     method: "POST",
+    //     headers: {
+    //       Authorization: getToken(),
+    //       tenantId: getTenantId(),
+    //     },
+    //     data: qs.stringify(cleanDeep(data)),
+    //     url,
+    //     responseType: "json",
+    //   };
+    //   this.$confirm("您确定导出报表", "提示", {
+    //     confirmButtonText: "确定",
+    //     cancelButtonText: "取消",
+    //     type: "warning",
+    //   })
+    //     .then(() => {
+    //       load.startLoading();
+    //       axios(options).then((res) => {
+    //         load.endLoading();
+    //         if (res.data.code == 200) {
+    //           this.$message.info(res.data.msg);
+    //         } else {
+    //           this.$message.error(res.data.msg);
+    //         }
+    //         // let blob = new Blob([res.data], {
+    //         //   // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
+    //         //   type: "application/vnd.ms-excel;charset=utf-8",
+    //         //   //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
+    //         // });
+    //         // let objectUrl = URL.createObjectURL(blob);
+    //         // let link = document.createElement("a");
+    //         // let nowTime = new Date();
+    //         // let ymd =
+    //         //   nowTime.getFullYear() +
+    //         //   "" +
+    //         //   (nowTime.getMonth() + 1) +
+    //         //   "" +
+    //         //   nowTime.getDate() +
+    //         //   "" +
+    //         //   nowTime.getHours() +
+    //         //   "" +
+    //         //   nowTime.getMinutes();
+    //         // let fname = "报表导出" + new Date().getTime() + ".xls"; //下载文件的名字
+    //         // link.href = objectUrl;
+    //         // link.setAttribute("download", fname);
+    //         // document.body.appendChild(link);
+    //         // link.click();
+    //         // load.endLoading();
+    //       });
+    //     })
+    //     .catch(() => {});
+    // },
+    // onAdaPayExport() {
+    //   // 报表导出
+    //   let url = "/api-web/adapay/exportBill";
+    //   let data = {
+    //     ...this.extraQuery,
+    //   };
+    //    data.routingOrganId= this.searchForm.routingOrganId.join(',')
+    //   if (this.searchForm.orderDate && this.searchForm.orderDate.length > 0) {
+    //     data.startTime = this.searchForm.orderDate[0];
+    //     data.endTime = this.searchForm.orderDate[1];
+    //   } else {
+    //     this.$message.error("请选择开始日期和结束日期");
+    //     return;
+    //   }
+    //   const options = {
+    //     method: "get",
+    //     headers: {
+    //       Authorization: getToken(),
+    //       tenantId: getTenantId()
+    //     },
+    //     params: data,
+    //     url,
+    //     responseType: "blob",
+    //   };
+    //   this.$confirm("您确定导出汇付订单", "提示", {
+    //     confirmButtonText: "确定",
+    //     cancelButtonText: "取消",
+    //     type: "warning",
+    //   })
+    //     .then(() => {
+    //       load.startLoading();
+    //       axios(options).then((res) => {
+    //         let blob = new Blob([res.data], {
+    //           // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
+    //           type: "application/vnd.ms-excel;charset=utf-8",
+    //           //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
+    //         });
+    //         let objectUrl = URL.createObjectURL(blob);
+    //         let link = document.createElement("a");
+    //         let fname = "汇付订单" + new Date().getTime() + ".xls"; //下载文件的名字
+    //         link.href = objectUrl;
+    //         link.setAttribute("download", fname);
+    //         document.body.appendChild(link);
+    //         link.click();
+    //         load.endLoading();
+    //       });
+    //     })
+    //     .catch(() => {});
+    // },
     search() {
       this.pageInfo.page = 1;
       this.$refs.searchForm.save(this.searchForm);
@@ -1076,7 +1100,7 @@ export default {
       params.balancePaymentAmount = params.balancePaymentAmount
         ? params.balancePaymentAmount
         : null;
-        params.routingOrganId= this.searchForm.routingOrganId.join(',')
+      params.routingOrganId = this.searchForm.routingOrganId.join(",");
       if (this.searchForm.orderDate && this.searchForm.orderDate.length > 0) {
         params.orderStartDate = this.searchForm.orderDate[0];
         params.orderEndDate = this.searchForm.orderDate[1];
@@ -1219,12 +1243,12 @@ export default {
                   return { id: item.goodsId, number: item.num };
                 })
               );
-            if(orderInfo.userId && !res.data.calenderId) {
-              this.insertOrderType = 1
-            } else if(res.data.calenderId && !orderInfo.userId) {
-              this.insertOrderType = 2
+            if (orderInfo.userId && !res.data.calenderId) {
+              this.insertOrderType = 1;
+            } else if (res.data.calenderId && !orderInfo.userId) {
+              this.insertOrderType = 2;
             } else {
-              this.insertOrderType = 3
+              this.insertOrderType = 3;
             }
             this.routeOrderStatus = true;
           });
@@ -1353,6 +1377,52 @@ export default {
       return str;
     },
   },
+  computed: {
+    onOrderExport() {
+      // 报表导出
+      let url = "/api-web/export/routeOrderList";
+      let searchForm = this.searchForm;
+
+      let data = {
+        orderType: 3,
+        search: searchForm.search,
+        orderNo: searchForm.orderNo,
+        transNo: searchForm.transNo,
+        merNos: searchForm.merNos,
+        actualAmount: searchForm.actualAmount,
+        balancePaymentAmount: searchForm.balancePaymentAmount,
+        paymentStatus: searchForm.paymentStatus,
+        paymentType: searchForm.paymentType,
+        routingOrganId: searchForm.routingOrganId,
+        lessBalancePaymentAmount: searchForm.lessBalancePaymentAmount,
+        lessActualAmount: searchForm.lessActualAmount,
+        ...this.extraQuery,
+      };
+      data.routingOrganId = this.searchForm.routingOrganId.join(",");
+
+      if (this.searchForm.orderDate && this.searchForm.orderDate.length > 0) {
+        data.orderStartDate = this.searchForm.orderDate[0];
+        data.orderEndDate = this.searchForm.orderDate[1];
+      } else {
+        data.orderStartDate = null;
+        data.orderEndDate = null;
+      }
+      return data;
+    },
+    onAdaPayExport() {
+      // 报表导出
+      let url = "/api-web/adapay/exportBill";
+      let data = {
+        ...this.extraQuery,
+      };
+      data.routingOrganId = this.searchForm.routingOrganId.join(",");
+      if (this.searchForm.orderDate && this.searchForm.orderDate.length > 0) {
+        data.startTime = this.searchForm.orderDate[0];
+        data.endTime = this.searchForm.orderDate[1];
+      }
+      return data;
+    },
+  },
 };
 </script>
 <style lang="scss" scoped>

+ 8 - 5
src/views/businessManager/orderManager/financeManager.vue

@@ -40,6 +40,7 @@
         :exportData="onOrderExport"
         fileName="财务列表"
         errorMsg="请选择开始日期和结束日期"
+        :isDownList="true"
       />
       <!-- <el-button
         v-permission="{ child: 'adapay/exportBill', parent: '/financeManager' }"
@@ -53,11 +54,13 @@
         v-permission="{ child: 'adapay/exportBill', parent: '/financeManager' }"
         style="margin-bottom: 20px; display: inline-block"
         name="汇付订单导出"
-        ExportEnum="ROUTE_ORDER_LIST1"
-        :exportData="onOrderExport"
-        fileName="财务列表"
+        ExportEnum="EXPORT_BILL"
+        :exportData="onAdaPayExport"
+        fileName="汇付订单"
         errorMsg="请选择开始日期和结束日期"
-        :flag="!(this.searchForm.orderDate && this.searchForm.orderDate.length > 0)"
+        :flag="
+          !(this.searchForm.orderDate && this.searchForm.orderDate.length > 0)
+        "
       />
       <el-button
         @click="onDownload"
@@ -1428,7 +1431,7 @@ export default {
         data.startTime = this.searchForm.orderDate[0];
         data.endTime = this.searchForm.orderDate[1];
       }
-      return data
+      return data;
     },
   },
 };

+ 1 - 0
src/views/businessManager/orderManager/income.vue

@@ -21,6 +21,7 @@
         :exportData="onOrderExport"
         fileName="问卷调查"
         errorMsg="请选择月份"
+        :isDownList="true"
       />
       <!-- 搜索类型 -->
       <save-form

+ 5 - 1
src/views/organManager/organOperation.vue

@@ -58,7 +58,7 @@ export default {
     };
   },
   async mounted () {
-
+console.log(this.$route)
     if(this.payType !== 'create') {
       try {
         if(this.payType == 'look') {
@@ -75,6 +75,10 @@ export default {
         this.info = { ...other, theme, themeColor, corporateChops, corporateFinanceChops }
         this.productInfo.payState = this.info.payState
       } catch(e) {}
+    }else {
+      if(this.$route.query){
+        this.info = {...this.$route.query}
+      }
     }
     this.status = true
   },

+ 23 - 1
src/views/platformManager/tenantApply/api.js

@@ -5,4 +5,26 @@ export const tenantApplyList = data => request2({
   url: '/api-web/tenantApply/list',
   method: 'get',
   params: data,
-})
+})
+
+export const tenantPreJoinList = data => request2({
+  url: '/api-web/tenantPreJoin/queryPage',
+  method: 'post',
+  params: data,
+  data
+})
+
+export const getCallRecord = data => request2({
+  url: '/api-web/tenantApplyCallRecord/queryPage',
+  method: 'post',
+  params: data,
+  data
+})
+
+
+export const addCallRecord = data => request2({
+  url: '/api-web/tenantApplyCallRecord/add',
+  method: 'post',
+  params: data,
+  data
+})

+ 51 - 27
src/views/platformManager/tenantApply/component/tenandInFor.vue

@@ -11,7 +11,7 @@
     >
       <el-form-item prop="name">
         <el-input
-          v-model="searchForm.name"
+          v-model="searchForm.search"
           clearable
           placeholder="公司全称/负责人姓名"
         ></el-input>
@@ -28,6 +28,17 @@
           :picker-options="{ firstDayOfWeek: 1 }"
         ></el-date-picker>
       </el-form-item>
+      <el-form-item prop="state">
+        <el-select
+          v-model.trim="searchForm.state"
+          clearable
+          filterable
+          placeholder="创建机构"
+        >
+          <el-option label="未创建" value="0"></el-option>
+          <el-option label="已创建" value="1"></el-option>
+        </el-select>
+      </el-form-item>
       <el-form-item>
         <el-button native-type="submit" type="danger">搜索</el-button>
         <el-button native-type="reset" type="primary">重置</el-button>
@@ -39,40 +50,41 @@
         :data="tableList"
         :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
       >
-        <el-table-column align="center" label="公司全称" prop="city">
+        <el-table-column align="center" label="机构全称" prop="tsignName">
         </el-table-column>
-        <el-table-column align="center" label="公司简称" prop="name">
+        <el-table-column align="center" label="机构简称" prop="name">
         </el-table-column>
-        <el-table-column align="center" label="所在城市" prop="linkman">
+        <el-table-column align="center" label="所在城市" prop="areaName">
         </el-table-column>
-        <el-table-column align="center" label="企业负责人" prop="mobileNo">
+        <el-table-column
+          align="center"
+          label="企业负责人"
+          prop="enterpriseLiableName"
+        >
         </el-table-column>
-        <el-table-column align="center" label="项目负责人" prop="createTime">
+        <el-table-column align="center" label="项目负责人" prop="contacts">
         </el-table-column>
-        <el-table-column align="center" label="提交时间" prop="nameOfReferrer">
+        <el-table-column align="center" label="提交时间" prop="createdTime">
         </el-table-column>
-        <el-table-column align="center" label="是否创建机构" prop="productName">
+        <el-table-column align="center" label="是否创建机构" prop="state">
+          <template slot-scope="scope">
+            <div>
+              {{ scope.row.state ? "已创建" : "未创建" }}
+            </div>
+          </template>
         </el-table-column>
         <el-table-column align="center" label="操作">
           <template slot-scope="scope">
-            <el-button
-              @click="lookDetail(scope.row)"
-              v-permission="'platformServe/update'"
-              type="text"
+            <el-button @click="lookDetail(scope.row)" type="text"
               >查看
             </el-button>
             <el-button
-              @click="openService('update', scope.row)"
-              v-permission="'platformServe/update'"
+              :disabled="!!scope.row.state"
+              @click="createTenand(scope.row)"
+              v-permission="'tenantInfo/add'"
               type="text"
               >创建机构
             </el-button>
-            <el-button
-              @click="openService('update', scope.row)"
-              v-permission="'platformServe/update'"
-              type="text"
-              >协议下载
-            </el-button>
           </template>
         </el-table-column>
         <!-- <el-table-column align="center" label="学生规模">
@@ -98,7 +110,11 @@
         @pagination="getList"
       />
     </div>
-    <el-dialog title="沟通记录" :visible.sync="detailVisible" width="1000px">
+    <el-dialog
+      title="入驻机构详情"
+      :visible.sync="detailVisible"
+      width="1000px"
+    >
       <infodetail :activeRow="activeRow" />
       <span slot="footer" class="dialog-footer">
         <el-button @click="detailVisible = false">取 消</el-button>
@@ -111,17 +127,18 @@
 </template>
 <script>
 import pagination from "@/components/Pagination/index";
-import { tenantApplyList } from "../api";
+import { tenantPreJoinList } from "../api";
 import { getTimes } from "@/utils";
-import infodetail from"../modals/infodetail.vue"
+import infodetail from "../modals/infodetail.vue";
 const initSearch = {
   name: null,
   createTimer: null,
+  state:null
 };
 export default {
   components: {
     pagination,
-    infodetail
+    infodetail,
   },
   data() {
     return {
@@ -147,12 +164,13 @@ export default {
   methods: {
     async getList() {
       try {
-        const { name, createTimer } = this.searchForm;
-        const res = await tenantApplyList({
+        const { name, createTimer,state } = this.searchForm;
+        const res = await tenantPreJoinList({
           name: name,
+          state:state,
           ...getTimes(
             createTimer,
-            ["startDateTime", "endDateTime"],
+            ["startTime", "endTime"],
             "YYYY-MM-DD HH:mm:ss"
           ),
           page: this.pageInfo.page,
@@ -178,6 +196,12 @@ export default {
       this.activeRow = row;
       this.detailVisible = true;
     },
+    createTenand(row) {
+      this.$router.push({
+        path: "platformManager/organOperation?type=create&id",
+        query: { ...row },
+      });
+    },
   },
   filters: {
     formatStudentNumLevel(item) {

+ 6 - 6
src/views/platformManager/tenantApply/component/tenantApplyFor.vue

@@ -9,13 +9,13 @@
       :saveKey="'tenantApply'"
       :model.sync="searchForm"
     >
-      <!-- <el-form-item prop="name">
+      <el-form-item prop="name">
           <el-input
             v-model="searchForm.name"
             clearable
             placeholder="机构名称"
           ></el-input>
-        </el-form-item> -->
+        </el-form-item>
       <el-form-item prop="createTimer">
         <el-date-picker
           v-model.trim="searchForm.createTimer"
@@ -61,15 +61,15 @@
           prop="nameOfReferrer"
         >
         </el-table-column>
-        <el-table-column align="center" label="上次沟通时间" prop="productName">
+        <el-table-column align="center" label="上次沟通时间" prop="callBackTime">
         </el-table-column>
-        <el-table-column align="center" label="沟通人" prop="productName">
+        <el-table-column align="center" label="沟通人" prop="callBackPeople">
         </el-table-column>
         <el-table-column align="center" label="操作">
           <template slot-scope="scope">
             <el-button
               @click="openDetail(scope.row)"
-              v-permission="'platformServe/update'"
+              v-permission="'tenantApplyCallRecord/queryPage'"
               type="text"
               >沟通记录
             </el-button>
@@ -103,7 +103,7 @@
       :visible.sync="recordVisible"
       width="1000px"
     >
-      <recordDetail :activeRow="activeRow"/>
+      <recordDetail :activeRow="activeRow" v-if="recordVisible"/>
       <span slot="footer" class="dialog-footer">
         <el-button @click="recordVisible = false">取 消</el-button>
         <el-button type="primary" @click="recordVisible = false"

+ 10 - 14
src/views/platformManager/tenantApply/index.vue

@@ -10,20 +10,12 @@
         type="card"
         @tab-click="handleClick"
       >
-      <!--    v-if="permissionList.networkList" -->
-        <el-tab-pane
-          label="申请机构"
-          name="1"
-
-        >
-        <tenantApplyFor />
+        <!--    v-if="permissionList.networkList" -->
+        <el-tab-pane label="申请机构" name="1"   v-if="permission('/tenantApplyFor')">
+          <tenantApplyFor v-if="activeIndex ==1"/>
         </el-tab-pane>
-           <el-tab-pane
-          label="入驻机构"
-          name="2"
-
-        >
-        <tenandInFor />
+        <el-tab-pane label="入驻机构" name="2"   v-if="permission('/tenandInFor')">
+          <tenandInFor  v-if="activeIndex ==2"/>
         </el-tab-pane>
       </tab-router>
     </div>
@@ -33,6 +25,7 @@
 // import pagination from "@/components/Pagination/index";
 import tenantApplyFor from "./component/tenantApplyFor.vue";
 import tenandInFor from "./component/tenandInFor.vue";
+import { permission } from "@/utils/directivePage";
 import { tenantApplyList } from "./api";
 import { getTimes } from "@/utils";
 const initSearch = {
@@ -42,7 +35,7 @@ const initSearch = {
 export default {
   components: {
     tenantApplyFor,
-    tenandInFor
+    tenandInFor,
   },
   data() {
     return {
@@ -96,6 +89,9 @@ export default {
     handleClick(val) {
       this.activeIndex = val.name;
     },
+    permission(str){
+      return permission(str)
+    }
   },
   filters: {
     formatStudentNumLevel(item) {

+ 37 - 16
src/views/platformManager/tenantApply/modals/infodetail.vue

@@ -3,34 +3,34 @@
     <el-alert title="入驻信息" :closable="false" type="info"> </el-alert>
     <descriptions :column="2">
       <descriptions-item label="公司全称:">{{
-        activeRow.city || ""
+        activeRow.tsignName || ""
       }}</descriptions-item>
       <descriptions-item label="公司简称:">{{
         activeRow.name || ""
       }}</descriptions-item>
       <descriptions-item label="企业负责人:">{{
-        activeRow.createTime || ""
+        activeRow.enterpriseLiableName || ""
       }}</descriptions-item>
       <descriptions-item label="企业负责人联系电话:">{{
-        activeRow.linkman || ""
+        activeRow.enterpriseLiablePhone || ""
       }}</descriptions-item>
       <descriptions-item label="项目负责人:">{{
-        activeRow.phone || ""
+        activeRow.contacts || ""
       }}</descriptions-item>
       <descriptions-item label="项目负责人联系电话:">{{
         activeRow.phone || ""
       }}</descriptions-item>
       <descriptions-item label="营业执照编号:" span="4">{{
-        activeRow.phone || ""
+        activeRow.tsignCode || ""
       }}</descriptions-item>
       <descriptions-item label="机构简介:" span="4">{{
-        activeRow.phone || ""
+        activeRow.remark || ""
       }}</descriptions-item>
       <descriptions-item label="通讯地址:" span="4">{{
-        activeRow.phone || ""
+        activeRow.address || ""
       }}</descriptions-item>
       <descriptions-item label="提交时间:" span="4">{{
-        activeRow.phone || ""
+        activeRow.createdTime || ""
       }}</descriptions-item>
     </descriptions>
     <el-alert
@@ -45,37 +45,37 @@
         <el-col :span="8">
           <div class="imgWrapItem">
             <p class="itemTitle">公司营业执照</p>
-            <img class="vertical" src="" alt="" />
+            <el-image class="vertical" :src="activeRow.tsignPic"  :preview-src-list="[activeRow.tsignPic]" alt="" />
           </div>
         </el-col>
         <el-col :span="8">
           <div class="imgWrapItem">
             <p class="itemTitle">税务登记证</p>
-            <img class="vertical" src="" alt="" /></div
+            <el-image class="vertical" :src="activeRow.taxRegisterPic"  :preview-src-list="[activeRow.taxRegisterPic]" alt="" /></div
         ></el-col>
         <el-col :span="8">
           <div class="imgWrapItem">
             <p class="itemTitle">公司开户信息</p>
-            <img class="vertical" src="" alt="" /></div
+            <el-image class="vertical" :src="activeRow.companyAccountInfoPic"  :preview-src-list="[activeRow.companyAccountInfoPic]" alt="" /></div
         ></el-col>
       </el-row>
       <el-row class="row">
         <el-col :span="8" >
           <div class="imgWrapItem">
             <p>法人身份证(正面)</p>
-            <img class="horizontal" src="" alt="" />
+            <el-image class="horizontal" :src="activeRow.legalPersonIdFrontPic"  :preview-src-list="[activeRow.legalPersonIdFrontPic]" alt="" />
           </div>
         </el-col>
         <el-col :span="8">
           <div class="imgWrapItem">
             <p>法人身份证(反面)</p>
-            <img class="horizontal" src="" alt="" />
+            <el-image class="horizontal" :src="activeRow.legalPersonIdReversePic"  :preview-src-list="[activeRow.legalPersonIdReversePic]" alt="" />
           </div>
         </el-col>
         <el-col :span="8">
           <div class="imgWrapItem">
             <p>企业公章</p>
-            <img class="horizontal" src="" alt="" />
+            <el-image class="horizontal" :src="activeRow.corporateChops"  :preview-src-list="[activeRow.corporateChops]" alt="" />
           </div>
         </el-col>
       </el-row>
@@ -83,13 +83,13 @@
         <el-col :span="8" >
           <div class="imgWrapItem">
             <p>企业财务公章</p>
-            <img class="horizontal" src="" alt="" />
+            <el-image class="horizontal" :src="activeRow.corporateFinanceChops"  :preview-src-list="[activeRow.corporateFinanceChops]" alt="" />
           </div>
         </el-col>
         <el-col :span="8">
           <div class="imgWrapItem">
             <p>企业LOGO</p>
-            <p></p></div
+            <a :href="activeRow.logo" class="logo">logo</a></div
         ></el-col>
       </el-row>
     </div>
@@ -138,4 +138,25 @@ export default {
 .detailImgList {
   padding: 0 20px;
 }
+.horizontal {
+  width: 260px;
+  height: 200px;
+}
+.vertical {
+  width: 200px;
+  height: 260px;
+}
+.imgWrapItem {
+  margin-bottom: 20px;
+  p {
+    margin-bottom: 10px;
+  }
+  .el-image{
+    border: 1px solid #f3f3f3;
+  }
+}
+.logo {
+  margin-top: 20px;
+    color: var(--color-primary);
+}
 </style>

+ 62 - 35
src/views/platformManager/tenantApply/modals/recordDetail.vue

@@ -28,38 +28,44 @@
     <el-button style="margin-bottom: 20px" type="primary" @click="addRecord"
       >添加记录</el-button
     >
-    <div class="process">
+    <div class="process" v-if="processList.length > 0">
       <el-timeline :reverse="true">
         <el-timeline-item v-for="(activity, index) in processList" :key="index">
           <div>
-            <div class="name">{{ activity.realName }}</div>
+            <div class="name">{{ activity.callBackPeople }}</div>
             <div>{{ activity.createTime }}</div>
-            <div>{{ activity.event }}</div>
+            <div>{{ activity.callBackLog }}</div>
           </div>
         </el-timeline-item>
       </el-timeline>
     </div>
-    <el-dialog title="添加记录" :visible.sync="recordVisible" width="600px" append-to-body>
+    <empty v-else desc="暂无沟通记录" />
+    <el-dialog
+      title="添加记录"
+      :visible.sync="recordVisible"
+      width="600px"
+      append-to-body
+    >
       <el-form :model="form" ref="ruleForm">
-        <el-form-item
-          label="沟通时间"
-          label-width="120PX"
-          prop="nextVisitDate"
-        >
+        <el-form-item label="沟通时间" label-width="120PX" prop="createTime">
           <el-date-picker
-            type="date"
+            type="datetime"
             style="width: 100% !important"
-            placeholder="请选择下次沟通日期"
-            v-model="form.nextVisitDate"
+            placeholder="请选择沟通日期"
+            v-model="form.createTime"
+            :picker-options="{
+              firstDayOfWeek: 1,
+            }"
+            value-format="yyyy-MM-dd HH:mm:ss"
           />
         </el-form-item>
-        <el-form-item label="沟通内容" label-width="120PX" prop="content">
+        <el-form-item label="沟通内容" label-width="120PX" prop="callBackLog">
           <el-input
             type="textarea"
             :rows="3"
-            v-model.trim="form.content"
+            v-model.trim="form.callBackLog"
             autocomplete="off"
-            maxlength="255"
+            maxlength="140"
             show-word-limit
             placeholder="请输入沟通沟通内容"
           ></el-input>
@@ -67,42 +73,59 @@
       </el-form>
       <span slot="footer" class="dialog-footer">
         <el-button @click="recordVisible = false">取 消</el-button>
-        <el-button type="primary" @click="recordVisible = false"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitRecode">确 定</el-button>
       </span>
     </el-dialog>
   </div>
 </template>
 <script>
+import { getCallRecord, addCallRecord } from "../api";
 export default {
   props: ["activeRow"],
   data() {
     return {
-      processList: [
-        {
-          realName: "张XX",
-          createTime: "2021-12-11 12:10:29",
-          event: "希望提供测试账号",
-        },
-        {
-          realName: "张XX",
-          createTime: "2021-12-11 12:10:29",
-          event: "希望提供测试账号",
-        },
-      ],
+      processList: [],
       recordVisible: false,
-      form:{
-        nextVisitDate:'',
-        content:''
-      }
+      form: {
+        createTime: "",
+        callBackLog: "",
+      },
     };
   },
-  mounted() {},
+  mounted() {
+    this.getRecode();
+  },
   methods: {
     addRecord() {
       this.recordVisible = true;
     },
+    async submitRecode() {
+      try {
+        const res = await addCallRecord({
+          tenantApplyId: this.activeRow.id,
+          ...this.form,
+        });
+        this.recordVisible = false;
+        this.form = {
+          createTime: "",
+          callBackLog: "",
+        };
+        this.getRecode();
+      } catch (e) {
+        console.log(e);
+      }
+    },
+    async getRecode() {
+      try {
+        const res = await getCallRecord({
+          applyId: this.activeRow.id,
+          ...this.form,
+        });
+        this.processList = res.data.rows
+      } catch (e) {
+        console.log(e);
+      }
+    },
   },
 };
 </script>
@@ -119,4 +142,8 @@ export default {
     line-height: 30px;
   }
 }
+.el-timeline-item__content {
+  position: relative;
+  top: -2px;
+}
 </style>