Jelajahi Sumber

Merge branch 'master' of http://36.137.93.232:3000/scz/erp_wdly

cz 1 tahun lalu
induk
melakukan
a1beaceb6d

+ 3 - 2
.env.development

@@ -7,6 +7,7 @@ VITE_APP_ENV = 'development'
 # 若依管理系统/开发环境
 VITE_APP_BASE_API = '/dev-api'
 
-VITE_APP_WS_API = ':9899/test-api'
+VITE_APP_WS_API = ':9898'
+
+VITE_APP_IP = '127.0.0.1'
 
-VITE_APP_IP = '139.9.102.170'

+ 43 - 0
public/callback.html

@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <title>Child Page</title>
+</head>
+<style>
+  body{
+    background-size: cover;
+    background: url(img/loading.gif) no-repeat fixed center top;
+  }
+</style>
+<body>
+<!--<h1>京东回调成功</h1>-->
+
+<script>
+  function notifyParentAndClose() {
+    // 向父级页面发送消息
+    window.parent.postMessage('closeIframe', '*');
+  }
+  // var timer = setInterval(notifyParentAndClose, 3000); // 1000 毫秒等于 1 秒
+
+  function getParameterByName(name, url) {
+    if (!url) url = window.location.href;
+    name = name.replace(/[\[\]]/g, "\\$&");
+    var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
+            results = regex.exec(url);
+    if (!results) return null;
+    if (!results[2]) return '';
+    return decodeURIComponent(results[2].replace(/\+/g, " "));
+  }
+
+  // 使用示例
+  const parameterValue = getParameterByName('msg');
+  if(parameterValue == '' || parameterValue == undefined || parameterValue == 'undefined'){
+    setInterval(notifyParentAndClose, 3000);
+  }else{
+    window.parent.postMessage('alertAndCloseIframe#'+encodeURIComponent(parameterValue), '*')
+  }
+</script>
+</body>
+</html>

TEMPAT SAMPAH
public/img/jd-off.jpg


TEMPAT SAMPAH
public/img/jd-on.jpg


TEMPAT SAMPAH
public/img/loading.gif


+ 88 - 0
public/testLogin.html

@@ -0,0 +1,88 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <title>Login Page</title>
+  <style>
+    body {
+      font-family: Arial, sans-serif;
+      background-color: #f4f4f4;
+      margin: 0;
+      padding: 0;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      height: 100vh;
+    }
+
+    .login-container {
+      background-color: #fff;
+      padding: 20px;
+      border-radius: 8px;
+      box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
+    }
+
+    .login-container h2 {
+      text-align: center;
+      color: #333;
+    }
+
+    .login-form {
+      margin-top: 20px;
+    }
+
+    .form-group {
+      margin-bottom: 15px;
+    }
+
+    .form-group label {
+      display: block;
+      margin-bottom: 5px;
+      color: #555;
+    }
+
+    .form-group input {
+      width: 100%;
+      padding: 8px;
+      box-sizing: border-box;
+      border: 1px solid #ccc;
+      border-radius: 4px;
+    }
+
+    .form-group button {
+      background-color: #4caf50;
+      color: #fff;
+      padding: 10px;
+      border: none;
+      border-radius: 4px;
+      cursor: pointer;
+      width: 100%;
+    }
+
+    .form-group button:hover {
+      background-color: #45a049;
+    }
+  </style>
+</head>
+<body>
+
+<div class="login-container">
+  <h2>Login</h2>
+  <form class="login-form" action="http://127.0.0.1:9898/open/jd/callback" method="get">
+    <div class="form-group">
+      <label for="username">Username:</label>
+      <input type="text" id="username" name="username" required>
+    </div>
+    <div class="form-group">
+      <label for="password">Password:</label>
+      <input type="password" id="password" name="password" required>
+    </div>
+    <div class="form-group">
+      <button type="submit">Login</button>
+    </div>
+  </form>
+</div>
+
+</body>
+</html>

+ 136 - 39
src/components/headerBar/header-bar.vue

@@ -240,47 +240,62 @@
           </div>
         </div>
       </ul>
-      <div class="fr">
-        <!-- :value="12" -->
-        <el-badge
-          :value="badgeNum"
-          style="cursor: pointer"
-          class="badge"
-          @click="noticeTableModal = true"
-        >
-          <el-icon :size="20">
-            <BellFilled />
-          </el-icon>
-        </el-badge>
-        <notice
-          v-model="noticeTableModal"
-          @changeNum="(e) => (badgeNum = e)"
-        ></notice>
-        <el-dropdown
-          @command="handleCommand"
-          class="right-menu-item hover-effect"
-          trigger="click"
+        <div
+            class="jdTokenStatus"
+            style="display: flex; align-items: center; justify-content: center"
         >
-          <div class="dropdown-box">
-            {{ userData }}
+
+          <div v-if="tokenStatus" style="width: 40px;text-align: center; cursor: pointer;">
+            <img :src="'/img/jd-on.jpg'" style="width: 25px;display: block;margin: 0 auto"/>
+            <span style="color: white;font-size: 12px;display: block;">在线</span>
+          </div>
+          <div v-if="!tokenStatus" style="width: 40px;text-align: center; cursor: pointer;"  @click="changeJdLoginModal">
+            <img :src="'/img/jd-off.jpg'" style="width: 25px;display: block;margin: 0 auto"/>
+            <span style="color: white;font-size: 12px;display: block;">离线</span>
           </div>
-          <template #dropdown>
-            <el-dropdown-menu>
-              <router-link to="/user/profile">
-                <el-dropdown-item>{{
-                  $t("header.personalCenter")
-                }}</el-dropdown-item>
-              </router-link>
-              <el-dropdown-item command="setLayout">
-                <span>{{ $t("header.layoutSettings") }}</span>
-              </el-dropdown-item>
-              <el-dropdown-item divided command="logout">
-                <span>{{ $t("header.logout") }}</span>
-              </el-dropdown-item>
-            </el-dropdown-menu>
-          </template>
-        </el-dropdown>
-      </div>
+        </div>
+      <jdStatus v-model="jdLoginModal" :iframeUrl="jdLoginUrl"></jdStatus>
+        <div class="fr">
+          <!-- :value="12" -->
+          <el-badge
+            :value="badgeNum"
+            style="cursor: pointer"
+            class="badge"
+            @click="noticeTableModal = true"
+          >
+            <el-icon :size="20">
+              <BellFilled />
+            </el-icon>
+          </el-badge>
+          <notice
+            v-model="noticeTableModal"
+            @changeNum="(e) => (badgeNum = e)"
+          ></notice>
+          <el-dropdown
+            @command="handleCommand"
+            class="right-menu-item hover-effect"
+            trigger="click"
+          >
+            <div class="dropdown-box">
+              {{ userData }}
+            </div>
+            <template #dropdown>
+              <el-dropdown-menu>
+                <router-link to="/user/profile">
+                  <el-dropdown-item>{{
+                    $t("header.personalCenter")
+                  }}</el-dropdown-item>
+                </router-link>
+                <el-dropdown-item command="setLayout">
+                  <span>{{ $t("header.layoutSettings") }}</span>
+                </el-dropdown-item>
+                <el-dropdown-item divided command="logout">
+                  <span>{{ $t("header.logout") }}</span>
+                </el-dropdown-item>
+              </el-dropdown-menu>
+            </template>
+          </el-dropdown>
+        </div>
     </header>
   </div>
 </template>
@@ -291,6 +306,8 @@ import { ElMessageBox, ElNotification, ElMessage } from "element-plus";
 import useUserStore from "@/store/modules/user";
 import "@/components/headerBar/header.scss";
 import notice from "@/components/notice/index";
+import jdStatus from "@/components/jdStatus/index";
+import {getToken} from "@/utils/auth";
 const router = useRouter();
 const userStore = useUserStore();
 const { proxy } = getCurrentInstance();
@@ -304,6 +321,24 @@ const noticeTableModal = ref(false);
 const userData = ref(Cookies.get("nickName") || "");
 const commonsRouterList = ref([]);
 const activeLeftData = ref({});
+let tokenStatus = ref(false);
+
+const jdLoginModal = ref(false);
+const jdLoginUrl = ref('');
+
+
+const changeJdLoginModal = () => {
+  getJd2LoginUrl();
+  jdLoginModal.value = true;
+};
+
+
+const getJd2LoginUrl = async () => {
+  proxy.get("/open/jd/build2LoginUrl").then((res) => {
+    jdLoginUrl.value = res.data;
+  });
+}
+
 const openLeftBaner = (i, index) => {
   leftBanerType.value = 1;
   activeLeftData.value = i;
@@ -466,9 +501,64 @@ function calcAutoListChidren() {
   autoListChidrenNum.value = Math.floor((getBrowserWidth() - 616) / 120);
 }
 
+
+const intervalId = ref(null);
+const scoket = ref(null);
+const socketInit = () => {
+  window.ws = new WebSocket(
+      "ws://" +
+      import.meta.env.VITE_APP_IP +
+      import.meta.env.VITE_APP_WS_API +
+      "/webStock/" +
+      getToken()
+      // 'ws://192.168.1.97:8300/webStock/' + window.localStorage.getItem('token')
+  );
+  //申请一个WebSocket对象,参数是服务端地址,同http协议使用http://开头一样,WebSocket协议的url使用ws://开头,另外安全的WebSocket协议使用wss://开头
+  window.ws.onopen = function () {
+    //当WebSocket创建成功时,触发onopen事件
+    console.log("open");
+    scoket.value = window.ws;
+    //立马发送一次心跳
+    sendSocketMsg();
+    // 设置定时器,每30秒执行一次myFunction
+    intervalId.value = setInterval(sendSocketMsg, 15000);
+  };
+  window.ws.onmessage = function (e) {
+    //当客户端收到服务端发来的消息时,触发onmessage事件,参数e.data包含server传递过来的数据
+    //在data.value前面插入
+    let jsonObj = JSON.parse(e.data);
+    if(jsonObj.cmd == "jdStatus"){
+      console.log(jsonObj.status);
+      tokenStatus.value = jsonObj.status;
+    }
+  };
+  window.ws.onclose = function (e) {
+    //当客户端收到服务端发送的关闭连接请求时,触发onclose事件
+    console.log("close");
+    if(intervalId.value) clearInterval(intervalId.value);
+  };
+  window.ws.onerror = function (e) {
+    //如果出现连接、处理、接收、发送数据失败的时候触发onerror事件
+    console.log("error");
+    if(intervalId.value) clearInterval(intervalId.value);
+  };
+};
+
+
+// 定义要执行的函数
+function sendSocketMsg() {
+  let jsonData = {
+    cmd: "jdStatus",
+    content: "heartbeat",
+  };
+  scoket.value.send(JSON.stringify(jsonData));
+  console.log('Timer executed!');
+}
+
 //一维数组转tree
 
 onMounted(() => {
+  getJd2LoginUrl();
   calcAutoListChidren();
   window.addEventListener("resize", calcAutoListChidren);
   proxy.get("/getInfo").then((res) => {
@@ -500,6 +590,13 @@ onMounted(() => {
   proxy.post("/sysUserMenu/list", { type: 1 }).then((res) => {
     commonsRouterList.value = res;
   });
+
+  socketInit();
+});
+
+// 在组件销毁时停止WebSocket
+onUnmounted(() => {
+  scoket.value.close();
 });
 </script>
 

+ 129 - 0
src/components/jdStatus/index.vue

@@ -0,0 +1,129 @@
+<template>
+  <div class="commons-notice">
+    <div
+        class="table-warp"
+        :class="modelValue ? 'table-warp-open' : ''"
+        @click.stop="closeNoticeTableModal"
+    >
+      <div class="table" @click.stop v-loading="loading">
+        <iframe id="myIframe" :src="iframeUrl" width="300" height="200"></iframe>
+      </div>
+    </div>
+  </div>
+</template>
+<script setup>
+
+import {watch} from "@vue/runtime-core";
+import { ElMessage, ElMessageBox } from "element-plus";
+
+const { proxy } = getCurrentInstance();
+const iframeSrc = ref('');
+const { modelValue, iframeUrl } = defineProps(['modelValue', 'iframeUrl']);
+
+const emit = defineEmits();
+
+const propValue = ref(modelValue);
+
+const closeNoticeTableModal = () => {
+  emit("update:modelValue", false);
+};
+let index = ref(0);
+let data = ref([]);
+const loading = ref(false);
+
+
+// 监听来自子页面的消息
+window.addEventListener('message', function(event) {
+  if (event.data === 'closeIframe') {
+    closeIframe();
+  }else if (event.data.indexOf('alertAndCloseIframe')>=0){
+    alertAndCloseIframe(decodeURIComponent(event.data.split('#')[1]));
+  }
+});
+
+
+onMounted(() => {
+  console.log('222', modelValue)
+  console.log('333', iframeUrl)
+});
+
+
+const noneUrl = () => {
+  return '';
+}
+
+function closeIframe() {
+  closeNoticeTableModal();
+}
+
+function alertAndCloseIframe(msg) {
+  closeNoticeTableModal();
+  ElMessageBox.alert(msg)
+}
+
+</script>
+<style lang="scss">
+iframe {
+  border: none; /* 移除边框 */
+  width: 100%; /* 使其填充父元素的宽度 */
+  height: 500px; /* 设置 iframe 的高度 */
+}
+.table-warp {
+  position: fixed;
+  right: 0;
+  top: 0;
+  width: 100%;
+  height: 100%;
+  z-index: 1000;
+  background: rgba(0, 0, 0, 0.1);
+  transition: all 0.3s ease-in-out;
+  opacity: 0;
+  display: none;
+}
+
+.table-warp-open {
+  opacity: 1;
+  display: block;
+}
+.table {
+  position: fixed;
+  right: 30px;
+  top: 52px;
+  padding: 0 5px 5px;
+  width: 500px;
+  background: #fff;
+  box-shadow: 0px 2px 20px 1px rgba(0, 0, 0, 0.1);
+  z-index: 20;
+  .notice-btn-box {
+    text-align: right;
+  }
+  .tabs {
+    display: flex;
+    justify-content: space-between;
+    height: 60px;
+    line-height: 60px;
+    font-size: 14px;
+    font-weight: 400;
+    ul {
+      display: flex;
+      margin: 23px 0;
+      padding: 0;
+      li {
+        list-style: none;
+        padding: 0 5px;
+        cursor: pointer;
+        height: 14px;
+        line-height: 14px;
+        border-left: 1px solid #dcdcdc;
+      }
+      .active {
+        color: #0084ff;
+      }
+    }
+    .more {
+      color: #0084ff;
+      cursor: pointer;
+    }
+  }
+}
+</style>

+ 545 - 0
src/views/WDLY/blessing/cover.vue

@@ -0,0 +1,545 @@
+<template>
+  <div class="tenant">
+    <byTable
+        :source="sourceList.data"
+        :pagination="sourceList.pagination"
+        :config="config"
+        :loading="loading"
+        highlight-current-row
+        :selectConfig="selectConfig"
+        :table-events="{
+          select: select,
+        }"
+        :action-list="[
+        {
+          text: '添加封面',
+          action: () => openModal('add'),
+        },
+      ]"
+        @get-list="getList">
+
+      <template #coverUrl="{ item }">
+        <div v-if="item.coverList.length > 0">
+          <img
+              :src="item.coverList[0].fileUrl"
+              class="pic"
+              @click="handleClickFile(item.coverList[0])"
+          />
+        </div>
+        <div v-else></div>
+      </template>
+
+
+      <template #audioUrl="{ item }">
+        <div v-if="item.audioList.length > 0">
+          <audio controls   >
+            <source :src="item.audioList[0].fileUrl" type="audio/mp3" >
+          </audio>
+        </div>
+        <div v-else></div>
+      </template>
+    </byTable>
+
+    <el-dialog z-index="1100" :title="modalType == 'add' ? '添加封面信息' : '编辑封面信息'" v-if="dialogVisible" v-model="dialogVisible" width="800px" v-loading="loading">
+      <el-row style="width: 100%">
+        <el-col :span="15">
+          <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
+            <template #coverList>
+              <el-row style="width: 100%">
+                <el-col :span="24">
+                  <el-form-item  prop="coverList">
+                    <el-upload
+                        class="avatar-uploader"
+                        action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
+                        :data="uploadDataOne"
+                        :show-file-list="false"
+                        accept=".gif, .jpeg, .jpg, .png"
+                        :on-success="coverListSuccess"
+                        :before-upload="uploadFileOne">
+                      <el-image
+                          v-if="formData.data.coverList && formData.data.coverList.length > 0"
+                          :src="formData.data.coverList[0].fileUrl"
+                          fit="scale-down"
+                          class="avatar" />
+                      <el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
+                    </el-upload>
+                    <el-button
+                        class="delete-btn"
+                        type="danger"
+                        v-if="formData.data.coverList && formData.data.coverList.length > 0"
+                        @click="formData.data.coverList = []">
+                      删除
+                    </el-button>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </template>
+            <template #audioList>
+              <el-row style="width: 100%">
+                <el-col :span="24">
+                  <el-form-item  prop="audioList">
+                    <el-upload
+                        class="avatar-uploader"
+                        action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
+                        :data="uploadDataTwo"
+                        :show-file-list="false"
+                        accept="audio/*"
+                        :on-success="audioListSuccess"
+                        :before-upload="uploadFileTwo">
+                      <audio controls style="margin-top: 20px"  v-if="formData.data.audioList && formData.data.audioList.length > 0" >
+                        <source :src="formData.data.audioList[0].fileUrl" type="audio/mp3" >
+                      </audio>
+                      <el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
+                    </el-upload>
+                    <el-button
+                        class="delete-btn"
+                        type="danger"
+                        v-if="formData.data.audioList && formData.data.audioList.length > 0"
+                        @click="formData.data.audioList = []">
+                      删除
+                    </el-button>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </template>
+          </byForm>
+        </el-col>
+        <el-col :span="9">
+          <div class="blessingClass">
+              <div :style="coverStyle">
+
+                <div :style="fontStyle">
+                  <p>xxxxx:</p>
+                  <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;朋友生日到,千里送鹅毛。信息虽一毛,情谊伴到老。今生有缘遇,相知无争吵。虽非日夜伴,心中牵挂绕。问候不可少,祝福也送到。愿你身体健,快乐无烦恼;愿你事业顺,业绩步步高;愿你幸福笑,如意直到老。祝生日快乐!</p>
+                </div>
+              </div>
+          </div>
+        </el-col>
+
+      </el-row>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitForm" size="large" :loading="submitLoading">确 定</el-button>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import { ElMessage, ElMessageBox } from "element-plus";
+import byTable from "@/components/byTable/index";
+import byForm from "@/components/byForm/index";
+import {computed, nextTick, reactive, ref} from "vue";
+const { proxy } = getCurrentInstance();
+
+const router = useRouter();
+const loading = ref(false);
+const coverTypeList = ref([]);
+const submitLoading = ref(false);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 0,
+    pageNum: 1,
+    pageSize: 10,
+  },
+});
+
+let rules = ref({
+  coverType: [{ required: true, message: "请选择封面类型", trigger: "change" }],
+  coverName: [{ required: true, message: "请输入封面名称", trigger: "blur" }],
+  coverUrl: [{ required: true, message: "请上传封面", trigger: "blur" }],
+  audioUrl: [{ required: true, message: "请上传音频", trigger: "blur" }],
+});
+let dialogVisible = ref(false);
+let subFlag = ref(false);
+let modalType = ref("add");
+const selectConfig = computed(() => {
+  return [
+    {
+      label: "封面类型",
+      prop: "status",
+      data: coverTypeList.value
+    },
+  ]});
+
+const config = computed(() => {
+  return [
+
+    {
+      attrs: {
+        label: "封面类型",
+        prop: "coverType",
+        width: '240',
+        align: "center"
+      },
+      render(type) {
+        return proxy.dictValueLabel(type, coverTypeList.value);
+      },
+    },
+    {
+      attrs: {
+        label: "封面名称",
+        prop: "coverName",
+        align: "center"
+      },
+    },
+    {
+      attrs: {
+        label: "封面",
+        slot: "coverUrl",
+        width: 150,
+        align: "center"
+      },
+    },
+    {
+      attrs: {
+        label: "音频",
+        slot: "audioUrl",
+        width: 400,
+        align: "center"
+      },
+    },
+    {
+      attrs: {
+        label: "操作",
+        width: "120",
+        align: "right",
+      },
+      renderHTML(row) {
+        return [
+          {
+            attrs: {
+              label: "修改",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              getDtl(row);
+            },
+          },
+          {
+            attrs: {
+              label: "删除",
+              type: "danger",
+              text: true,
+            },
+            el: "button",
+            click() {
+              ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning",
+              }).then(() => {
+
+              });
+            },
+          },
+        ];
+      },
+    },
+  ];
+});
+
+let formData = reactive({
+  data: {
+    coverList:[],
+    audioList:[],
+  },
+});
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+});
+const byform = ref(null);
+
+const formConfig = computed(() => {
+  return [
+
+    {
+      type: "select",
+      prop: "coverType",
+      label: "封面类型",
+      data: coverTypeList.value,
+      required: true,
+    },
+    {
+      type: "input",
+      prop: "coverName",
+      label: "封面名称",
+      required: true,
+    },
+
+    {
+      type: "slot",
+      slotName: "coverList",
+      prop: "coverUrl",
+      label: "封面文件",
+      required: true,
+    },
+    {
+      type: "slot",
+      slotName: "audioList",
+      prop: "audioUrl",
+      label: "音频文件",
+      required: true,
+    },
+
+
+  ];
+});
+
+const getDictlist = async () => {
+  proxy
+      .getDictOne([
+        "cover_type"
+      ])
+      .then((res) => {
+        coverTypeList.value = res["cover_type"].map((x) => ({
+          label: x.dictValue,
+          value: x.dictKey,
+        }));
+      });
+};
+
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy.post("/blessingCover/page", sourceList.value.pagination).then((res) => {
+    sourceList.value.data = res.rows;
+    sourceList.value.pagination.total = res.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
+};
+
+const openModal = () => {
+  dialogVisible.value = true;
+  modalType.value = "add";
+  formData.data = {
+    content:'',
+  };
+  coverStyle.value = null
+  previewBlessingInit()
+};
+const selection = ref({
+  data: [],
+});
+const select = (_selection, row) => {
+  selection.value.data = _selection;
+};
+
+const getDtl = (row) => {
+  modalType.value = "edit";
+  proxy.post("/blessingCover/detail", { id: row.id }).then((res) => {
+    formData.data = res;
+    dialogVisible.value = true;
+
+    proxy.post("/fileInfo/getList", { businessIdList: [res.id], fileType: 1 }).then((resFile) => {
+      formData.data.coverList = resFile[res.id];
+      formData.data.coverUrl = resFile[res.id][0].fileUrl;
+
+      previewBlessing()
+    });
+    proxy.post("/fileInfo/getList", { businessIdList: [res.id], fileType: 2 }).then((resFile) => {
+      formData.data.audioList = resFile[res.id];
+      formData.data.audioUrl = resFile[res.id][0].fileUrl;
+    });
+  });
+};
+
+
+const submitForm = () => {
+  byform.value.handleSubmit(() => {
+      submitLoading.value = true;
+      proxy.post("/blessingCover/" + modalType.value, formData.data).then(
+          () => {
+            ElMessage({
+              message: modalType.value == "add" ? "添加成功" : "编辑成功",
+              type: "success",
+            });
+            dialogVisible.value = false;
+            submitLoading.value = false;
+            getList();
+          },
+          (err) => {
+            console.log(err);
+            submitLoading.value = false;
+          }
+      );
+  });
+};
+
+
+const uploadDataOne = ref({});
+const uploadFileOne = async (file) => {
+  const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
+  uploadDataOne.value = res.uploadBody;
+  file.id = res.id;
+  file.fileName = res.fileName;
+  file.fileUrl = res.fileUrl;
+  return true;
+};
+const uploadDataTwo = ref({});
+const uploadFileTwo = async (file) => {
+  const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
+  uploadDataTwo.value = res.uploadBody;
+  file.id = res.id;
+  file.fileName = res.fileName;
+  file.fileUrl = res.fileUrl;
+  return true;
+};
+
+const coverListSuccess = (response, uploadFile) => {
+  formData.data.coverList = [
+    {
+      id: uploadFile.raw.id,
+      fileName: uploadFile.raw.fileName,
+      fileUrl: uploadFile.raw.fileUrl,
+    },
+  ];
+
+  formData.data.coverUrl =  uploadFile.raw.fileUrl;
+
+  previewBlessing()
+};
+const audioListSuccess = (response, uploadFile) => {
+  formData.data.audioList = [
+    {
+      id: uploadFile.raw.id,
+      fileName: uploadFile.raw.fileName,
+      fileUrl: uploadFile.raw.fileUrl,
+    },
+  ];
+
+  formData.data.audioUrl = uploadFile.raw.fileUrl;
+};
+
+const handleClickFile = (file) => {
+  window.open(file.fileUrl, "_blank");
+};
+
+
+
+const coverStyle = ref({})
+const fontStyle = ref({})
+//模拟获取屏幕的宽高
+var offsetWidth = 262, offsetHeight = 520;
+
+const previewBlessingInit = () => {
+  coverStyle.value =
+      {
+
+        width: offsetWidth+'px',
+        height: offsetHeight+'px',
+        position: 'relative'
+      }
+
+  fontStyle.value =
+      {
+        position: 'absolute',
+        top: '50%',
+        transform: 'translateY(-50%)',
+        margin: '0 25px'
+      }
+
+}
+const previewBlessing = () => {
+
+    //背景图片
+    const coverUrl = formData.data.coverUrl;
+
+    //获取图片的宽高
+    var img = new Image();
+    img.src = coverUrl;
+    var naturalWidth = img.width , naturalHeight = img.height
+
+    //等比自适应
+    var backgroundSize = "";
+    if (naturalWidth / naturalHeight > offsetWidth / offsetHeight) {
+      backgroundSize = '100% auto'
+    } else {
+      backgroundSize = 'auto 100%'
+    }
+    coverStyle.value =
+    {
+      backgroundImage: 'url(' + coverUrl + ') ',
+      width: offsetWidth+'px',
+      height: offsetHeight+'px',
+      backgroundRepeat: 'no-repeat',
+      backgroundSize: backgroundSize,
+      backgroundPosition: 'center center',
+      position: 'relative'
+    }
+
+    fontStyle.value =
+    {
+      position: 'absolute',
+      top: '50%',
+      transform: 'translateY(-50%)',
+      margin: '0 25px'
+    }
+
+
+};
+
+getDictlist()
+getList()
+</script>
+
+<style lang='scss' scoped>
+.tenant {
+  padding: 20px;
+  .delete-btn{
+    margin-top: 10px;
+    margin-left: 25px;
+  }
+}
+.avatar-uploader .avatar {
+  width: 110px;
+  height: 110px;
+  display: block;
+  background-color: black;
+}
+.avatar-uploader .el-upload {
+  border: 1px dashed var(--el-border-color);
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+  transition: var(--el-transition-duration-fast);
+}
+.avatar-uploader .el-upload:hover {
+  border-color: var(--el-color-primary);
+}
+.el-icon.avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 110px;
+  height: 110px;
+  text-align: center;
+  border: 1px dashed var(--el-border-color);
+}
+
+.pic {
+  object-fit: contain;
+  width: 50px;
+  height: 50px;
+  cursor: pointer;
+  vertical-align: middle;
+}
+
+.blessingClass {
+  background-image: url("../../../assets/victoria/sjk.jpg") ;
+  background-size: cover;
+  height: 600px;
+  width: 300px;
+
+  padding:40px 19px;
+
+}
+</style>

+ 279 - 0
src/views/WDLY/blessing/info.vue

@@ -0,0 +1,279 @@
+<template>
+  <div class="tenant">
+    <byTable
+        :source="sourceList.data"
+        :pagination="sourceList.pagination"
+        :config="config"
+        :loading="loading"
+        highlight-current-row
+        :selectConfig="selectConfig"
+        @moreSearch="moreSearch"
+        :table-events="{
+          select: select,
+        }"
+        :action-list="[]"
+        @get-list="getList">
+      <template #coverUrl="{ item }">
+        <div v-if="item.coverList != null && item.coverList.length > 0">
+          <img
+              :src="item.coverList[0].fileUrl"
+              class="pic"
+              @click="handleClickFile(item.coverList[0])"
+          />
+        </div>
+        <div v-else></div>
+      </template>
+
+
+      <template #audioUrl="{ item }">
+        <div v-if="item.audioList != null && item.audioList.length > 0">
+          <audio controls   >
+            <source :src="item.audioList[0].fileUrl" type="audio/mp3" >
+          </audio>
+        </div>
+        <div v-else></div>
+      </template>
+    </byTable>
+  </div>
+
+
+
+  <el-dialog title="高级检索" v-if="openSearch" v-model="openSearch" width="600">
+    <byForm :formConfig="formSearchConfig" :formOption="formOption" v-model="sourceList.pagination">
+
+    </byForm>
+    <template #footer>
+      <el-button @click="cancelSearch()" size="large">取 消</el-button>
+      <el-button type="primary" @click="submitSearch()" size="large">确 定</el-button>
+    </template>
+  </el-dialog>
+</template>
+
+<script setup>
+import { ElMessage, ElMessageBox } from "element-plus";
+import byTable from "@/components/byTable/index";
+import byForm from "@/components/byForm/index";
+import {computed, nextTick, reactive, ref} from "vue";
+const { proxy } = getCurrentInstance();
+
+const router = useRouter();
+const loading = ref(false);
+const coverTypeList = ref([]);
+const submitLoading = ref(false);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 0,
+    pageNum: 1,
+    pageSize: 10,
+  },
+});
+
+const selectConfig = computed(() => {
+  return [
+
+  ]});
+
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "收礼人手机号",
+        prop: "acceptPhone",
+        align: "center"
+      },
+    },
+    {
+      attrs: {
+        label: "收礼人姓名",
+        prop: "acceptName",
+        align: "center"
+      },
+    },
+    {
+      attrs: {
+        label: "送礼人手机号",
+        prop: "givePhone",
+        align: "center"
+      },
+    },
+    {
+      attrs: {
+        label: "送礼人姓名",
+        prop: "giveName",
+        align: "center"
+      },
+    },
+    {
+      attrs: {
+        label: "送礼人性别",
+        prop: "giveSex",
+        align: "center"
+      },
+    },
+    {
+      attrs: {
+        label: "祝福语内容",
+        prop: "blessingContent",
+        align: "center"
+      },
+    },
+    {
+      attrs: {
+        label: "封面名称",
+        prop: "coverName",
+        align: "center"
+      },
+    },
+    {
+      attrs: {
+        label: "封面",
+        slot: "coverUrl",
+        width: 150,
+        align: "center"
+      },
+    },
+    {
+      attrs: {
+        label: "音频",
+        slot: "audioUrl",
+        width: 400,
+        align: "center"
+      },
+    },
+  ];
+});
+
+
+
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy.post("/blessingInfo/page", sourceList.value.pagination).then((res) => {
+    sourceList.value.data = res.rows;
+    sourceList.value.pagination.total = res.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
+};
+
+const selection = ref({
+  data: [],
+});
+const select = (_selection, row) => {
+  selection.value.data = _selection;
+};
+
+
+const handleClickFile = (file) => {
+  window.open(file.fileUrl, "_blank");
+};
+
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+});
+let copySearch = ref({});
+const openSearch = ref(false);
+const formSearchConfig = computed(() => {
+  return [
+    {
+      type: "input",
+      prop: "acceptPhone",
+      label: "收礼人手机号",
+      itemType: "text",
+    },
+    {
+      type: "input",
+      prop: "acceptName",
+      label: "收礼人姓名",
+      itemType: "text",
+    },
+    {
+      type: "input",
+      prop: "givePhone",
+      label: "送礼人手机号",
+      itemType: "text",
+    },
+    {
+      type: "input",
+      prop: "giveName",
+      label: "送礼人姓名",
+      itemType: "text",
+    },
+  ];
+});
+
+const moreSearch = () => {
+  copySearch.value = proxy.deepClone(sourceList.value.pagination);
+  openSearch.value = true;
+};
+
+const cancelSearch = () => {
+  sourceList.value.pagination = copySearch.value;
+  openSearch.value = false;
+};
+const submitSearch = () => {
+  openSearch.value = false;
+  sourceList.value.pagination.pageNum = 1;
+  getList();
+};
+
+getList()
+</script>
+
+<style lang='scss' scoped>
+.tenant {
+  padding: 20px;
+  .delete-btn{
+    margin-top: 10px;
+    margin-left: 25px;
+  }
+}
+.avatar-uploader .avatar {
+  width: 110px;
+  height: 110px;
+  display: block;
+  background-color: black;
+}
+.avatar-uploader .el-upload {
+  border: 1px dashed var(--el-border-color);
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+  transition: var(--el-transition-duration-fast);
+}
+.avatar-uploader .el-upload:hover {
+  border-color: var(--el-color-primary);
+}
+.el-icon.avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 110px;
+  height: 110px;
+  text-align: center;
+  border: 1px dashed var(--el-border-color);
+}
+
+.pic {
+  object-fit: contain;
+  width: 50px;
+  height: 50px;
+  cursor: pointer;
+  vertical-align: middle;
+}
+
+.blessingClass {
+  background-image: url("../../../assets/victoria/sjk.jpg") ;
+  background-size: cover;
+  height: 600px;
+  width: 300px;
+
+  padding:40px 19px;
+
+}
+</style>

+ 293 - 0
src/views/WDLY/blessing/language.vue

@@ -0,0 +1,293 @@
+<template>
+  <div class="tenant">
+    <byTable
+        :source="sourceList.data"
+        :pagination="sourceList.pagination"
+        :config="config"
+        :loading="loading"
+        highlight-current-row
+        :selectConfig="selectConfig"
+        :table-events="{
+          select: select,
+        }"
+        :action-list="[
+        {
+          text: '添加祝福语',
+          action: () => openModal('add'),
+        },
+      ]"
+        @get-list="getList">
+    </byTable>
+
+    <el-dialog z-index="1100" :title="modalType == 'add' ? '添加祝福语' : '编辑祝福语'" v-if="dialogVisible" v-model="dialogVisible" width="800px" v-loading="loading">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
+
+      </byForm>
+
+
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitForm" size="large" :loading="submitLoading">确 定</el-button>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import { ElMessage, ElMessageBox } from "element-plus";
+import byTable from "@/components/byTable/index";
+import byForm from "@/components/byForm/index";
+import {computed, nextTick, reactive, ref} from "vue";
+const { proxy } = getCurrentInstance();
+
+const router = useRouter();
+const loading = ref(false);
+const blessingTypeList = ref([]);
+const submitLoading = ref(false);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 0,
+    pageNum: 1,
+    pageSize: 10,
+  },
+});
+
+let rules = ref({
+  blessingType: [{ required: true, message: "请选择祝福语类型", trigger: "change" }],
+  blessing_content: [{ required: true, message: "请输入祝福内容", trigger: "blur" }],
+});
+let dialogVisible = ref(false);
+let modalType = ref("add");
+const selectConfig = computed(() => {
+  return [
+    {
+      label: "祝福语类型",
+      prop: "blessingType",
+      data: blessingTypeList.value
+    },
+  ]});
+
+const config = computed(() => {
+  return [
+
+    {
+      attrs: {
+        label: "祝福语类型",
+        prop: "blessingType",
+        width: '240',
+        align: "center"
+      },
+      render(type) {
+        return proxy.dictValueLabel(type, blessingTypeList.value);
+      },
+    },
+    {
+      attrs: {
+        label: "祝福内容",
+        prop: "blessingContent",
+        align: "center"
+      },
+    },
+    {
+      attrs: {
+        label: "操作",
+        width: "120",
+        align: "right",
+      },
+      renderHTML(row) {
+        return [
+          {
+            attrs: {
+              label: "修改",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              getDtl(row);
+            },
+          },
+          {
+            attrs: {
+              label: "删除",
+              type: "danger",
+              text: true,
+            },
+            el: "button",
+            click() {
+              ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning",
+              }).then(() => {
+
+              });
+            },
+          },
+        ];
+      },
+    },
+  ];
+});
+
+let formData = reactive({
+  data: {
+    coverList:[],
+    audioList:[],
+  },
+});
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+});
+const byform = ref(null);
+
+const formConfig = computed(() => {
+  return [
+
+    {
+      type: "select",
+      prop: "blessingType",
+      label: "祝福语类型",
+      data: blessingTypeList.value,
+      required: true,
+    },
+    {
+      type: "input",
+      itemType: "textarea",
+      prop: "blessingContent",
+      label: "祝福内容",
+      required: true,
+    },
+  ];
+});
+
+const getDictlist = async () => {
+  proxy
+      .getDictOne([
+        "blessing_type"
+      ])
+      .then((res) => {
+        blessingTypeList.value = res["blessing_type"].map((x) => ({
+          label: x.dictValue,
+          value: x.dictKey,
+        }));
+      });
+};
+
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy.post("/blessingLanguage/page", sourceList.value.pagination).then((res) => {
+    sourceList.value.data = res.rows;
+    sourceList.value.pagination.total = res.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
+};
+
+const openModal = () => {
+  dialogVisible.value = true;
+  modalType.value = "add";
+  formData.data = {
+    content:'',
+  };
+};
+const selection = ref({
+  data: [],
+});
+const select = (_selection, row) => {
+  selection.value.data = _selection;
+};
+
+const getDtl = (row) => {
+  modalType.value = "edit";
+  proxy.post("/blessingLanguage/detail", { id: row.id }).then((res) => {
+    formData.data = res;
+    dialogVisible.value = true;
+  });
+};
+
+
+const submitForm = () => {
+  byform.value.handleSubmit(() => {
+    submitLoading.value = true;
+    proxy.post("/blessingLanguage/" + modalType.value, formData.data).then(
+        () => {
+          ElMessage({
+            message: modalType.value == "add" ? "添加成功" : "编辑成功",
+            type: "success",
+          });
+          dialogVisible.value = false;
+          submitLoading.value = false;
+          getList();
+        },
+        (err) => {
+          console.log(err);
+          submitLoading.value = false;
+        }
+    );
+  });
+};
+
+
+getDictlist()
+getList()
+</script>
+
+<style lang='scss' scoped>
+.tenant {
+  padding: 20px;
+  .delete-btn{
+    margin-top: 10px;
+    margin-left: 25px;
+  }
+}
+.avatar-uploader .avatar {
+  width: 110px;
+  height: 110px;
+  display: block;
+  background-color: black;
+}
+.avatar-uploader .el-upload {
+  border: 1px dashed var(--el-border-color);
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+  transition: var(--el-transition-duration-fast);
+}
+.avatar-uploader .el-upload:hover {
+  border-color: var(--el-color-primary);
+}
+.el-icon.avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 110px;
+  height: 110px;
+  text-align: center;
+  border: 1px dashed var(--el-border-color);
+}
+
+.pic {
+  object-fit: contain;
+  width: 50px;
+  height: 50px;
+  cursor: pointer;
+  vertical-align: middle;
+}
+
+.blessingClass {
+  background-image: url("../../../assets/victoria/sjk.jpg") ;
+  background-size: cover;
+  height: 600px;
+  width: 300px;
+
+  padding:40px 19px;
+
+}
+</style>

+ 438 - 0
src/views/WDLY/jd/backOrder/index.vue

@@ -0,0 +1,438 @@
+<template>
+    <div class="tenant">
+        <byTable
+                :source="sourceList.data"
+                :pagination="sourceList.pagination"
+                :config="config"
+                :loading="loading"
+                highlight-current-row
+                :selectConfig="selectConfig"
+                :table-events="{
+                    select: select,
+                }"
+                :action-list="[]"
+                @get-list="getList"
+                @moreSearch="() => (queryDialogVisible = true)"
+        >
+        </byTable>
+        <!--详情-->
+        <el-dialog z-index="1100" title="退货单详情" v-if="dialogVisible" v-model="formData.data" width="1500px" v-loading="loading">
+            <el-descriptions title="基础信息" />
+            <el-form label-width="auto" :rules="rules">
+                <el-row>
+                    <el-col :span="8">
+                        <el-form-item label="退货单号:" :span="8">
+                            {{formData.data.returnId}}
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="供应商名称:" :span="8">
+                            {{formData.data.providerName}}
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="创建日期:" :span="8">
+                            {{formData.data.createDate}}
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row>
+                    <el-col :span="8">
+                        <el-form-item label="退货地配送中心名称:" :span="8">
+                            {{formData.data.fromDeliverCenterName}}
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="目的地配送中心名称:" :span="8">
+                            {{formData.data.toDeliverCenterName}}
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="退货单状态名称:" :span="8">
+                            {{formData.data.returnStateName}}
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row>
+                    <el-col :span="8">
+                        <el-form-item label="退货总数量:" :span="8">
+                            {{formData.data.totalNum}}
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="退货总金额:" :span="8">
+                            {{formData.data.totalPrice}}
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="商品库房名称:" :span="8">
+                            {{formData.data.stockName}}
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row>
+                    <el-col :span="8">
+                        <el-form-item label="退货地仓库地址:" :span="8">
+                            {{formData.data.wareHouseAddress}}
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="仓储联系人电话:" :span="8">
+                            {{formData.data.wareHouseCell}}
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="仓储联系人:" :span="8">
+                            {{formData.data.wareHouseContact}}
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row>
+                    <el-col :span="8">
+                        <el-form-item label="退货单出库时间:" :span="8">
+                            {{formData.data.outStoreRoomDate}}
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="退货单品种数:" :span="8">
+                            {{formData.data.wareVariety}}
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="退货结算状态名称:" :span="8">
+                            {{formData.data.balanceStateName}}
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row>
+                    <el-col :span="8">
+                        <el-form-item label="退货单结算时间:" :span="8">
+                            {{formData.data.balanceDate}}
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row>
+                    <el-descriptions title="退货单明细" />
+                    <el-table :data="formData.data.jdBackDetailsList" stripe style="width: 100%">
+                        <!--            <el-table stripe style="width: 100%">-->
+                        <el-table-column prop="wareId" label="京东商品编号" width="180">
+                            <template #default="scope">
+                                <span :style="scope.row.productName=='' || scope.row.productName == undefined || scope.row.productName == 'undefined'?'color: red':''">{{scope.row.wareId}}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column prop="wareName" label="京东商品名称">
+                            <template #default="scope">
+                                <span :style="scope.row.productName=='' || scope.row.productName == undefined || scope.row.productName == 'undefined'?'color: red':''">{{scope.row.wareName}}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column prop="brandName" label="京东品牌名称"/>
+                        <el-table-column prop="productName" label="产品名称" />
+                        <el-table-column prop="returnsPrice" label="申请退货价格"/>
+                        <el-table-column prop="returnsNum" label="申请退货数量" />
+                        <el-table-column prop="factNum" label="实际退货数量" />
+                        <el-table-column prop="totalPrice" label="退货总金额" />
+                    </el-table>
+                </el-row>
+            </el-form>
+            <template #footer>
+                <el-button @click="dialogVisible = false" size="large">取 消</el-button>
+            </template>
+        </el-dialog>
+
+        <!--高级搜索-->
+        <el-dialog
+                :title="'高级检索'"
+                v-model="queryDialogVisible"
+                width="500px"
+                destroy-on-close
+        >
+            <el-form :model="sourceList.pagination" label-width="100px" label-position="top" >
+                <el-form-item label="退货单号">
+                    <el-input v-model="sourceList.pagination.returnId" placeholder="请输入退货单号" />
+                </el-form-item>
+            </el-form>
+            <template #footer>
+                <el-button @click="handleReset" size="large">重置</el-button>
+                <el-button @click="handleQuery" type="primary" size="large">搜索</el-button>
+            </template>
+        </el-dialog>
+    </div>
+</template>
+
+<script setup>
+import { ElMessage, ElMessageBox } from "element-plus";
+import byTable from "@/components/byTable/index";
+import byForm from "@/components/byForm/index";
+import {computed, nextTick, reactive, ref} from "vue";
+const { proxy } = getCurrentInstance();
+
+const router = useRouter();
+const loading = ref(false);
+const returnStates = ref([]);
+const submitLoading = ref(false);
+const sourceList = ref({
+    data: [],
+    pagination: {
+        total: 0,
+        pageNum: 1,
+        pageSize: 10,
+    },
+});
+
+let rules = ref({
+});
+let dialogVisible = ref(false);
+let queryDialogVisible = ref(false);
+
+let modalType = ref("add");
+const selectConfig = computed(() => {
+    return [
+        {
+            label: "退货单状态",
+            prop: "returnStateName",
+            data: returnStates.value
+        },
+    ]});
+
+const config = computed(() => {
+    return [
+
+        {
+            attrs: {
+                label: "退货单号",
+                align: "center"
+            },
+            renderHTML(row) {
+                return [
+                    {
+                        attrs: {
+                            label: row.returnId,
+                            type: "primary",
+                            text: true,
+                        },
+                        el: "button",
+                        click() {
+                            getDtl(row);
+                        },
+                    },
+                ];
+            },
+        },
+        {
+            attrs: {
+                label: "创建日期",
+                prop: "createDate",
+                align: "center"
+            },
+        },
+        {
+            attrs: {
+                label: "供应商名称",
+                prop: "providerName",
+                align: "center"
+            },
+        },
+        {
+            attrs: {
+                label: "退货地配送中心名称",
+                prop: "fromDeliverCenterName",
+                align: "center"
+            },
+        },
+        {
+            attrs: {
+                label: "目的地配送中心名称",
+                prop: "toDeliverCenterName",
+                align: "center"
+            },
+        },
+        {
+            attrs: {
+                label: "退货总数量",
+                prop: "totalNum",
+                align: "center"
+            },
+        },
+        {
+            attrs: {
+                label: "退货总金额",
+                prop: "totalPrice",
+                align: "center"
+            },
+        },
+        {
+            attrs: {
+                label: "退货单出库时间",
+                prop: "outStoreRoomDate",
+                align: "center"
+            },
+        },
+        {
+            attrs: {
+                label: "退货单品种数",
+                prop: "wareVariety",
+                align: "center"
+            },
+        },
+        {
+            attrs: {
+                label: "是否确认",
+                prop: "businessStatus",
+                align: "center",
+            },
+            render(value) {
+                return value == '1' ? "已确认" : "未确认";
+            },
+        },
+        {
+            attrs: {
+                label: "操作",
+                width: "300",
+                align: "right",
+            },
+            renderHTML(row) {
+                return [
+                    {
+                        attrs: {
+                            label: "详情",
+                            type: "primary",
+                            text: true,
+                        },
+                        el: "button",
+                        click() {
+                            getDtl(row);
+                        },
+                    },
+                    row.businessStatus!=1?
+                        {
+                            attrs: {
+                                label: "退货单确认",
+                                type: "danger",
+                                text: true,
+                            },
+                            el: "button",
+                            click() {
+                                ElMessageBox.confirm("是否确认当前退货单?", "提示", {
+                                    confirmButtonText: "确定",
+                                    cancelButtonText: "取消",
+                                    type: "warning",
+                                }).then(() => {
+                                    confirmBusinessStatus(row);
+                                });
+                            },
+                        }
+                        :{},
+                ];
+            },
+        },
+    ];
+});
+
+let formData = reactive({
+    data: {
+        coverList:[],
+        audioList:[],
+    },
+});
+const formOption = reactive({
+    inline: true,
+    labelWidth: 100,
+    itemWidth: 100,
+    rules: [],
+});
+
+
+const getDictlist = async () => {
+    proxy
+        .getDictOne([
+            "jd_return_states"
+        ])
+        .then((res) => {
+            returnStates.value = res["jd_return_states"].map((x) => ({
+                label: x.dictValue,
+                value: x.dictValue,
+            }));
+        });
+};
+
+const getList = async (req) => {
+    sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+    loading.value = true;
+    proxy.post("/jdBack/page", sourceList.value.pagination).then((res) => {
+        sourceList.value.data = res.rows;
+        sourceList.value.pagination.total = res.total;
+        setTimeout(() => {
+            loading.value = false;
+        }, 200);
+    });
+};
+
+const openModal = () => {
+    dialogVisible.value = true;
+    modalType.value = "add";
+    formData.data = {
+        content:'',
+    };
+};
+const selection = ref({
+    data: [],
+});
+const select = (_selection, row) => {
+    selection.value.data = _selection;
+};
+
+const getDtl = (row) => {
+    modalType.value = "edit";
+    proxy.post("/jdBack/detail", { id: row.id }).then((res) => {
+        formData.data = res;
+        dialogVisible.value = true;
+    });
+};
+
+
+const confirmBusinessStatus = (row) => {
+    let businessStatus = row.businessStatus=='1' ? 0 : 1;
+
+    proxy.post("/jdBack/confirmBusinessStatus", { id: row.id, businessStatus: businessStatus }).then(
+        () => {
+            ElMessage({
+                message: "确认成功",
+                type: "success",
+            });
+            dialogVisible.value = false;
+            submitLoading.value = false;
+            getList();
+        },
+        (err) => {
+            console.log(err);
+            submitLoading.value = false;
+        }
+    );
+}
+
+
+//高级搜索
+const handleReset = () => {
+    sourceList.value.pagination = {
+        pageNum: sourceList.value.pagination.pageNum,
+        pageSize: sourceList.value.pagination.pageSize,
+        arr: [],
+    };
+    handleQuery();
+};
+
+const handleQuery = () => {
+    if (sourceList.value.pagination.arr && sourceList.value.pagination.arr.length > 1) {
+        sourceList.value.pagination.purchaseStartTime = sourceList.value.pagination.arr[0];
+        sourceList.value.pagination.purchaseEndTime = sourceList.value.pagination.arr[1];
+    }
+    queryDialogVisible.value = false;
+    getList();
+};
+
+getDictlist()
+getList()
+</script>
+
+<style lang='scss' scoped>
+</style>

+ 720 - 0
src/views/WDLY/jd/order/index.vue

@@ -0,0 +1,720 @@
+<template>
+    <div class="tenant">
+        <byTable
+                :source="sourceList.data"
+                :pagination="sourceList.pagination"
+                :config="config"
+                :loading="loading"
+                highlight-current-row
+                :selectConfig="selectConfig"
+                :table-events="{
+                    select: select,
+                }"
+                :action-list="[]"
+                @get-list="getList"
+                @moreSearch="() => (queryDialogVisible = true)"
+        >
+        </byTable>
+        <!--回告-->
+        <el-dialog :z-index="1500" title="采购单回告" v-if="tellDialogVisible" v-model="formData.data" width="1500px" v-loading="loading">
+            <el-descriptions title="基础信息" />
+            <el-form label-width="auto" :rules="rules">
+                <el-row>
+                    <el-col :span="8">
+                        <el-form-item label="采购单号:" :span="8">
+                            {{formData.data.orderId}}
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="配送中心:" :span="8">
+                            {{formData.data.deliverCenterName}}
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="入库时间:" :span="8">
+                            {{formData.data.storageTime}}
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row>
+                    <el-col :span="8">
+                        <el-form-item label="预计送货时间:" :span="8">
+                            <el-date-picker
+                                    v-model="formData.data.deliveryTime"
+                                    type="datetime"
+                                    format="YYYY-MM-DD HH:mm:ss"
+                                    value-format="YYYY-MM-DD HH:mm:ss"
+                                    placeholder="请选择预计送货时间"
+                            />
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row>
+                    <el-descriptions title="采购单明细" />
+                    <el-table :data="formData.data.jdOrderDetailsList" stripe style="width: 100%">
+        <!--            <el-table stripe style="width: 100%">-->
+                        <el-table-column prop="wareId" label="京东商品编号" width="180">
+                            <template #default="scope">
+                                <span :style="scope.row.productName=='' || scope.row.productName == undefined || scope.row.productName == 'undefined'?'color: red':''">{{scope.row.wareId}}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column prop="wareName" label="京东商品名称">
+                            <template #default="scope">
+                                <span :style="scope.row.productName=='' || scope.row.productName == undefined || scope.row.productName == 'undefined'?'color: red':''">{{scope.row.wareName}}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column prop="productName" label="产品名称" />
+                        <el-table-column prop="originalNum" label="采购数量" />
+                        <el-table-column prop="confirmNum" label="确认数量" >
+                            <template v-slot="scope">
+                                <el-form-item :rules="rules['confirmNum']">
+                                    <el-input-number :min="0" :step="1" :max="scope.row.originalNum" v-model="scope.row.confirmNum" placeholder="请输入确认数量"/>
+                                </el-form-item>
+                            </template>
+                        </el-table-column>
+                        <el-table-column prop="purchasePrice" label="采购价" />
+                        <el-table-column prop="nonDeliveryReason" label="不满足发货原因">
+                            <template v-slot="scope">
+                                <el-form-item :rules="rules['nonDeliveryReason']">
+                                    <el-input v-model="scope.row.nonDeliveryReason" placeholder="请输入不满足发货原因" />
+                                </el-form-item>
+                            </template>
+                        </el-table-column>
+                    </el-table>
+                </el-row>
+            </el-form>
+            <template #footer>
+                <el-button @click="tellDialogVisible = false" size="large">取 消</el-button>
+                <el-button type="primary" @click="submitForm" size="large" :loading="submitLoading">采购单回告</el-button>
+            </template>
+        </el-dialog>
+
+        <!--详情-->
+        <el-dialog :z-index="1500" title="采购单详情" v-if="dialogVisible" v-model="formData.data" width="1500px" v-loading="loading">
+            <el-descriptions title="基础信息" />
+            <el-form label-width="auto" :rules="rules">
+                <el-row>
+                    <el-col :span="8">
+                        <el-form-item label="京东订单号:" :span="8">
+                            {{formData.data.orderId}}
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="订购时间:" :span="8" label-position="right">
+                            {{formData.data.createdDate}}
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="供应商名称:" :span="8">
+                            {{formData.data.providerName}}
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row>
+                    <el-col :span="8">
+                        <el-form-item label="采购总金额:" :span="8">
+                            {{formData.data.totalPrice}}
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="配送中心名称:" :span="8">
+                            {{formData.data.deliverCenterName}}
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="采购员姓名:" :span="8">
+                            {{formData.data.purchaserName}}
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row>
+                    <el-col :span="8">
+                        <el-form-item label="删除状态:" :span="8">
+                            {{formData.data.statusName}}
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="是否EPT定制:" :span="8">
+                            {{formData.data.isEptCustomized?'是':'否'}}
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="订单状态:" :span="8">
+                            {{formData.data.stateName}}
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row>
+                    <el-col :span="8">
+                        <el-form-item label="完成时间:" :span="8">
+                            {{formData.data.completedDate}}
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="账期:" :span="8">
+                            {{formData.data.accountPeriod}}
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="收货负责人:" :span="8">
+                            {{formData.data.receiverName}}
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row>
+                    <el-col :span="8">
+                        <el-form-item label="收货电话:" :span="8">
+                            {{formData.data.warehousePhone}}
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="详细地址:" :span="8">
+                            {{formData.data.address}}
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="采购类型:" :span="8">
+                            {{formData.data.orderTypeName}}
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row>
+                    <el-col :span="8">
+                        <el-form-item label="订单属性:" :span="8">
+                            {{formData.data.orderAttributeName}}
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="回告状态:" :span="8">
+                            {{formData.data.confirmStateName}}
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="顾客单号:" :span="8">
+                            {{formData.data.customerOrderid}}
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row>
+                    <el-col :span="8">
+                        <el-form-item label="品种数量:" :span="8">
+                            {{formData.data.wareVariety}}
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="预计到货时间:" :span="8">
+                            {{formData.data.deliveryTime}}
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="是否可回告:" :span="8">
+                            {{formData.data.isCanConfirm?"可回告":"不可回告"}}
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row>
+                    <el-col :span="8">
+                        <el-form-item label="是否有差异:" :span="8">
+                            {{formData.data.isExistActualNumDif=='0'?"存在差异":"无差异"}}
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="是否已结算:" :span="8">
+                            {{formData.data.balanceStatus?"已结算":"未结算"}}
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="入库时间:" :span="8">
+                            {{formData.data.storageTime}}
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row>
+                    <el-col :span="8">
+                        <el-form-item label="TC转运标识:" :span="8">
+                            {{formData.data.tcFlagName}}
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="预约时间:" :span="8">
+                            {{formData.data.bookTime}}
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row>
+                    <el-descriptions title="采购单明细" />
+                    <el-table :data="formData.data.jdOrderDetailsList" stripe style="width: 100%">
+                        <!--            <el-table stripe style="width: 100%">-->
+                        <el-table-column prop="wareId" label="京东商品编号" width="180">
+                            <template #default="scope">
+                                <span :style="scope.row.productName=='' || scope.row.productName == undefined || scope.row.productName == 'undefined'?'color: red':''">{{scope.row.wareId}}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column prop="wareName" label="京东商品名称">
+                            <template #default="scope">
+                                <span :style="scope.row.productName=='' || scope.row.productName == undefined || scope.row.productName == 'undefined'?'color: red':''">{{scope.row.wareName}}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column prop="productName" label="产品名称" />
+                        <el-table-column prop="deliverCenterName" label="配送中心名称" width="180" />
+                        <el-table-column prop="purchasePrice" label="采购价" />
+                        <el-table-column prop="originalNum" label="原始采购数量" />
+                        <el-table-column prop="confirmNum" label="回告数量" />
+                        <el-table-column prop="actualNum" label="实收数量" />
+                        <el-table-column prop="nonDeliveryReason" label="不满足原因" />
+                        <el-table-column prop="totalPrice" label="采购总金额" />
+                        <el-table-column prop="storeName" label="库房名称" />
+                        <el-table-column prop="wareProperty" label="EPT采购单定制相关信息" />
+                    </el-table>
+                </el-row>
+            </el-form>
+            <template #footer>
+                <el-button @click="dialogVisible = false" size="large">取 消</el-button>
+            </template>
+        </el-dialog>
+
+        <!--高级搜索-->
+        <el-dialog
+                :title="'高级检索'"
+                v-model="queryDialogVisible"
+                width="500px"
+                destroy-on-close
+        >
+            <el-form :model="sourceList.pagination" label-width="100px" label-position="top" >
+                <el-form-item label="采购单号">
+                    <el-input v-model="sourceList.pagination.orderId" placeholder="请输入采购单号" />
+                </el-form-item>
+                <el-form-item label="京东商品编号">
+                    <el-input v-model="sourceList.pagination.wareId" placeholder="请输入京东商品编号" />
+                </el-form-item>
+            </el-form>
+            <template #footer>
+                <el-button @click="handleReset" size="large">重置</el-button>
+                <el-button @click="handleQuery" type="primary" size="large">搜索</el-button>
+            </template>
+        </el-dialog>
+    </div>
+</template>
+
+<script setup>
+import { ElMessage, ElMessageBox } from "element-plus";
+import byTable from "@/components/byTable/index";
+import byForm from "@/components/byForm/index";
+import {computed, nextTick, reactive, ref} from "vue";
+const { proxy } = getCurrentInstance();
+
+const router = useRouter();
+const loading = ref(false);
+const deliveryCenter = ref([]);
+const confirmState = ref([]);
+const orderState = ref([]);
+
+const blessingTypeList = ref([]);
+const submitLoading = ref(false);
+const sourceList = ref({
+    data: [],
+    pagination: {
+        total: 0,
+        pageNum: 1,
+        pageSize: 10,
+    },
+});
+
+let rules = ref({
+    deliverCenterId: [{ required: true, message: "请选择配送中心", trigger: "blur" }],
+    nonDeliveryReason: [{ required: true, message: "请输入不满足发货原因", trigger: "blur" }],
+    confirmNum: [{ required: true, message: "请输入确认数量", trigger: "blur" }]
+});
+
+const queryDialogVisible = ref(false);
+const dialogVisible = ref(false);
+const tellDialogVisible = ref(false);
+
+let modalType = ref("add");
+const selectConfig = computed(() => {
+    return [
+        {
+            label: "订单状态",
+            prop: "state",
+            data: orderState.value
+        },
+        {
+            label: "回告状态",
+            prop: "confirmState",
+            data: confirmState.value
+        },
+        {
+            label: "是否确认",
+            prop: "businessStatus",
+            data: [
+                {
+                    label: "未确认",
+                    value: "0",
+                },
+                {
+                    label: "已确认",
+                    value: "1",
+                },
+                {
+                    label: "已回告",
+                    value: "2",
+                },
+            ],
+        },
+        {
+            label: "是否可回告",
+            prop: "isCanConfirm",
+            data: [
+                {
+                    label: "可回告",
+                    value: true,
+                },
+                {
+                    label: "不可回告",
+                    value: false,
+                },
+            ],
+        },
+    ]});
+
+const config = computed(() => {
+    return [
+
+        {
+            attrs: {
+                label: "京东订单号",
+                align: "center",
+            },
+            renderHTML(row) {
+                return [
+                    {
+                        attrs: {
+                            label: row.orderId,
+                            type: "primary",
+                            text: true,
+                        },
+                        el: "button",
+                        click() {
+                            getDtl(row);
+                        },
+                    },
+                ];
+            },
+        },
+        {
+            attrs: {
+                label: "订购时间",
+                prop: "createdDate",
+                align: "center"
+            },
+        },
+        {
+            attrs: {
+                label: "供应商名称",
+                prop: "providerName",
+                align: "center"
+            },
+        },
+        {
+            attrs: {
+                label: "采购总金额",
+                prop: "totalPrice",
+                align: "center"
+            },
+        },
+        {
+            attrs: {
+                label: "配送中心名称",
+                prop: "deliverCenterName",
+                align: "center"
+            },
+        },
+        {
+            attrs: {
+                label: "订单状态",
+                prop: "state",
+                align: "center"
+            },
+            render(value) {
+                return proxy.dictValueLabel(value, orderState.value);
+            }
+        },
+        {
+            attrs: {
+                label: "回告状态",
+                prop: "confirmState",
+                align: "center"
+            },
+            render(value) {
+                return proxy.dictValueLabel(value, confirmState.value);
+            }
+        },
+        {
+            attrs: {
+                label: "是否可回告",
+                prop: "isCanConfirm",
+                align: "center"
+            },
+            render(value) {
+                return value?"可回告":"不可回告"
+            }
+        },
+        {
+            attrs: {
+                label: "详细地址",
+                prop: "address",
+                align: "center"
+            },
+        },
+        {
+            attrs: {
+                label: "采购类型",
+                prop: "orderTypeName",
+                align: "center"
+            },
+        },
+        {
+            attrs: {
+                label: "是否确认",
+                prop: "businessStatus",
+                align: "center",
+            },
+            render(value) {
+                let label = "未确认";
+                if(value == '1'){
+                    label = "已确认";
+                }else if (value == '2'){
+                    label = "已回告";
+                }
+                return label;
+            },
+        },
+        {
+            attrs: {
+                label: "操作",
+                width: "300",
+                align: "right",
+            },
+            renderHTML(row) {
+                return [
+                    {
+                        attrs: {
+                            label: "详情",
+                            type: "primary",
+                            text: true,
+                        },
+                        el: "button",
+                        click() {
+                            getDtl(row);
+                        },
+                    },
+                    row.businessStatus==0?
+                        {
+                            attrs: {
+                                label: "采购单确认",
+                                type: "danger",
+                                text: true,
+                            },
+                            el: "button",
+                            click() {
+                                ElMessageBox.confirm("是否确认当前采购单状态?", "提示", {
+                                    confirmButtonText: "确定",
+                                    cancelButtonText: "取消",
+                                    type: "warning",
+                                }).then(() => {
+                                    confirmBusinessStatus(row);
+                                });
+                            },
+                        }
+                        :{},
+                    row.businessStatus==1 && row.isCanConfirm?
+                        {
+                            attrs: {
+                                label: "回告",
+                                type: "danger",
+                                text: true,
+                            },
+                            el: "button",
+                            click() {
+                                getTellDtl(row);
+                            },
+                        }
+                        :{},
+                ];
+            },
+        },
+    ];
+});
+
+let formData = reactive({
+    data: {
+        coverList:[],
+        audioList:[],
+    },
+});
+const formOption = reactive({
+    inline: true,
+    labelWidth: 100,
+    itemWidth: 100,
+    rules: [],
+});
+const byform = ref(null);
+
+const formConfig = computed(() => {
+    return [
+        {
+            type: "input",
+            prop: "orderId",
+            label: "京东订单号",
+            readonly: true
+        },
+        {
+            type: "input",
+            prop: "createdDate",
+            label: "订购时间",
+            readonly: true
+        },
+        {
+            type: "input",
+            label: "采购单明细,应该是个一对多还没弄",
+            readonly: true
+        },
+    ];
+});
+
+const getDictlist = async () => {
+    proxy.getDictOne(["delivery_center", "confirmState", "OrderState"]).then((res) => {
+        deliveryCenter.value = res["delivery_center"].map((x) => ({
+            label: x.dictValue,
+            value: x.dictKey,
+        }));
+        confirmState.value = res["confirmState"].map((x) => ({
+            label: x.dictValue,
+            value: x.dictKey,
+        }));
+        orderState.value = res["OrderState"].map((x) => ({
+            label: x.dictValue,
+            value: x.dictKey,
+        }));
+    });
+};
+
+const getList = async (req) => {
+    sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+    loading.value = true;
+    proxy.post("/jdOrder/page", sourceList.value.pagination).then((res) => {
+        sourceList.value.data = res.rows;
+        sourceList.value.pagination.total = res.total;
+        setTimeout(() => {
+            loading.value = false;
+        }, 200);
+    });
+};
+
+const openModal = () => {
+    dialogVisible.value = true;
+    modalType.value = "add";
+    formData.data = {
+        content:'',
+    };
+};
+const selection = ref({
+    data: [],
+});
+const select = (_selection, row) => {
+    selection.value.data = _selection;
+};
+
+const getDtl = (row) => {
+    modalType.value = "edit";
+    proxy.post("/jdOrder/detail", { id: row.id }).then((res) => {
+        formData.data = res;
+        dialogVisible.value = true;
+    });
+};
+
+const getTellDtl = (row) => {
+    modalType.value = "edit";
+    proxy.post("/jdOrder/detail", { id: row.id }).then((res) => {
+        formData.data = res;
+        tellDialogVisible.value = true;
+    });
+};
+
+
+/**
+ * 确认采购单状态
+ * @param row
+ */
+const confirmBusinessStatus = (row) => {
+    let businessStatus = row.businessStatus=='1' ? 0 : 1;
+    proxy.post("/jdOrder/confirmBusinessStatus", { id: row.id, businessStatus: businessStatus }).then(
+        () => {
+            ElMessage({
+                message: "确认成功",
+                type: "success",
+            });
+            dialogVisible.value = false;
+            submitLoading.value = false;
+            getList();
+        },
+        (err) => {
+            console.log(err);
+            submitLoading.value = false;
+        }
+    );
+}
+
+//订单回告
+const submitForm = () => {
+    ElMessageBox.confirm("是否确认回告当前采购单?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+    }).then(() => {
+        submitLoading.value = true;
+        //TODO 这里应该是订单回告
+        proxy.post("/jdOrder/tellBackOrer", formData.data).then(
+            () => {
+                ElMessage({
+                    message: "回告成功",
+                    type: "success",
+                });
+                tellDialogVisible.value = false;
+                submitLoading.value = false;
+                getList();
+            },
+            (err) => {
+                console.log(err);
+                submitLoading.value = false;
+            }
+        );
+    });
+};
+
+
+//高级搜索
+const handleReset = () => {
+    sourceList.value.pagination = {
+        pageNum: sourceList.value.pagination.pageNum,
+        pageSize: sourceList.value.pagination.pageSize,
+        arr: [],
+    };
+    handleQuery();
+};
+
+const handleQuery = () => {
+    if (sourceList.value.pagination.arr && sourceList.value.pagination.arr.length > 1) {
+        sourceList.value.pagination.purchaseStartTime = sourceList.value.pagination.arr[0];
+        sourceList.value.pagination.purchaseEndTime = sourceList.value.pagination.arr[1];
+    }
+    queryDialogVisible.value = false;
+    getList();
+};
+
+getDictlist()
+getList()
+</script>
+
+<style lang='scss' scoped>
+</style>

+ 1 - 1
vite.config.js

@@ -39,7 +39,7 @@ export default defineConfig(({
       proxy: {
         // https://cn.vitejs.dev/config/#server-proxy
         '/dev-api': {
-          target: 'http://139.9.102.170:10006/test-api',
+          target: 'http://127.0.0.1:9898',
           // 正式地址
           // target: "http://139.9.102.170/prod-api",
           changeOrigin: true,