natasha 1 неделя назад
Родитель
Сommit
ebde72d1c8

+ 6 - 2
src/components/NavMenu.vue

@@ -255,9 +255,13 @@ export default {
               title: "测评价格",
               index: "test_setting",
             },
+            // {
+            //   title: "短信资源",
+            //   index: "SMS_resources",
+            // },
             {
-              title: "短信资源",
-              index: "SMS_resources",
+              title: "聚水潭订单号管理",
+              index: "jst_order",
             },
             {
               title: "聚水潭对接配置",

+ 5 - 0
src/router/index.js

@@ -168,6 +168,11 @@ export const constantRoutes = [{
         path: '/jst_setting',
         component: () =>
             import ('@/views/system_config/JstSetting.vue')
+  },
+    {
+        path: '/jst_order',
+        component: () =>
+            import ('@/views/system_config/JstOrder.vue')
     },
     {
         path: '/qx_setting',

+ 665 - 0
src/views/system_config/BatchImport.vue

@@ -0,0 +1,665 @@
+<template>
+  <div class="batch-box">
+    <div class="batch-box-top tabs">
+      <!-- <a :class="[tabsIndex === 0 ? 'active' : '']" @click="handleChangeTabs(0)"
+        >批量上传</a
+      >
+      <a :class="[tabsIndex === 1 ? 'active' : '']" @click="handleChangeTabs(1)"
+        >日志</a
+      > -->
+    </div>
+    <div class="batch-box-center">
+      <template v-if="tabsIndex === 0">
+        <div class="upload-box" v-if="!alreadyFile">
+          <el-upload
+            class="upload-demo"
+            :accept="'.xls'"
+            :limit="1"
+            :on-progress="uploadVideoProcess"
+            :before-upload="handlebeforeUpload"
+            :on-success="handleSuccess"
+            drag
+            :action="url"
+            :show-file-list="false"
+            multiple
+          >
+            <div class="el-upload__text">
+              点击或拖拽文件到此处上传
+              <span>只有 xls 格式文件可以上传,文件大小不得超过 100MB</span>
+            </div>
+          </el-upload>
+        </div>
+        <template v-else>
+          <div class="file-top">
+            <div class="file-content">
+              <svg-icon icon-class="xlsx"></svg-icon>
+              <div class="file">
+                <p v-if="fileList[0] && fileList[0].name">
+                  {{ fileList[0].name }}
+                </p>
+                <el-progress
+                  v-if="resultData"
+                  :percentage="percentage"
+                  :show-text="false"
+                ></el-progress>
+                <b
+                  v-if="
+                    fileList[0] &&
+                    fileList[0].fileSize &&
+                    !progressFlag &&
+                    !uploading &&
+                    !resultData
+                  "
+                  >{{ fileList[0].fileSize }}</b
+                >
+                <!-- <div class="file-uploading" v-if="progressFlag">
+                                <span class="progress" v-if="realFileSize">{{'上传文件 '+alreadyUpload+'/'+realFileSize}}</span>
+                                <span>{{percentage}}%</span>
+                            </div> -->
+                <div class="file-uploading" v-if="resultData">
+                  <span class="progress">{{
+                    "导入数据进度 " + resultData.progress_percent + "%"
+                  }}</span>
+                  <span
+                    class="color-green"
+                    v-if="resultData.is_finish === 'true'"
+                    >完成</span
+                  >
+                  <span
+                    class="color-red"
+                    v-if="
+                      resultData.is_finish === 'false' &&
+                      resultData.is_end === 'true'
+                    "
+                    >网络链接已中断</span
+                  >
+                </div>
+              </div>
+            </div>
+            <i class="el-icon-error" @click="handleErmoveFile"></i>
+          </div>
+          <div class="file-bottom"></div>
+        </template>
+      </template>
+      <template v-else>
+        <div class="log-box" v-if="resultData">
+          <p>上传文件 {{ fileList[0].name }}</p>
+          <p>
+            用时
+            {{ realFormatSecond(uploadTime + resultData.execute_duration) }}
+          </p>
+          <p>
+            成功上传
+            <span class="color-green">{{ resultData.success_count }}</span>
+            条记录,失败
+            <span class="color-red">{{ resultData.error_count }}</span> 条
+          </p>
+          <div class="border"></div>
+          <p
+            :class="[item.is_success === 'true' ? 'color-green' : 'color-red']"
+            v-for="(item, index) in execute_log_list"
+            :key="index"
+          >
+            {{
+              item.row_count +
+              " " +
+              (item.is_success === "false" ? item.error_info : "上传成功")
+            }}
+          </p>
+        </div>
+      </template>
+    </div>
+    <div class="batch-box-bottom">
+      <template v-if="tabsIndex === 0">
+        <span></span>
+        <!-- <a class="downLoad" target="_blank" :href="exportUrl" v-if="!type"
+          >下载模板</a
+        ><a v-else></a> -->
+        <div class="btn-box">
+          <el-button @click="closeDialog" size="small">取消</el-button>
+          <el-button
+            type="primary"
+            :key="4"
+            @click="closeDialog"
+            v-if="resultData && resultData.is_finish === 'true'"
+            >完成</el-button
+          >
+          <el-button
+            type="primary"
+            :key="3"
+            :disabled="
+              (!uploadFlag && !file_id) ||
+              (resultData && resultData.is_finish === 'true')
+            "
+            @click="handleUpload"
+            v-loading="loading"
+            v-else
+            ><svg-icon icon-class="upload"></svg-icon>开始上传</el-button
+          >
+
+          <!-- <el-button
+            type="primary"
+            v-if="uploading && !isStop"
+            v-loading="loading"
+            @click="handleInterruptTask"
+            ><svg-icon icon-class="pause-fill"></svg-icon>暂停</el-button
+          > -->
+          <el-button
+            type="warning"
+            v-if="isStop"
+            v-loading="loading"
+            @click="handleUpload"
+            ><i class="el-icon-refresh-right"></i>重试</el-button
+          >
+        </div>
+      </template>
+      <template v-else>
+        <div class="btn-box" style="flex: 1">
+          <el-button
+            :key="2"
+            type="primary"
+            :disabled="!(resultData && resultData.is_finish === 'true')"
+            @click="handleExportPsd"
+            v-if="!type"
+            ><svg-icon icon-class="upload"></svg-icon>导出密码</el-button
+          >
+          <el-button
+            :key="1"
+            type="primary"
+            :disabled="!(resultData && resultData.is_finish === 'true')"
+            @click="handleExportLog"
+            ><svg-icon icon-class="upload"></svg-icon>导出日志</el-button
+          >
+        </div>
+      </template>
+    </div>
+  </div>
+</template>
+
+<script>
+import { getToken } from "../../utils/auth";
+import { getLogin } from "@/api/ajax";
+export default {
+  components: {},
+  name: "batchImport",
+  props: ["exportUrl", "type"],
+  data() {
+    return {
+      tabsIndex: 0,
+      alreadyFile: false, // 上传了需要解析的文件
+      file_id: "",
+      uploadFlag: false, // 是否可以点击开始上传按钮
+      uploading: false, // 上传中
+      isStop: false, // 暂停
+      fileList: [],
+      sameUser: "false", // 存在相同的用户是否覆盖, true 覆盖,false 跳过。
+      coverUser: [], // 覆盖用户时是否更新用户密码, true 更新,false 不更新。
+      progressFlag: false,
+      percentage: 0,
+      alreadyUpload: "", // 已经上传的大小
+      realFileSize: "", // 文件真实大小
+      loading: false,
+      timer: null,
+      resultData: null, // 上传结果数据
+      execute_log_list: [], // 日志列表
+      uploadTime: 0,
+      uploadTimer: null,
+      id: this.$route.query.id ? this.$route.query.id : "",
+    };
+  },
+  watch: {},
+  computed: {
+    url() {
+      let userInfor = getToken();
+      let access_token = "";
+      if (userInfor) {
+        let user = JSON.parse(getToken());
+        access_token = user.access_token;
+      }
+      return (
+        process.env.VUE_APP_BASE_API +
+        "/FileServer/WebFileUpload?AccessToken=" +
+        access_token +
+        "&SecurityLevel=High"
+      );
+    },
+  },
+  methods: {
+    handleChangeTabs(value) {
+      this.tabsIndex = value;
+    },
+    closeDialog() {
+      clearInterval(this.timer);
+      this.uploading = false;
+      this.uploadFlag = true;
+      this.isStop = true;
+      this.loading = false;
+      this.$emit("closeDialog");
+    },
+    handlebeforeUpload(file) {
+      if (file.size > 100 * 1024 * 1024) {
+        this.$message.warning("上传文件大小不能超过100M");
+        return false; // 必须返回false
+      }
+      this.alreadyFile = true;
+      this.uploadTimer = setInterval(() => {
+        this.uploadTime++;
+      }, 1000);
+    },
+    handleSuccess(response, file, fileList) {
+      if (response.status == 1) {
+        this.progressFlag = false;
+        clearInterval(this.uploadTimer);
+        this.file_id = response.file_info_list[0].file_id;
+        this.uploadFlag = true;
+        this.fileList = fileList;
+        this.fileList.forEach((item) => {
+          if (item.size > 1000 * 1000) {
+            if (item.size / 1000 / 1000 / 1000 > 1) {
+              item.fileSize =
+                (item.size / 1000 / 1000 / 1000).toFixed(2) + "GB";
+            } else {
+              item.fileSize = (item.size / 1000 / 1000).toFixed(2) + "MB";
+            }
+          } else {
+            item.fileSize = (item.size / 1000).toFixed(2) + "KB";
+          }
+        });
+      } else {
+        this.fileList = [];
+        this.file_id = "";
+        this.uploadFlag = false;
+        this.$message.warning(response.msg);
+        this.alreadyFile = false;
+        this.progressFlag = false;
+        this.percentage = 0;
+        this.alreadyUpload = "";
+        this.uploadTime = 0;
+        clearInterval(this.uploadTimer);
+      }
+    },
+    handleErmoveFile() {
+      if (this.progressFlag) {
+        this.$message.warning("文件还未上传成功,不可删除");
+        return false;
+      }
+      this.file_id = "";
+      this.uploadFlag = false;
+      this.fileList = [];
+      this.alreadyFile = false;
+      this.progressFlag = false;
+      this.isStop = false;
+      this.percentage = 0;
+      this.alreadyUpload = "";
+      this.resultData = null;
+      this.sameUser = "false";
+      this.coverUser = [];
+      this.uploadTime = 0;
+    },
+    uploadVideoProcess(event, file, fileList) {
+      this.fileList = fileList;
+      this.progressFlag = true; // 显示进度条
+      this.percentage = parseInt(event.percent); // 动态获取文件上传进度
+      if (file.size > 1000 * 1000) {
+        if (file.size / 1000 / 1000 / 1000 > 1) {
+          this.alreadyUpload =
+            ((file.size / 1000 / 1000 / 1000 / 100) * this.percentage).toFixed(
+              2
+            ) + "GB";
+          this.realFileSize =
+            (file.size / 1000 / 1000 / 1000).toFixed(2) + "GB";
+        } else {
+          this.alreadyUpload =
+            ((file.size / 1000 / 1000 / 100) * this.percentage).toFixed(2) +
+            "MB";
+          this.realFileSize = (file.size / 1000 / 1000).toFixed(2) + "MB";
+        }
+      } else {
+        this.alreadyUpload =
+          ((file.size / 1000 / 100) * this.percentage).toFixed(2) + "KB";
+        this.realFileSize = (file.size / 1000).toFixed(2) + "KB";
+      }
+      if (this.percentage >= 100) {
+        this.percentage = 100;
+      }
+    },
+    // 开始上传
+    handleUpload() {
+      if (this.resultData && this.resultData.is_finish === "true") {
+        this.$message.warning("已经解析过该文件");
+        return false;
+      }
+      if (!this.file_id) {
+        this.$message.warning("请先上传文件");
+        return false;
+      }
+      this.percentage = 0;
+      this.loading = true;
+      this.progressFlag = false;
+      this.uploadFlag = false;
+      let MethodName =
+        "/ShopServer/Manager/JushuitanOrderSNManager/StartBatchImportJushuitanOrderSN";
+      let data = {
+        file_id: this.file_id,
+      };
+      getLogin(MethodName, data)
+        .then((res) => {
+          if (res.status === 1) {
+            this.uploading = true;
+            this.isStop = false;
+            this.timer = setInterval(() => {
+              if (this.resultData && this.resultData.is_finish === "true") {
+                clearInterval(this.timer);
+                this.timer = null;
+                this.uploading = false;
+                this.percentage = this.resultData.progress_percent;
+                this.loading = false;
+                // if (this.coverUser.indexOf("2") > -1) {
+                //   window.open(this.resultData.archive_file_url, "_blank");
+                // }
+              } else {
+                this.handleTaskStatus(res.task_id);
+              }
+            }, 1000);
+          } else {
+            this.loading = false;
+            this.uploading = false;
+            this.uploadFlag = true;
+            this.isStop = true;
+            clearInterval(this.timer);
+          }
+        })
+        .catch(() => {
+          clearInterval(this.timer);
+          this.uploading = false;
+          this.uploadFlag = true;
+          this.isStop = true;
+          this.loading = false;
+        });
+    },
+    // 导入任务执行状态
+    handleTaskStatus(task_id) {
+      let MethodName =
+        "/ShopServer/Manager/JushuitanOrderSNManager/GetBatchImportJushuitanOrderSNTaskProgress";
+
+      let data = {
+        task_id: task_id,
+      };
+      getLogin(MethodName, data)
+        .then((res) => {
+          if (res.status === 1) {
+            this.resultData = res;
+            // this.execute_log_list = JSON.parse(
+            //   JSON.stringify(this.resultData.execute_log_list)
+            // ).reverse();
+          }
+        })
+        .catch(() => {
+          this.uploading = false;
+          this.loading = false;
+        });
+    },
+    // 中断任务
+    handleInterruptTask() {
+      this.loading = true;
+      let MethodName =
+        "/OrgServer/Manager/DataImport/InterruptPersonImportTask";
+      if (this.type) {
+        MethodName =
+          "/OrgServer/Manager/DataImport/InterruptPersonWhiteListImportTask";
+      }
+      getLogin(MethodName, {})
+        .then((res) => {
+          if (res.status === 1) {
+            this.isStop = true;
+            this.loading = false;
+          }
+        })
+        .catch(() => {
+          this.loading = false;
+        });
+    },
+    // 导出日志
+    handleExportLog() {
+      let href = this.resultData.execute_report_file_url;
+      window.open(href, "_blank");
+    },
+    // 将整数转换成 时:分:秒的格式
+    realFormatSecond(value) {
+      let theTime = parseInt(value); // 秒
+      let theTime1 = 0; // 分
+      let theTime2 = 0; // 小时
+      if (theTime > 60) {
+        theTime1 = parseInt(theTime / 60);
+        theTime = parseInt(theTime % 60);
+        if (theTime1 > 60) {
+          theTime2 = parseInt(theTime1 / 60);
+          theTime1 = parseInt(theTime1 % 60);
+        }
+      }
+      let result = String(parseInt(theTime));
+      if (result < 10) {
+        result = "0" + result;
+      }
+      if (theTime1 > 0) {
+        result = String(parseInt(theTime1)) + ":" + result;
+        if (theTime1 < 10) {
+          result = "0" + result;
+        }
+      } else {
+        result = "00:" + result;
+      }
+      if (theTime2 > 0) {
+        result = String(parseInt(theTime2)) + ":" + result;
+        if (theTime2 < 10) {
+          result = "0" + result;
+        }
+      } else {
+        result = "00:" + result;
+      }
+      return result;
+    },
+    // 导出密码文件
+    handleExportPsd() {
+      window.open(this.resultData.archive_file_url, "_blank");
+    },
+  },
+  created() {},
+  mounted() {},
+  beforeDestroy() {},
+};
+</script>
+
+<style lang="scss" scoped>
+.batch-box {
+  height: 358px;
+  background: #ffffff;
+  &-top {
+    height: 56px;
+    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
+  }
+  &-center {
+    height: 233px;
+    overflow: auto;
+  }
+  &-bottom {
+    height: 64px;
+    border-top: 1px solid rgba(0, 0, 0, 0.08);
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    padding: 16px 24px;
+    .btn-box {
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      .el-button {
+        font-size: 14px;
+        padding: 5px 16px;
+        height: 32px;
+        .svg-icon,
+        .el-icon-refresh-right {
+          margin-right: 8px;
+        }
+        &.el-button--warning {
+          background: #ff802b;
+          border: none;
+        }
+      }
+    }
+  }
+  .tabs {
+    display: flex;
+    padding: 12px 0;
+    justify-content: center;
+    a {
+      font-size: 14px;
+      line-height: 22px;
+      color: #4e5969;
+      border-radius: 100px;
+      padding: 5px 16px;
+      margin-right: 12px;
+      &:hover {
+        background: #f2f3f5;
+      }
+      &.active {
+        background: #f2f3f5;
+        font-weight: 500;
+        color: #165dff;
+      }
+    }
+  }
+  .downLoad {
+    color: #000;
+    font-size: 14px;
+    line-height: 22px;
+    &:hover {
+      color: #165dff;
+    }
+  }
+  .upload-box {
+    background: #f5f5f5;
+    padding: 24px;
+    height: 233px;
+  }
+  .file-top {
+    height: 88px;
+    padding: 24px 24px 0 24px;
+    background: #f5f5f5;
+    display: flex;
+    .file-content {
+      flex: 1;
+      display: flex;
+      .file {
+        margin-left: 16px;
+        flex: 1;
+        width: 205px;
+        b {
+          font-size: 12px;
+          font-style: normal;
+          font-weight: 600;
+          line-height: 14px;
+          color: #242634;
+        }
+      }
+      p {
+        margin: 0 0 8px 0;
+        font-size: 14px;
+        font-weight: 500;
+        line-height: 16px;
+        color: #242634;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+      }
+    }
+    .el-icon-error {
+      width: 16px;
+      height: 16px;
+      color: #cccccc;
+      cursor: pointer;
+      margin: 11px 0 0 14px;
+    }
+  }
+  .file-bottom {
+    padding: 24px 24px 0 24px;
+    p {
+      margin: 0 0 8px 0;
+      font-size: 14px;
+      line-height: 22px;
+      color: #4e5969;
+    }
+    .el-radio-group,
+    .el-checkbox-group {
+      padding: 5px 0;
+      margin-bottom: 8px;
+    }
+    .el-radio {
+      margin-right: 24px;
+    }
+    .el-checkbox {
+      margin-right: 16px;
+    }
+    .el-checkbox:last-of-type {
+      margin-right: 0;
+    }
+  }
+  .el-progress {
+    margin-bottom: 8px;
+  }
+  .file-uploading {
+    display: flex;
+    justify-content: space-between;
+    font-size: 12px;
+    line-height: 14px;
+    color: #242634;
+    .progress {
+      font-weight: 600;
+    }
+  }
+  .log-box {
+    background: #f5f5f5;
+    padding: 8px 16px;
+    min-height: 233px;
+    p {
+      font-size: 14px;
+      font-weight: 400;
+      line-height: 22px;
+      margin: 0;
+      color: #000;
+    }
+    .border {
+      border-bottom: 1px dashed #000;
+      margin: 16px 0;
+    }
+  }
+}
+</style>
+<style lang="scss">
+.upload-box {
+  .el-upload,
+  .el-upload-dragger {
+    width: 100%;
+  }
+  .el-upload-dragger {
+    background: #f5f5f5;
+    border-radius: 24px;
+    padding: 24px;
+    border: 2px dashed var(--grey-03, #e2e6ea);
+    display: flex;
+    align-items: center;
+    font-weight: 400;
+    line-height: 22px;
+    font-size: 14px;
+    color: #000;
+    span {
+      display: block;
+      font-size: 12px;
+      color: #86909c;
+      font-size: 12px;
+      line-height: 20px;
+      word-break: break-word;
+    }
+  }
+}
+</style>

+ 345 - 0
src/views/system_config/JstOrder.vue

@@ -0,0 +1,345 @@
+<template>
+  <div class="manage-root personnel-create">
+    <Header />
+    <div class="manage-root-contain">
+      <nav-menu
+        class="manage-root-contain-left"
+        :activeMenuIndex="activeMenuIndex"
+      ></nav-menu>
+      <div class="manage-root-contain-right">
+        <breadcrumb
+          :breadcrumbList="breadcrumbList"
+          class="breadcrumb-box"
+        ></breadcrumb>
+        <div class="create-bottom">
+          <div class="common-title-box">
+            <h3>聚水潭订单号管理</h3>
+            <div class="btn-box">
+              <el-button type="primary" size="small" @click="handleAdd"
+                >新增</el-button
+              >
+              <el-button
+                type="primary"
+                size="small"
+                @click="handleBatchImport('')"
+                >批量导入</el-button
+              >
+            </div>
+          </div>
+          <div class="search">
+            <div class="search-box">
+              <div class="search-item">
+                <label>搜索</label>
+                <el-input
+                  placeholder="输入搜索内容"
+                  v-model="searchInput"
+                  maxlength="200"
+                >
+                  <i
+                    slot="suffix"
+                    class="el-input__icon el-icon-search"
+                    @click="getList(1)"
+                    style="cursor: pointer"
+                  ></i>
+                </el-input>
+              </div>
+            </div>
+          </div>
+          <el-table
+            class="search-table"
+            :data="tableData"
+            style="width: 100%"
+            key="table"
+            :max-height="tableHeight"
+            v-loading="tableLoading"
+          >
+            <el-table-column
+              type="index"
+              label="#"
+              width="54"
+              :index="(pageNumber - 1) * pageSize + 1"
+            >
+            </el-table-column>
+            <el-table-column prop="so_id" label="线上单号"> </el-table-column>
+            <el-table-column prop="raw_so_id" label="原始单号">
+            </el-table-column>
+            <el-table-column prop="outer_so_id" label="外部单号">
+            </el-table-column>
+            <el-table-column fixed="right" label="操作" width="140">
+              <template slot-scope="scope">
+                <el-button
+                  @click.native.prevent="handleDelete(scope.row)"
+                  type="text"
+                  size="small"
+                  class="red-btn"
+                >
+                  删除
+                </el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+          <el-pagination
+            key="pagination"
+            background
+            @size-change="
+              (val) => handleSizeChange(val, 'pageSize', 'pageNumber')
+            "
+            @current-change="(val) => handleCurrentChange(val, 'pageNumber')"
+            :current-page="pageNumber"
+            :page-sizes="[10, 20, 30, 40]"
+            :page-size="pageSize"
+            layout="total, prev, pager, next, sizes, jumper"
+            :total="total_count"
+          >
+          </el-pagination>
+        </div>
+      </div>
+    </div>
+    <el-dialog
+      :visible.sync="importFlag"
+      :show-close="false"
+      :close-on-click-modal="false"
+      :modal-append-to-body="false"
+      width="398px"
+      class="login-dialog person-dialog"
+      v-if="importFlag"
+    >
+      <batch-import @closeDialog="closeDialog"></batch-import>
+    </el-dialog>
+    <el-dialog
+      :visible.sync="addFlag"
+      :close-on-click-modal="false"
+      :modal-append-to-body="false"
+      width="500px"
+      title="新增"
+      v-if="addFlag"
+    >
+      <el-form v-model="jstForm" label-width="80px">
+        <el-form-item label="线上单号" prop="so_id">
+          <el-input
+            v-model="jstForm.so_id"
+            placeholder="请输入线上单号"
+            @blur="handleTrim('jstForm', 'so_id')"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="原始单号" prop="raw_so_id">
+          <el-input
+            v-model="jstForm.raw_so_id"
+            placeholder="请输入原始单号"
+            @blur="handleTrim('jstForm', 'raw_so_id')"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="外部单号" prop="outer_so_id">
+          <el-input
+            v-model="jstForm.outer_so_id"
+            placeholder="请输入外部单号"
+            @blur="handleTrim('jstForm', 'outer_so_id')"
+          ></el-input>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="small" @click="addFlag = false">取 消</el-button>
+        <el-button size="small" type="primary" @click="sureAdd"
+          >确 定</el-button
+        >
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+//这里可以导入其它文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
+//例如:import 《组件名称》from ‘《组件路径》';
+import Header from "../../components/Header.vue";
+import NavMenu from "../../components/NavMenu.vue";
+import Breadcrumb from "../../components/Breadcrumb.vue";
+import BatchImport from "./BatchImport.vue";
+import { getLogin } from "@/api/ajax";
+
+export default {
+  //import引入的组件需要注入到对象中才能使用
+  components: { Header, NavMenu, Breadcrumb, BatchImport },
+  props: {},
+  data() {
+    //这里存放数据
+    return {
+      activeMenuIndex: "jst_order",
+      breadcrumbList: [
+        {
+          icon: "setting",
+          url: "",
+          text: "",
+        },
+        {
+          icon: "",
+          url: "",
+          notLink: true,
+          text: "系统配置",
+        },
+        {
+          icon: "",
+          url: "",
+          text: "聚水潭订单号管理",
+        },
+      ],
+      importFlag: false,
+      searchInput: "",
+      tableData: [],
+      pageSize: 10,
+      pageNumber: 1,
+      tableHeight: "", // 表格高度
+      addFlag: false,
+      jstForm: {
+        so_id: "",
+        raw_so_id: "",
+        outer_so_id: "",
+      },
+      total_count: 0,
+    };
+  },
+  //计算属性 类似于data概念
+  computed: {},
+  //监控data中数据变化
+  watch: {},
+  //方法集合
+  methods: {
+    //计算table高度(动态设置table高度)
+    getTableHeight() {
+      let tableH = 370; //距离页面下方的高度
+      let tableHeightDetil = window.innerHeight - tableH;
+      if (tableHeightDetil <= 300) {
+        this.tableHeight = 300;
+      } else {
+        this.tableHeight = window.innerHeight - tableH;
+      }
+    },
+    // 批量导入
+    handleBatchImport(type) {
+      this.type = type;
+      this.importFlag = true;
+    },
+    // 关闭批量导入
+    closeDialog() {
+      this.importFlag = false;
+      this.getList();
+    },
+    // 新增
+    handleAdd() {
+      this.addFlag = true;
+    },
+    sureAdd() {
+      let Mname =
+        "/ShopServer/Manager/JushuitanOrderSNManager/AddJushuitanOrderSN";
+      let data = this.jstForm;
+      getLogin(Mname, data).then((res) => {
+        if (res.status === 1) {
+          this.$message.success("操作成功");
+          this.getList();
+          this.addFlag = false;
+          this.jstForm = {
+            so_id: "",
+            raw_so_id: "",
+            outer_so_id: "",
+          };
+        }
+      });
+    },
+    // 去掉前后空格
+    handleTrim(form, fild) {
+      this[form][fild] = this[form][fild].trim();
+    },
+    // 列表
+    getList(page) {
+      this.tableLoading = true;
+      if (page) {
+        this.pageNumber = page;
+      }
+      let MethodName =
+        "/ShopServer/Manager/JushuitanOrderSNManager/PageQueryJushuitanOrderSNList";
+      let data = {
+        search_content: this.searchInput.trim(),
+        page_capacity: this.pageSize,
+        cur_page: this.pageNumber,
+      };
+      getLogin(MethodName, data)
+        .then((res) => {
+          this.tableLoading = false;
+          if (res.status === 1) {
+            this.tableData = res.order_sn_list;
+            this.total_count = res.total_count;
+          }
+        })
+        .catch(() => {
+          this.tableLoading = false;
+        });
+    },
+    // 删除
+    handleDelete(row, arr) {
+      this.$confirm("确定删除吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          let Mname =
+            "/ShopServer/Manager/JushuitanOrderSNManager/DeleteJushuitanOrderSN";
+          let data = {
+            id: row.id,
+          };
+          getLogin(Mname, data).then((res) => {
+            this.$message.success("删除成功");
+            this.getList();
+          });
+        })
+        .catch(() => {});
+    },
+    handleSizeChange(val, type, page) {
+      this[type] = val;
+      this[page] = 1;
+      this.getList();
+    },
+    handleCurrentChange(val, type) {
+      this[type] = val;
+      this.getList();
+    },
+  },
+  //生命周期 - 创建完成(可以访问当前this实例)
+  created() {
+    this.getTableHeight();
+    this.getList();
+  },
+  //生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {},
+  //生命周期-创建之前
+  beforeCreated() {},
+  //生命周期-挂载之前
+  beforeMount() {},
+  //生命周期-更新之前
+  beforUpdate() {},
+  //生命周期-更新之后
+  updated() {},
+  //生命周期-销毁之前
+  beforeDestory() {},
+  //生命周期-销毁完成
+  destoryed() {},
+  //如果页面有keep-alive缓存功能,这个函数会触发
+  activated() {},
+};
+</script>
+<style lang="scss" scoped>
+/* @import url(); 引入css类 */
+.create-bottom {
+  padding: 24px;
+  background: #ffffff;
+  border-radius: 4px;
+  height: calc(100vh - 140px);
+  overflow: auto;
+  h3 {
+    font-size: 20px;
+    font-weight: 500;
+    line-height: 28px;
+    margin: 0;
+    color: #1d2129;
+  }
+}
+</style>