cz il y a 1 an
Parent
commit
92b99d165f

+ 2 - 0
.env.development

@@ -10,3 +10,5 @@ VITE_APP_BASE_API = '/dev-api'
 VITE_APP_WS_API = '/test-api'
 
 VITE_APP_IP = '139.9.102.170'
+
+VITE_APP_WS_API = ':9901/test-api'

+ 3 - 1
.env.production

@@ -12,4 +12,6 @@ VITE_APP_WS_API = '/prod-api'
 # 是否在打包时开启压缩,支持 gzip 和 brotli
 VITE_BUILD_COMPRESS = gzip
 
-VITE_APP_IP = '139.9.102.170'
+VITE_APP_IP = '139.9.102.170'
+
+VITE_APP_WS_API = ':9900/prod-api'

+ 3 - 1
.env.staging

@@ -12,4 +12,6 @@ VITE_APP_WS_API = '/test-api'
 # 是否在打包时开启压缩,支持 gzip 和 brotli
 VITE_BUILD_COMPRESS = gzip
 
-VITE_APP_IP = '139.9.102.170'
+VITE_APP_IP = '139.9.102.170'
+
+VITE_APP_WS_API = ':9901/test-api'

+ 182 - 48
src/components/headerBar/header-bar.vue

@@ -3,47 +3,97 @@
     <header>
       <ul class="nav">
         <!-- <div class="logo">ByteSailing</div> -->
-        <div class="logo" style="display: flex; align-items: center; justify-content: center">
+        <div
+          class="logo"
+          style="display: flex; align-items: center; justify-content: center"
+        >
           <img v-if="!logoUrl" :src="'/img/logo2.png'" />
-          <el-image v-else style="width: 120px; height: 30px" :src="logoUrl" fit="scale-down" />
+          <el-image
+            v-else
+            style="width: 120px; height: 30px"
+            :src="logoUrl"
+            fit="scale-down"
+          />
         </div>
-        <li class="header-bar-hover-warp nav-li" :class="isChildMenu ? 'active' : ''">
+        <li
+          class="header-bar-hover-warp nav-li"
+          :class="isChildMenu ? 'active' : ''"
+        >
           <div @click.stop="isChildMenu = !isChildMenu" class="menu-modal">
-            <i class="iconfont icon-icomx_gongndh" style="margin: 0 5px 0 0"></i>
-            {{$t('header.functionGuide')}}
-            <i class="iconfont icon-iconm_xialan1" style="margin: 0 0 0 3px"></i>
+            <i
+              class="iconfont icon-icomx_gongndh"
+              style="margin: 0 5px 0 0"
+            ></i>
+            {{ $t("header.functionGuide") }}
+            <i
+              class="iconfont icon-iconm_xialan1"
+              style="margin: 0 0 0 3px"
+            ></i>
           </div>
         </li>
         <div class="auto-list">
-          <li class="nav-li" @click="commonsBannerToRouter(i)" v-for="(i, index) in commonsRouterList" v-show="index < autoListChidrenNum - 1" :key="i.id">
+          <li
+            class="nav-li"
+            @click="commonsBannerToRouter(i)"
+            v-for="(i, index) in commonsRouterList"
+            v-show="index < autoListChidrenNum - 1"
+            :key="i.id"
+          >
             <span>{{ i.menuName }}</span>
           </li>
-          <li class="nav-li more-box" v-show="commonsRouterList.length > autoListChidrenNum - 1">
-            {{$t('header.more')}}
+          <li
+            class="nav-li more-box"
+            v-show="commonsRouterList.length > autoListChidrenNum - 1"
+          >
+            {{ $t("header.more") }}
             <i class="iconfont icon-iconm_xialan1"></i>
             <ul class="more-list">
-              <li v-for="(i, index) in commonsRouterList" v-show="index >= autoListChidrenNum - 1" :key="i.id">
+              <li
+                v-for="(i, index) in commonsRouterList"
+                v-show="index >= autoListChidrenNum - 1"
+                :key="i.id"
+              >
                 <span @click="commonsBannerToRouter(i)">{{ i.menuName }}</span>
               </li>
             </ul>
           </li>
         </div>
-        <div class="header-bar-warp" v-if="isChildMenu" @click.stop="isChildMenu = false">
+        <div
+          class="header-bar-warp"
+          v-if="isChildMenu"
+          @click.stop="isChildMenu = false"
+        >
           <div class="header-bar-hover" @click.stop>
             <div class="header-bar-hover-content">
               <div class="left-banner">
                 <!-- :style="leftBanerType == 2 ? 'color:#0084ff' : ''" -->
-                <div class="first-order" @click="leftBanerType = 2" >
-                  <i class="iconfont icon-iconm_changycd" style="position: relative;top:-1px;"></i>
-                  {{$t('header.commonFunctions')}}
+                <div class="first-order" @click="leftBanerType = 2">
+                  <i
+                    class="iconfont icon-iconm_changycd"
+                    style="position: relative; top: -1px"
+                  ></i>
+                  {{ $t("header.commonFunctions") }}
                 </div>
                 <div class="first-order">
-                  <i class="iconfont icon-iconm_gongncd" style="position: relative;top:-1px;"></i>
-                  {{$t('header.functionMenu')}}
+                  <i
+                    class="iconfont icon-iconm_gongncd"
+                    style="position: relative; top: -1px"
+                  ></i>
+                  {{ $t("header.functionMenu") }}
                 </div>
                 <ul>
-                  <li :class="menuName == i.menuName ? 'active' : ''" @click="openLeftBaner(i, index)" v-for="(i, index) in sidebarRoutersCopy" :key="i.name" v-show="i.type == 1 && i.status == '0'">
-                    {{ i.menuName }}
+                  <li
+                    :class="menuName == i.menuName ? 'active' : ''"
+                    @click="openLeftBaner(i, index)"
+                    v-for="(i, index) in sidebarRoutersCopy"
+                    :key="i.name"
+                    v-show="i.type == 1 && i.status == '0'"
+                  >
+                    <i
+                      :class="'iconfont icon-' + i.icon"
+                      style="position: relative; top: -1px"
+                    ></i
+                    >{{ i.menuName }}
                   </li>
                 </ul>
                 <!-- <div class="first-order">
@@ -70,49 +120,104 @@
 								</ul> -->
                 <ul class="second-level">
                   <div v-for="(i, index) in activeLeftData" :key="index">
-                    <li v-if="i.isNone" class="menu-ul" style="cursor: auto"></li>
+                    <li
+                      v-if="i.isNone"
+                      class="menu-ul"
+                      style="cursor: auto"
+                    ></li>
                     <li class="menu-title" v-else-if="i.isTitle">
-                      <a v-if="i.icon && i.icon !== '#'" :class="'iconfont icon-' + i.icon" style="margin-right: 4px"></a><span>{{ i.menuName }}</span>
+                      <a
+                        v-if="i.icon && i.icon !== '#'"
+                        :class="'iconfont icon-' + i.icon"
+                        style="margin-right: 4px"
+                      ></a
+                      ><span>{{ i.menuName }}</span>
                     </li>
-                    <li v-else class="menu-ul" @click="commonsBannerToRouter(i)" style="cursor: pointer">
+                    <li
+                      v-else
+                      class="menu-ul"
+                      @click="commonsBannerToRouter(i)"
+                      style="cursor: pointer; display: flex"
+                    >
+                      <a
+                        :class="'iconfont icon-' + i.icon"
+                        style="
+                          margin-right: 4px;
+                          width: 20px;
+                          min-height: 20px;
+                          display: block;
+                        "
+                      ></a>
                       <span>{{ i.menuName }}</span>
                     </li>
                   </div>
                 </ul>
               </div>
               <div class="menu-warp" v-show="leftBanerType == 2">
-                <div class="first-order-title">{{$t('header.commonFunctions')}}</div>
+                <div class="first-order-title">
+                  {{ $t("header.commonFunctions") }}
+                </div>
                 <div class="commons-warp">
                   <div>
-                    <div class="header-button-box cp" v-for="(i, index) in commonsRouterList" :key="i.name" @click="commonsBannerToRouter(i)">
+                    <div
+                      class="header-button-box cp"
+                      v-for="(i, index) in commonsRouterList"
+                      :key="i.name"
+                      @click="commonsBannerToRouter(i)"
+                    >
                       <span>{{ i.menuName }}</span>
-                      <div class="right-icon" @click.stop="deleteCommonsRouter(i, index)">
+                      <div
+                        class="right-icon"
+                        @click.stop="deleteCommonsRouter(i, index)"
+                      >
                         <!-- <el-icon color="#46A6FF"><CirclePlus /></el-icon> -->
                         <el-icon color="#BBBBBB" v-show="isEidtType">
                           <Close />
                         </el-icon>
                       </div>
                     </div>
-                    <div class="header-add-button-box" v-if="!isEidtType" @click="isEidtType = true">
+                    <div
+                      class="header-add-button-box"
+                      v-if="!isEidtType"
+                      @click="isEidtType = true"
+                    >
                       <el-icon color="#46A6FF">
                         <CirclePlus />
                       </el-icon>
-                      {{$t('header.edit')}}
+                      {{ $t("header.edit") }}
                     </div>
                   </div>
                 </div>
-                <div class="first-order-title" v-if="isEidtType">{{$t('header.toAdd')}}</div>
+                <div class="first-order-title" v-if="isEidtType">
+                  {{ $t("header.toAdd") }}
+                </div>
                 <div class="all-menu-warp" v-if="isEidtType">
-                  <div v-for="(i, index) in sidebarRoutersCopy" :key="i.name" v-show="i.type === 1">
-                    <div class="all-menu-title" v-for="(j, jindex) in i.children" :key="j.name">
+                  <div
+                    v-for="(i, index) in sidebarRoutersCopy"
+                    :key="i.name"
+                    v-show="i.type === 1"
+                  >
+                    <div
+                      class="all-menu-title"
+                      v-for="(j, jindex) in i.children"
+                      :key="j.name"
+                    >
                       <div class="title">
                         {{ j.menuName }}
                       </div>
                       <div class="all-menu-lists">
-                        <div class="header-button-box" v-for="(n, nindex) in j.children" v-show="n.visible == '0'" :key="n.name">
+                        <div
+                          class="header-button-box"
+                          v-for="(n, nindex) in j.children"
+                          v-show="n.visible == '0'"
+                          :key="n.name"
+                        >
                           <span>{{ n.menuName }}</span>
 
-                          <div class="right-icon" @click="addCommonsRouter(index, jindex, nindex, n)">
+                          <div
+                            class="right-icon"
+                            @click="addCommonsRouter(index, jindex, nindex, n)"
+                          >
                             <el-icon color="#46A6FF">
                               <CirclePlus />
                             </el-icon>
@@ -123,8 +228,12 @@
                   </div>
                 </div>
                 <div class="btn-warp" v-if="isEidtType">
-                  <el-button type="" @click="isEidtType = false">取消</el-button>
-                  <el-button type="primary" @click="userMenuEdit">保存</el-button>
+                  <el-button type="" @click="isEidtType = false"
+                    >取消</el-button
+                  >
+                  <el-button type="primary" @click="userMenuEdit"
+                    >保存</el-button
+                  >
                 </div>
               </div>
             </div>
@@ -133,26 +242,40 @@
       </ul>
       <div class="fr">
         <!-- :value="12" -->
-        <el-badge :value="badgeNum" style="cursor: pointer;" class="badge" @click="noticeTableModal = true">
+        <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">
+        <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>
+                <el-dropdown-item>{{
+                  $t("header.personalCenter")
+                }}</el-dropdown-item>
               </router-link>
               <el-dropdown-item command="setLayout">
-                <span>{{$t('header.layoutSettings')}}</span>
+                <span>{{ $t("header.layoutSettings") }}</span>
               </el-dropdown-item>
               <el-dropdown-item divided command="logout">
-                <span>{{$t('header.logout')}}</span>
+                <span>{{ $t("header.logout") }}</span>
               </el-dropdown-item>
             </el-dropdown-menu>
           </template>
@@ -223,7 +346,7 @@ const addCommonsRouter = (index, jindex, nindex, n) => {
     const element = commonsRouterList.value[i];
     if (element.menuId === n.menuId) {
       ElMessage({
-        message: proxy.t('header.thisDirectoryHasBeenAdded'),
+        message: proxy.t("header.thisDirectoryHasBeenAdded"),
         type: "error",
       });
       return;
@@ -231,13 +354,15 @@ const addCommonsRouter = (index, jindex, nindex, n) => {
   }
   if (n.hidden) {
     ElMessage({
-      message: proxy.t('header.thisDirectoryRequiresAdditionalParameters'),
+      message: proxy.t("header.thisDirectoryRequiresAdditionalParameters"),
       type: "error",
     });
     return;
   }
   commonsRouterList.value.push(n);
-  sidebarRoutersCopy.value[index].children[jindex].children[nindex].isCommonsBanner = true;
+  sidebarRoutersCopy.value[index].children[jindex].children[
+    nindex
+  ].isCommonsBanner = true;
 };
 
 const routerInit = (item) => {
@@ -266,7 +391,12 @@ const routerInit = (item) => {
     const element = arr[i];
     if (element.isTitle) {
       //判断余数加上子项列会不会爆掉
-      if (element.children && element.children.length > 0 && (i % 11) + element.children.length + 1 > 11 && element.children.length < 11) {
+      if (
+        element.children &&
+        element.children.length > 0 &&
+        (i % 11) + element.children.length + 1 > 11 &&
+        element.children.length < 11
+      ) {
         let num = 11 - (i % 11);
         for (let j = 0; j < num; j++) {
           arr.splice(i, 0, { ...element, isNone: true });
@@ -291,11 +421,15 @@ function handleCommand(command) {
 }
 
 function logout() {
-  ElMessageBox.confirm(proxy.t('header.areYouSureYouWantToLogOutAndExitTheSystem'), proxy.t('common.prompt'), {
-    confirmButtonText:  proxy.t('common.confirm'),
-    cancelButtonText: proxy.t('common.cancel'),
-    type: "warning",
-  })
+  ElMessageBox.confirm(
+    proxy.t("header.areYouSureYouWantToLogOutAndExitTheSystem"),
+    proxy.t("common.prompt"),
+    {
+      confirmButtonText: proxy.t("common.confirm"),
+      cancelButtonText: proxy.t("common.cancel"),
+      type: "warning",
+    }
+  )
     .then(() => {
       userStore.logOut().then(() => {
         location.href = "/index";

+ 129 - 57
src/components/notice/index.vue

@@ -50,35 +50,43 @@
             <li
               style="padding-left: 0; border: none"
               @click="
-                pushInfoReq.type = '';
-                getPushInfo();
+                pushInfoReq.whetherFlow = '';
+                getPushInfoInit();
               "
-              :class="pushInfoReq.type == '' ? 'active' : ''"
+              :class="pushInfoReq.whetherFlow === '' ? 'active' : ''"
             >
-              全部({{ pushInfoReq.total }})
+              全部<span v-if="pushInfoReq.whetherFlow === ''"
+                >({{ pushInfoReq.total }})</span
+              >
             </li>
             <li
               @click="
-                pushInfoReq.type = 1;
-                getPushInfo();
+                pushInfoReq.whetherFlow = 1;
+                getPushInfoInit();
               "
-              :class="pushInfoReq.type == 1 ? 'active' : ''"
+              :class="pushInfoReq.whetherFlow === 1 ? 'active' : ''"
             >
-              流程(0)
+              流程<span v-if="pushInfoReq.whetherFlow === 1"
+                >({{ pushInfoReq.total }})</span
+              >
             </li>
             <li
               @click="
-                pushInfoReq.type = 2;
-                getPushInfo();
+                pushInfoReq.whetherFlow = 0;
+                getPushInfoInit();
               "
-              :class="pushInfoReq.type == 2 ? 'active' : ''"
+              :class="pushInfoReq.whetherFlow === 0 ? 'active' : ''"
             >
-              业务(0)
+              业务<span v-if="pushInfoReq.whetherFlow === 0"
+                >({{ pushInfoReq.total }})</span
+              >
             </li>
           </ul>
-          <!-- <div class="more">查看更多&gt;</div> -->
+          <div class="more" @click="toDealWith({ businessType: 'hisMsg' })">
+            查看更多&gt;
+          </div>
         </div>
-        <el-table :data="noticeData" style="width: 100%">
+        <el-table :data="noticeData" style="width: 100%" @row-click="rowClick">
           <el-table-column prop="title" label="标题内容" width="250">
             <template #default="scope">
               <el-tooltip
@@ -87,22 +95,43 @@
                 :content="scope.row.title"
                 placement="top"
               >
-                <span>{{ scope.row.title.slice(0, 12) }}</span
-                ><span v-if="scope.row.title.length > 12">..</span>
+                <div class="noticeData-title">{{ scope.row.title }}</div>
               </el-tooltip>
             </template>
           </el-table-column>
           <el-table-column prop="businessType" label="类型" width="120">
+            <template #default="scope">
+              <span>{{ scope.row.businessType === 0 ? "流程" : "业务" }}</span>
+            </template>
           </el-table-column>
           <el-table-column prop="address" label="操作">
             <template #default="scope">
-              <span style="cursor: pointer" @click="readFn(scope)">未读</span>
+              <span
+                style="cursor: pointer; color: #0084ff"
+                @click.stop="readFn(scope)"
+                >已读</span
+              >
             </template>
           </el-table-column>
         </el-table>
+        <div>
+          <el-pagination
+            style="text-align: center"
+            :page-size="5"
+            layout="prev, pager, next"
+            :current-page="pushInfoReq.pageNum"
+            :total="pushInfoReq.total"
+            @current-change="handlePageChange"
+          />
+        </div>
         <div class="notice-btn-box" style="margin-top: 20px">
           <!-- <el-button plain disabled>点击清空</el-button> -->
-          <el-button type="primary" disabled>全部已读</el-button>
+          <el-button
+            type="primary"
+            @click="allReadFn"
+            v-if="noticeData.length != 0"
+            >全部已读</el-button
+          >
         </div>
       </div>
     </div>
@@ -122,28 +151,7 @@ const emit = defineEmits(["update:modelValue"], "changeNum");
 const closeNoticeTableModal = () => {
   emit("update:modelValue", false);
 };
-let noticeData = ref([
-  // {
-  // 	date: '2016-05-02',
-  // 	name: '王小虎',
-  // 	address: '上海市普陀区金沙江路 1518 弄',
-  // },
-  // {
-  // 	date: '2016-05-04',
-  // 	name: '王小虎',
-  // 	address: '上海市普陀区金沙江路 1517 弄',
-  // },
-  // {
-  // 	date: '2016-05-01',
-  // 	name: '王小虎',
-  // 	address: '上海市普陀区金沙江路 1519 弄',
-  // },
-  // {
-  // 	date: '2016-05-03',
-  // 	name: '王小虎',
-  // 	address: '上海市普陀区金沙江路 1516 弄',
-  // },
-]);
+let noticeData = ref([]);
 let index = ref(0);
 let data = ref([]);
 let value = ref(false);
@@ -151,6 +159,48 @@ const moreFn = () => {
   noticeTableModal.value = true;
 };
 
+const rowClick = (row) => {
+  commonRead([row.id]);
+  toDealWith(row);
+};
+
+const toDealWith = (item) => {
+  let urlConfig = {
+    0: "DealWith",
+    5: "Claim",
+    6: "Abnormal",
+    hisMsg: "HisMsg",
+  };
+  proxy.$router.push({
+    name: urlConfig[item.businessType],
+  });
+};
+
+const allReadFn = () => {
+  ElMessageBox.confirm(
+    "此操作将会把所有未读消息标记为已读,是否继续?",
+    "提示",
+    {
+      confirmButtonText: "确定",
+      cancelButtonText: "取消",
+      type: "warning",
+    }
+  )
+    .then(() => {
+      let arr = [];
+      noticeData.value.filter((item) => {
+        arr.push(item.id);
+      });
+      commonRead(arr);
+    })
+    .catch(() => {
+      ElMessage({
+        type: "info",
+        message: "已取消操作",
+      });
+    });
+};
+
 const readFn = (item) => {
   commonRead([item.row.id]);
 };
@@ -183,7 +233,6 @@ const socketInit = () => {
   window.ws = new WebSocket(
     "ws://" +
       import.meta.env.VITE_APP_IP +
-      ":20001" +
       import.meta.env.VITE_APP_WS_API +
       "/webStock/" +
       getToken()
@@ -224,7 +273,7 @@ const socketInit = () => {
   };
   window.ws.onerror = function (e) {
     //如果出现连接、处理、接收、发送数据失败的时候触发onerror事件
-    console.log("error");
+    console.log(error);
   };
 };
 let pushInfoReq = ref({
@@ -233,26 +282,42 @@ let pushInfoReq = ref({
   pushRead: 0,
   type: "",
   total: 0,
+  whetherFlow: "",
 });
+
+const handlePageChange = (val) => {
+  pushInfoReq.value.pageNum = val;
+  getPushInfo();
+};
+
 const loading = ref(false);
+const getPushInfoInit = () => {
+  pushInfoReq.value.pageNum = 1;
+  getPushInfo();
+};
 const getPushInfo = () => {
   loading.value = true;
-  proxy
-    .post("/pushInfo/page", {
-      pageNum: 1,
-      pageSize: 5,
-      pushRead: 0,
-      type: 2,
-    })
-    .then((res) => {
-      noticeData.value = res.rows;
-      pushInfoReq.value.total = res.total;
-      setTimeout(() => {
-        loading.value = false;
-      }, 500);
-    });
+  proxy.post("/pushInfo/page", pushInfoReq.value).then((res) => {
+    noticeData.value = res.rows;
+    pushInfoReq.value.total = res.total;
+    setTimeout(() => {
+      loading.value = false;
+      proxy
+        .post("/pushInfo/page", {
+          pageNum: 1,
+          pageSize: 5,
+          pushRead: 0,
+          type: "",
+          total: 0,
+          whetherFlow: "",
+        })
+        .then((res) => {
+          emit("changeNum", res.total * 1);
+        });
+    }, 550);
+  });
 };
-// socketInit()
+socketInit();
 const handleClose = () => {
   value.value = false;
 };
@@ -332,6 +397,13 @@ const openBottomBar = (type) => {
 }
 </style>
 <style>
+.noticeData-title {
+  width: 100%;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  cursor: pointer;
+}
 .commons-notice .el-table__row {
   height: 50px;
 }

+ 1819 - 0
src/components/process/EHSD/SampleChange.vue

@@ -0,0 +1,1819 @@
+<template>
+  <div style="width: 100%; padding: 0px 15px">
+    <byForm
+      :formConfig="formConfig"
+      :formOption="formOption"
+      v-model="formData.data"
+      :rules="rules"
+      ref="submit"
+    >
+      <template #seller>
+        <div style="width: 100%">
+          <el-form-item prop="sellCorporationId">
+            <el-select
+              v-model="formData.data.sellCorporationId"
+              style="width: 100%"
+              disabled
+            >
+              <el-option
+                v-for="item in corporationList"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              />
+            </el-select>
+          </el-form-item>
+          <el-row style="margin-top: 20px; width: 100%">
+            <el-col :span="8">
+              <el-form-item label="地址" prop="sellCountryName">
+                <el-input
+                  v-model="formData.data.sellCountryName"
+                  placeholder="请输入国家"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label=" " prop="sellProvinceName">
+                <el-input
+                  v-model="formData.data.sellProvinceName"
+                  placeholder="请输入省/州"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label=" " prop="sellCityName">
+                <el-input
+                  v-model="formData.data.sellCityName"
+                  placeholder="请输入城市"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row style="margin-top: 20px; width: 100%">
+            <el-col :span="24">
+              <el-form-item prop="sellAddress">
+                <el-input v-model="formData.data.sellAddress" type="textarea">
+                </el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row style="margin-top: 20px; width: 100%">
+            <el-col :span="8">
+              <el-form-item label="联系人" prop="sellContactName">
+                <el-input
+                  v-model="formData.data.sellContactName"
+                  placeholder="请输入联系人"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="16">
+              <el-form-item label=" " prop="sellContactNumber">
+                <el-input
+                  v-model="formData.data.sellContactNumber"
+                  placeholder="请输入联系人电话"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </div>
+      </template>
+      <template #buyer>
+        <div style="width: 100%">
+          <div style="width: 100%">
+            <!-- <el-form-item prop="buyCorporationId">
+              <el-select
+                v-model="formData.data.buyCorporationId"
+                style="width: 100%"
+                @change="changeCustomer"
+              >
+                <el-option
+                  v-for="item in customerList"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                />
+              </el-select>
+            </el-form-item> -->
+            <el-form-item prop="buyCorporationId">
+              <el-select
+                v-model="formData.data.buyCorporationId"
+                filterable
+                remote
+                reserve-keyword
+                placeholder="请输入关键字"
+                remote-show-suffix
+                :remote-method="remoteMethod"
+                :loading="loadingSearch"
+                @input="remoteMethod"
+                style="width: 100%"
+                @change="changeCustomer"
+                v-if="
+                  [30].includes(route.query.processType) ||
+                  !route.query.processType
+                "
+              >
+                <el-option
+                  v-for="item in customerList"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                />
+              </el-select>
+              <el-select
+                v-model="formData.data.buyCorporationName"
+                disabled
+                v-else
+                style="width: 100%"
+              >
+              </el-select>
+            </el-form-item>
+            <el-row style="margin-top: 20px; width: 100%">
+              <el-col :span="6">
+                <el-form-item label="地址" prop="countryId">
+                  <el-select
+                    v-model="formData.data.countryId"
+                    placeholder="国家"
+                    filterable
+                    @change="(val) => getCityData(val, '20', true)"
+                  >
+                    <el-option
+                      v-for="item in countryData"
+                      :label="item.name"
+                      :value="item.id"
+                    >
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label=" " prop="provinceName">
+                  <selectCity
+                    placeholder="省/洲"
+                    @change="(val) => getCityData(val, '30', true)"
+                    addressId="provinceId"
+                    addressName="provinceName"
+                    v-model="formData.data"
+                    :data="provinceData"
+                  >
+                  </selectCity>
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label=" " prop="cityName">
+                  <selectCity
+                    placeholder="城市"
+                    addressId="cityId"
+                    addressName="cityName"
+                    v-model="formData.data"
+                    :data="cityData"
+                  >
+                  </selectCity>
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label=" " prop="buyPostalCode">
+                  <el-input
+                    v-model="formData.data.buyPostalCode"
+                    placeholder="请输入邮编"
+                  />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row style="margin-top: 20px; width: 100%">
+              <el-col :span="24">
+                <el-form-item prop="buyAddress">
+                  <el-input v-model="formData.data.buyAddress" type="textarea">
+                  </el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row style="margin-top: 20px; width: 100%">
+              <el-col :span="8">
+                <el-form-item label="联系人" prop="buyContactName">
+                  <el-autocomplete
+                    v-model="formData.data.buyContactName"
+                    :fetch-suggestions="querySearchPerson"
+                    clearable
+                    class="inline-input w-50"
+                    placeholder="请输入联系人"
+                    @select="handlePerson"
+                  >
+                  </el-autocomplete>
+                </el-form-item>
+              </el-col>
+              <el-col :span="16">
+                <el-form-item label=" " prop="buyContactNumber">
+                  <el-input
+                    v-model="formData.data.buyContactNumber"
+                    placeholder="请输入联系人电话"
+                  />
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </div>
+        </div>
+      </template>
+      <template #payment>
+        <div style="width: 100%">
+          <el-row style="margin-top: 20px; width: 100%">
+            <el-col :span="6">
+              <el-form-item label="币种" prop="currency">
+                <el-select
+                  v-model="formData.data.currency"
+                  placeholder="请选择币种"
+                  style="width: 100%"
+                >
+                  <el-option
+                    v-for="item in accountCurrency"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="汇率" prop="rate">
+                <el-input-number
+                  onmousewheel="return false;"
+                  v-model="formData.data.rate"
+                  placeholder="请输入汇率"
+                  style="width: 100%"
+                  :precision="4"
+                  :controls="false"
+                  :min="0"
+                  :max="100"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row style="margin-top: 20px; width: 100%">
+            <el-col :span="6">
+              <el-form-item label="付款方式" prop="paymentMethod">
+                <el-select
+                  v-model="formData.data.paymentMethod"
+                  placeholder="请选择付款方式"
+                  style="width: 100%"
+                >
+                  <el-option
+                    v-for="item in fundsPaymentMethod"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="预付比例 (%)" prop="advanceRatio">
+                <el-input-number
+                  onmousewheel="return false;"
+                  v-model="formData.data.advanceRatio"
+                  placeholder="请输入预付比例"
+                  style="width: 100%"
+                  :precision="2"
+                  :controls="false"
+                  :min="0"
+                  :max="100"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row style="margin-top: 20px; width: 100%">
+            <el-col :span="18">
+              <el-form-item label="付款条件" prop="remark">
+                <el-input
+                  v-model="formData.data.remark"
+                  :rows="2"
+                  type="textarea"
+                  placeholder="请输入付款条件"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row style="margin-top: 20px; width: 100%">
+            <el-col :span="9">
+              <el-form-item label="收款账号" prop="shroffAccountId">
+                <el-select
+                  v-model="formData.data.shroffAccountId"
+                  placeholder="请选择收款账号"
+                  style="width: 100%"
+                  @change="changeShroffAccount"
+                >
+                  <el-option
+                    v-for="item in accountList"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="9">
+              <el-form-item label="  ">
+                <el-button type="primary" @click="changeActiveName" text>
+                  <span v-if="activeName == '1'">收起</span>
+                  <span v-else>展开</span>
+                </el-button>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <div style="width: 100%; margin-top: 34px">
+            <el-collapse v-model="activeName" class="hideCollapse" accordion>
+              <el-collapse-item title="" name="1">
+                <el-row style="width: 100%">
+                  <el-col :span="9">
+                    <el-form-item
+                      label="Beneficiary Name"
+                      prop="beneficiaryName"
+                    >
+                      <el-input
+                        v-model="formData.data.beneficiaryName"
+                        placeholder="请输入Beneficiary Name"
+                      />
+                    </el-form-item>
+                    <div style="height: 20px"></div>
+                    <el-form-item
+                      label="Beneficiary Bank"
+                      prop="beneficiaryBank"
+                    >
+                      <el-input
+                        v-model="formData.data.beneficiaryBank"
+                        placeholder="请输入Beneficiary Bank"
+                      />
+                    </el-form-item>
+                    <div style="height: 20px"></div>
+                    <el-form-item
+                      label="Beneficiary Bank Address"
+                      prop="beneficiaryBankAddress"
+                    >
+                      <el-input
+                        v-model="formData.data.beneficiaryBankAddress"
+                        placeholder="请输入Beneficiary Bank Address"
+                      />
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="9">
+                    <el-form-item
+                      label="Beneficiary Account Number"
+                      prop="beneficiaryAccountNumber"
+                    >
+                      <el-input
+                        v-model="formData.data.beneficiaryAccountNumber"
+                        placeholder="请输入Beneficiary Account Number"
+                      />
+                    </el-form-item>
+                    <div style="height: 20px"></div>
+                    <el-form-item label="Swift Code" prop="swiftCode">
+                      <el-input
+                        v-model="formData.data.swiftCode"
+                        placeholder="请输入Swift Code"
+                      />
+                    </el-form-item>
+                    <div style="height: 20px"></div>
+                    <el-form-item
+                      label="Beneficiary Address"
+                      prop="beneficiaryAddress"
+                    >
+                      <el-input
+                        v-model="formData.data.beneficiaryAddress"
+                        placeholder="请输入Beneficiary Address"
+                      />
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+              </el-collapse-item>
+            </el-collapse>
+          </div>
+        </div>
+      </template>
+      <template #delivery>
+        <div style="width: 100%">
+          <el-row style="margin-top: 20px; width: 100%">
+            <el-col :span="6">
+              <el-form-item label="报价有效期 (天)" prop="effective">
+                <el-input-number
+                  onmousewheel="return false;"
+                  v-model="formData.data.effective"
+                  placeholder="请输入有效期"
+                  style="width: 100%"
+                  :precision="0"
+                  :controls="false"
+                  :min="0"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="交货期限" prop="deliveryTime">
+                <el-date-picker
+                  v-model="formData.data.deliveryTime"
+                  type="date"
+                  placeholder="请选择交货期限"
+                  value-format="YYYY-MM-DD"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="运输方式" prop="transportMethod">
+                <el-select
+                  v-model="formData.data.transportMethod"
+                  placeholder="请选择运输方式"
+                  style="width: 100%"
+                >
+                  <el-option
+                    v-for="item in shippingMethod"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="运输说明" prop="transportRemark">
+                <el-input
+                  v-model="formData.data.transportRemark"
+                  placeholder="请输入运输说明"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </div>
+      </template>
+      <template #commodity>
+        <div style="width: 100%">
+          <el-button type="primary" @click="openProductCompany = true" plain
+            >标准产品库</el-button
+          >
+          <el-button type="primary" @click="clickCustomerProduct()" plain
+            >客户产品库</el-button
+          >
+          <el-table
+            :data="formData.data.sampleProductList"
+            style="width: 100%; margin-top: 16px"
+          >
+            <el-table-column label="商品图片" width="80">
+              <template #default="{ row }">
+                <div v-if="row.fileUrl">
+                  <img
+                    :src="row.fileUrl"
+                    class="pic"
+                    @click="onPicture(row.fileUrl)"
+                  />
+                </div>
+                <div v-else></div>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="productCnName"
+              label="商品中文名"
+              min-width="130"
+            />
+            <el-table-column label="商品英文名" min-width="180">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item
+                    :prop="'sampleProductList.' + $index + '.productName'"
+                    :rules="rules.productName"
+                    :inline-message="true"
+                    class="shrinkPadding"
+                  >
+                    <el-input
+                      v-model="row.productName"
+                      placeholder="请输入商品名称"
+                    />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="尺寸 cm*cm*cm" width="140">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item
+                    :prop="'sampleProductList.' + $index + '.productModel'"
+                    :rules="rules.productModel"
+                    :inline-message="true"
+                    class="shrinkPadding"
+                  >
+                    <el-input v-model="row.productModel" placeholder="请输入" />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="数量" width="130">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item
+                    :prop="'sampleProductList.' + $index + '.quantity'"
+                    :rules="rules.quantity"
+                    :inline-message="true"
+                    class="shrinkPadding"
+                  >
+                    <el-input-number
+                      onmousewheel="return false;"
+                      v-model="row.quantity"
+                      placeholder="请输入"
+                      style="width: 100%"
+                      :precision="0"
+                      :controls="false"
+                      :min="0"
+                      @change="calculationAmount()"
+                    />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="单价" width="140">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item
+                    :prop="'sampleProductList.' + $index + '.price'"
+                    :rules="rules.price"
+                    :inline-message="true"
+                    class="shrinkPadding"
+                  >
+                    <el-input-number
+                      onmousewheel="return false;"
+                      v-model="row.price"
+                      placeholder="请输入"
+                      style="width: 100%"
+                      :precision="2"
+                      :controls="false"
+                      :min="0"
+                      @change="calculationAmount()"
+                    />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="贸易方式" width="140">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item
+                    :prop="'sampleProductList.' + $index + '.tradeMethods'"
+                    :rules="rules.tradeMethods"
+                    :inline-message="true"
+                    class="shrinkPadding"
+                  >
+                    <el-select
+                      v-model="row.tradeMethods"
+                      placeholder="请选择"
+                      style="width: 100%"
+                    >
+                      <el-option
+                        v-for="item in tradeMethods"
+                        :key="item.value"
+                        :label="item.label"
+                        :value="item.value"
+                      />
+                    </el-select>
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="包装方式" width="180">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item
+                    :prop="'sampleProductList.' + $index + '.packMethod'"
+                    :rules="rules.packMethod"
+                    :inline-message="true"
+                    class="shrinkPadding"
+                  >
+                    <el-input v-model="row.packMethod" placeholder="请输入" />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="amount"
+              :label="'金额 ( ' + formData.data.currency + ' )'"
+              width="130"
+            />
+            <el-table-column
+              label="操作"
+              width="60"
+              align="center"
+              fixed="right"
+            >
+              <template #default="{ row, $index }">
+                <el-button
+                  type="primary"
+                  link
+                  @click="handleRemove($index, row)"
+                  >删除</el-button
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </template>
+      <template #file>
+        <div style="width: 100%">
+          <el-upload
+            v-model:fileList="formData.data.fileList"
+            action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
+            :data="uploadData"
+            multiple
+            :before-upload="uploadFile"
+            :on-success="handleSuccess"
+            :on-preview="onPreviewFile"
+          >
+            <el-button type="primary" plain>选择</el-button>
+          </el-upload>
+        </div>
+      </template>
+      <template #indication>
+        <div style="width: 100%">
+          <el-upload
+            v-model:fileList="formData.data.packageFileList"
+            action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
+            :data="indicationUploadData"
+            multiple
+            :before-upload="indicationUploadFile"
+            :on-success="handleSuccess"
+            :on-preview="onPreviewFile"
+          >
+            <el-button type="primary" plain>选择</el-button>
+          </el-upload>
+        </div>
+      </template>
+      <template #otherCharge>
+        <div style="width: 100%">
+          <el-button type="primary" @click="clickAdd()">添加行</el-button>
+          <el-table
+            :data="formData.data.sampleProjectList"
+            style="width: 100%; margin-top: 16px"
+          >
+            <el-table-column label="收费项目" width="220">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item
+                    :prop="'sampleProjectList.' + $index + '.payName'"
+                    :rules="rules.payName"
+                    :inline-message="true"
+                  >
+                    <el-autocomplete
+                      v-model="row.payName"
+                      :fetch-suggestions="querySearch"
+                      clearable
+                      class="inline-input w-50"
+                      placeholder="请输入收费项目"
+                    />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="备注">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item
+                    :prop="'sampleProjectList.' + $index + '.remark'"
+                  >
+                    <el-input v-model="row.remark" placeholder="请输入备注" />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column
+              :label="'金额 ( ' + formData.data.currency + ' )'"
+              width="130"
+            >
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item
+                    :prop="'sampleProjectList.' + $index + '.amount'"
+                    :rules="rules.amount"
+                    :inline-message="true"
+                    class="shrinkPadding"
+                  >
+                    <el-input-number
+                      onmousewheel="return false;"
+                      v-model="row.amount"
+                      placeholder="请输入金额"
+                      style="width: 100%"
+                      :precision="2"
+                      :controls="false"
+                      :min="0"
+                      @change="totalAmount()"
+                    />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column
+              label="操作"
+              width="60"
+              align="center"
+              fixed="right"
+            >
+              <template #default="{ $index }">
+                <el-button type="primary" link @click="handleDelete($index)"
+                  >删除</el-button
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </template>
+      <template #offerMoney>
+        <div style="width: 100%; display: flex">
+          <div style="width: calc(100% - 190px)"></div>
+          <div style="width: 130px; padding: 0 12px">
+            <el-form-item
+              label="合同总金额"
+              prop="amount"
+              class="shrinkPadding"
+            >
+              <el-input
+                v-model="formData.data.amount"
+                placeholder="合同总金额"
+                disabled
+              />
+            </el-form-item>
+          </div>
+        </div>
+      </template>
+      <template #shipment>
+        <div style="width: 100%">
+          <el-table
+            :data="formData.data.sampleShipmentList"
+            style="width: 100%; margin-top: 16px"
+          >
+            <el-table-column prop="productCode" label="商品编码" width="120" />
+            <el-table-column prop="productName" label="商品名称" />
+            <el-table-column label="出货日期" width="220">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item
+                    :prop="'sampleShipmentList.' + $index + '.shipmentTime'"
+                    :rules="rules.shipmentTime"
+                    :inline-message="true"
+                  >
+                    <el-date-picker
+                      v-model="row.shipmentTime"
+                      type="date"
+                      placeholder="请选择出货日期"
+                      value-format="YYYY-MM-DD"
+                    />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="数量" width="160">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item
+                    :prop="'sampleShipmentList.' + $index + '.quantity'"
+                    :inline-message="true"
+                  >
+                    <el-input-number
+                      onmousewheel="return false;"
+                      v-model="row.quantity"
+                      placeholder="请输入数量"
+                      style="width: 100%"
+                      :precision="0"
+                      :controls="false"
+                      :min="0"
+                      @change="calculationAmount()"
+                    />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column
+              align="center"
+              label="操作"
+              width="120"
+              fixed="right"
+            >
+              <template #default="{ row, $index }">
+                <el-button type="primary" link @click="clickSplit(row)"
+                  >拆分</el-button
+                >
+                <el-button type="primary" link @click="clickDelete($index)"
+                  >删除</el-button
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </template>
+    </byForm>
+
+    <el-dialog
+      v-if="openProductCompany"
+      v-model="openProductCompany"
+      title="公司产品库"
+      width="90%"
+      append-to-body
+    >
+      <CompanyProduct
+        :selectStatus="true"
+        @selectProduct="selectProduct"
+      ></CompanyProduct>
+    </el-dialog>
+
+    <el-dialog
+      v-if="openProductCustomer"
+      v-model="openProductCustomer"
+      title="客户产品库"
+      width="90%"
+      append-to-body
+    >
+      <CustomerProduct
+        :selectStatus="true"
+        :buyCorporationId="formData.data.buyCorporationId"
+        @selectProduct="selectProduct"
+      ></CustomerProduct>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import byForm from "@/components/byForm/index";
+import CompanyProduct from "@/views/EHSD/productLibrary/companyProduct/index";
+import CustomerProduct from "@/views/EHSD/productLibrary/customerProduct/index";
+import { ElMessage } from "element-plus";
+import selectCity from "@/components/selectCity/index.vue";
+import { useRoute } from "vue-router";
+import { onMounted } from "vue";
+
+const route = useRoute();
+const { proxy } = getCurrentInstance();
+const innerMethod = ref([]);
+const outsideMethod = ref([]);
+const accountCurrency = ref([]);
+const fundsPaymentMethod = ref([]);
+const tradeMethods = ref([]);
+const shippingMethod = ref([]);
+const submitType = ref([]);
+const templateList = ref([]);
+const corporationList = ref([]);
+const customerList = ref([]);
+const accountList = ref([]);
+const countryData = ref([]);
+const provinceData = ref([]);
+const cityData = ref([]);
+const customerUserList = ref([]);
+const openProductCompany = ref(false);
+const openProductCustomer = ref(false);
+const activeName = ref("1");
+const formData = reactive({
+  data: {
+    currency: "",
+    submitType: "2",
+    amount: undefined,
+    sampleProductList: [],
+    sampleProjectList: [],
+    fileList: [],
+    packageFileList: [],
+    sampleShipmentList: [],
+  },
+});
+const submit = ref(null);
+const judgeStatus = () => {
+  if (route.query.processType == 20 || route.query.processType == 10) {
+    return true;
+  }
+  if (props.queryData.recordList && props.queryData.recordList.length > 0) {
+    let data = props.queryData.recordList.filter(
+      (item) => item.status === 2 && item.nodeType !== 1
+    );
+    if (data && data.length > 0) {
+      return true;
+    }
+  }
+  return false;
+};
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+  disabled: false,
+});
+const uploadData = ref({});
+const indicationUploadData = ref({});
+const formConfig = computed(() => {
+  return [
+    {
+      type: "title",
+      title: "合同模板",
+      label: "",
+    },
+    {
+      type: "select",
+      label: "选择合同模板",
+      prop: "contractTemplateId",
+      data: templateList.value,
+      fn: (val) => {
+        changeTemplate(val);
+      },
+    },
+    {
+      type: "slot",
+      slotName: "seller",
+      label: "卖方信息",
+      itemWidth: 50,
+    },
+    {
+      type: "slot",
+      slotName: "buyer",
+      label: "买方信息",
+      itemWidth: 50,
+    },
+    {
+      type: "slot",
+      slotName: "payment",
+      label: "付款信息",
+    },
+    {
+      type: "slot",
+      slotName: "delivery",
+      label: "交付信息",
+    },
+    {
+      type: "slot",
+      slotName: "commodity",
+      label: "商品信息",
+    },
+    {
+      type: "slot",
+      slotName: "file",
+      label: "交接单",
+    },
+    {
+      type: "slot",
+      slotName: "indication",
+      label: "包装指示",
+    },
+    {
+      type: "slot",
+      slotName: "otherCharge",
+      label: "其他收费项目",
+    },
+    {
+      type: "slot",
+      slotName: "offerMoney",
+    },
+    {
+      type: "slot",
+      slotName: "shipment",
+      label: "出货计划",
+    },
+    // {
+    //   type: "select",
+    //   label: "提交类型",
+    //   prop: "submitType",
+    //   data: submitType.value,
+    // },
+  ];
+});
+const rules = ref({
+  contractTemplateId: [
+    { required: true, message: "请选择合同模板", trigger: "change" },
+  ],
+  buyCorporationId: [
+    { required: true, message: "请选择公司", trigger: "change" },
+  ],
+  countryId: [{ required: true, message: "请选择国家", trigger: "change" }],
+  sellAddress: [{ required: true, message: "请输入详细地址", trigger: "blur" }],
+  buyAddress: [{ required: true, message: "请输入详细地址", trigger: "blur" }],
+  buyContactName: [
+    { required: true, message: "请输入联系人", trigger: ["change", "blur"] },
+  ],
+  buyContactNumber: [
+    { required: true, message: "请输入联系电话", trigger: "blur" },
+  ],
+  productName: [{ required: true, message: "请输入商品名称", trigger: "blur" }],
+  productModel: [
+    { required: true, message: "请输入尺寸 cm*cm*cm", trigger: "blur" },
+  ],
+  quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
+  price: [{ required: true, message: "请输入单价", trigger: "blur" }],
+  packMethod: [{ required: true, message: "请输入包装方式", trigger: "blur" }],
+  amount: [{ required: true, message: "请输入金额", trigger: "blur" }],
+  payName: [
+    { required: true, message: "请输入收费项目", trigger: ["change", "blur"] },
+  ],
+  currency: [{ required: true, message: "请选择币种", trigger: "change" }],
+  effective: [{ required: true, message: "请输入报价有效期", trigger: "blur" }],
+  deliveryTime: [
+    { required: true, message: "请选择交货期限", trigger: "change" },
+  ],
+  paymentMethod: [
+    { required: true, message: "请选择付款方式", trigger: "change" },
+  ],
+  advanceRatio: [
+    { required: true, message: "请输入预付比例", trigger: "blur" },
+  ],
+  shroffAccountId: [
+    { required: true, message: "请选择收款账号", trigger: "change" },
+  ],
+  tradeMethods: [
+    { required: true, message: "请选择贸易方式", trigger: "change" },
+  ],
+  transportMethod: [
+    { required: true, message: "请选择运输方式", trigger: "change" },
+  ],
+  transportRemark: [
+    { required: true, message: "请输入运输说明", trigger: "blur" },
+  ],
+  remark: [{ required: true, message: "请输入付款条件", trigger: "blur" }],
+  submitType: [
+    { required: true, message: "请选择提交类型", trigger: "change" },
+  ],
+  rate: [{ required: true, message: "请输入汇率", trigger: "blur" }],
+});
+const getDict = () => {
+  proxy.post("/customer/selPage", { pageNum: 1, pageSize: 50 }).then((res) => {
+    customerList.value = res.rows.map((x) => ({
+      ...x,
+      label: x.name,
+      value: x.id,
+    }));
+  });
+  proxy
+    .getDictOne([
+      "inner_packaging_method_ehsd",
+      "outside_packaging_method_ehsd",
+      "account_currency",
+      "funds_payment_method",
+      "trade_mode",
+      "shipping_method",
+      "submit_type",
+    ])
+    .then((res) => {
+      innerMethod.value = res["inner_packaging_method_ehsd"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      outsideMethod.value = res["outside_packaging_method_ehsd"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      accountCurrency.value = res["account_currency"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      fundsPaymentMethod.value = res["funds_payment_method"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      tradeMethods.value = res["trade_mode"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      shippingMethod.value = res["shipping_method"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      submitType.value = res["submit_type"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+    });
+  proxy
+    .post("/contractTemplate/page", { pageNum: 1, pageSize: 999 })
+    .then((res) => {
+      templateList.value = res.rows.map((item) => {
+        return {
+          ...item,
+          label: item.templateName,
+          value: item.id,
+        };
+      });
+    });
+  proxy.post("/corporation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    corporationList.value = res.rows.map((item) => {
+      return {
+        ...item,
+        label: item.name,
+        value: item.id,
+      };
+    });
+  });
+  proxy
+    .post("/accountManagement/page", { pageNum: 1, pageSize: 999 })
+    .then((res) => {
+      accountList.value = res.rows.map((item) => {
+        return {
+          ...item,
+          label: item.alias,
+          value: item.id,
+        };
+      });
+    });
+};
+getDict();
+const changeTemplate = (val) => {
+  formData.data.sellCorporationId = "";
+  formData.data.sellContactName = "";
+  formData.data.sellContactNumber = "";
+  formData.data.sellCountryName = "";
+  formData.data.sellProvinceName = "";
+  formData.data.sellCityName = "";
+  formData.data.sellAddress = "";
+  if (val) {
+    proxy.post("/contractTemplate/detail", { id: val }).then((res) => {
+      formData.data.sellCorporationId = res.corporationId;
+      if (res.corporationId) {
+        proxy
+          .post("/corporation/detail", { id: res.corporationId })
+          .then((detailCorporation) => {
+            proxy
+              .post("/customizeArea/list", { parentId: "0" })
+              .then((resCountry) => {
+                let sellCountryData = resCountry.filter(
+                  (item) => item.id === detailCorporation.countryId
+                );
+                if (sellCountryData && sellCountryData.length > 0) {
+                  formData.data.sellCountryName = sellCountryData[0].name;
+                } else {
+                  formData.data.sellCountryName = "";
+                }
+              });
+            if (detailCorporation.countryId) {
+              proxy
+                .post("/customizeArea/list", {
+                  parentId: detailCorporation.countryId,
+                })
+                .then((resProvince) => {
+                  let sellProvinceData = resProvince.filter(
+                    (item) => item.id === detailCorporation.provinceId
+                  );
+                  if (sellProvinceData && sellProvinceData.length > 0) {
+                    formData.data.sellProvinceName = sellProvinceData[0].name;
+                  } else {
+                    formData.data.sellProvinceName = "";
+                  }
+                });
+            } else {
+              formData.data.sellProvinceName = "";
+            }
+            if (detailCorporation.provinceId) {
+              proxy
+                .post("/customizeArea/list", {
+                  parentId: detailCorporation.provinceId,
+                })
+                .then((resCity) => {
+                  let sellCityData = resCity.filter(
+                    (item) => item.id === detailCorporation.cityId
+                  );
+                  if (sellCityData && sellCityData.length > 0) {
+                    formData.data.sellCityName = sellCityData[0].name;
+                  } else {
+                    formData.data.sellCityName = "";
+                  }
+                });
+            } else {
+              formData.data.sellCityName = "";
+            }
+            formData.data.sellAddress = detailCorporation.address;
+          });
+      }
+      formData.data.sellContactName = res.contactName;
+      formData.data.sellContactNumber = res.contactNumber;
+    });
+  }
+};
+const getCityData = (id, type, isChange) => {
+  proxy.post("/customizeArea/list", { parentId: id }).then((res) => {
+    if (type === "20") {
+      provinceData.value = res;
+      if (isChange) {
+        formData.data.provinceId = "";
+        formData.data.provinceName = "";
+        formData.data.cityId = "";
+        formData.data.cityName = "";
+      }
+    } else if (type === "30") {
+      cityData.value = res;
+      if (isChange) {
+        formData.data.cityId = "";
+        formData.data.cityName = "";
+      }
+    } else {
+      countryData.value = res;
+    }
+  });
+};
+getCityData("0");
+const changeCustomer = (val) => {
+  formData.data.sampleProductList = [];
+  formData.data.customerName = "";
+  formData.data.customerTel = "";
+  if (val) {
+    proxy.post("/customer/detail", { id: val }).then(
+      (res) => {
+        formData.data.buyCorporationName = res.name;
+        if (res.customerUserList && res.customerUserList.length > 0) {
+          formData.data.buyContactName = res.customerUserList[0].name;
+          if (res.customerUserList[0].contactJson) {
+            let contactJson = JSON.parse(res.customerUserList[0].contactJson);
+            if (contactJson && contactJson.length > 0) {
+              formData.data.buyContactNumber = contactJson[0].contactNo;
+            }
+          }
+          customerUserList.value = res.customerUserList.map((item) => {
+            return {
+              ...item,
+              value: item.name,
+            };
+          });
+        }
+        formData.data.countryId = res.countryId;
+        formData.data.provinceId = res.provinceId;
+        formData.data.cityId = res.cityId;
+        formData.data.buyPostalCode = res.zipCode;
+        formData.data.buyAddress = res.address;
+        getCityData(formData.data.countryId, "20");
+        if (formData.data.provinceId) {
+          getCityData(formData.data.provinceId, "30");
+        }
+      },
+      (err) => {
+        console.log(err);
+        formData.data.countryId = "";
+        formData.data.provinceId = "";
+        formData.data.cityId = "";
+        formData.data.buyPostalCode = "";
+        formData.data.buyAddress = "";
+      }
+    );
+  } else {
+    formData.data.countryId = "";
+    formData.data.provinceId = "";
+    formData.data.cityId = "";
+    formData.data.buyPostalCode = "";
+    formData.data.buyAddress = "";
+  }
+};
+const createFilter = (queryString) => {
+  return (restaurant) => {
+    return (
+      restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0
+    );
+  };
+};
+const querySearchPerson = (queryString, callback) => {
+  const results = queryString
+    ? customerUserList.value.filter(createFilter(queryString))
+    : customerUserList.value;
+  callback(results);
+};
+const handlePerson = (item) => {
+  formData.data.customerTel = item.phone;
+};
+const selectProduct = (goods) => {
+  if (goods && goods.id) {
+    let data = formData.data.sampleProductList.filter(
+      (item) => item.productId === goods.id
+    );
+    if (data && data.length > 0) {
+      return ElMessage("该产品已添加");
+    }
+    let fileUrl = "";
+    if (goods.fileList && goods.fileList.length > 0) {
+      fileUrl = goods.fileList[0].fileUrl;
+    }
+    let packMethod = "";
+    if (goods.innerPackMethod) {
+      let innerPackMethod = goods.innerPackMethod.split(",");
+      innerPackMethod.map((item) => {
+        if (packMethod) {
+          packMethod =
+            packMethod + "," + proxy.dictValueLabel(item, innerMethod.value);
+        } else {
+          packMethod = proxy.dictValueLabel(item, innerMethod.value);
+        }
+      });
+    }
+    if (goods.outerPackMethod) {
+      let outerPackMethod = goods.outerPackMethod.split(",");
+      outerPackMethod.map((item) => {
+        if (packMethod) {
+          packMethod =
+            packMethod + "," + proxy.dictValueLabel(item, outsideMethod.value);
+        } else {
+          packMethod = proxy.dictValueLabel(item, outsideMethod.value);
+        }
+      });
+    }
+    if (
+      formData.data.sampleProductList &&
+      formData.data.sampleProductList.length > 0
+    ) {
+      formData.data.sampleProductList.push({
+        fileUrl: fileUrl,
+        productId: goods.id,
+        productCnName: goods.name,
+        productName: goods.nameEnglish,
+        productModel:
+          goods.productLong + "*" + goods.productWide + "*" + goods.productHigh,
+        quantity: undefined,
+        price: undefined,
+        amount: "",
+        tradeMethods: "",
+        packMethod: packMethod,
+      });
+    } else {
+      formData.data.sampleProductList = [
+        {
+          fileUrl: fileUrl,
+          productId: goods.id,
+          productCnName: goods.name,
+          productName: goods.nameEnglish,
+          productModel:
+            goods.productLong +
+            "*" +
+            goods.productWide +
+            "*" +
+            goods.productHigh,
+          quantity: undefined,
+          price: undefined,
+          amount: "",
+          tradeMethods: "",
+          packMethod: packMethod,
+        },
+      ];
+    }
+    formData.data.sampleShipmentList.push({
+      productCode: goods.code,
+      productId: goods.id,
+      productName: goods.nameEnglish,
+      shipmentTime: "",
+      quantity: undefined,
+    });
+    ElMessage({
+      message: "添加成功!",
+      type: "success",
+    });
+  } else {
+    return ElMessage("选择错误");
+  }
+};
+const onPicture = (path) => {
+  window.open(path, "_blank");
+};
+const handleRemove = async (index, row) => {
+  formData.data.sampleShipmentList = formData.data.sampleShipmentList.filter(
+    (item) => item.productId !== row.productId
+  );
+  await formData.data.sampleProductList.splice(index, 1);
+  totalAmount();
+};
+const calculationAmount = () => {
+  nextTick(() => {
+    if (
+      formData.data.sampleProductList &&
+      formData.data.sampleProductList.length > 0
+    ) {
+      for (let i = 0; i < formData.data.sampleProductList.length; i++) {
+        let money = 0;
+        if (
+          formData.data.sampleProductList[i].quantity &&
+          formData.data.sampleProductList[i].price
+        ) {
+          money = parseFloat(
+            Number(formData.data.sampleProductList[i].quantity) *
+              Number(formData.data.sampleProductList[i].price)
+          ).toFixed(2);
+        }
+        formData.data.sampleProductList[i].amount = money;
+      }
+    }
+    nextTick(() => {
+      totalAmount();
+    });
+  });
+};
+const totalAmount = () => {
+  let money = 0;
+  if (
+    formData.data.sampleProductList &&
+    formData.data.sampleProductList.length > 0
+  ) {
+    for (let i = 0; i < formData.data.sampleProductList.length; i++) {
+      if (formData.data.sampleProductList[i].amount) {
+        money = parseFloat(
+          Number(money) + Number(formData.data.sampleProductList[i].amount)
+        ).toFixed(2);
+      }
+    }
+  }
+  if (
+    formData.data.sampleProjectList &&
+    formData.data.sampleProjectList.length > 0
+  ) {
+    for (let i = 0; i < formData.data.sampleProjectList.length; i++) {
+      if (formData.data.sampleProjectList[i].amount) {
+        money = parseFloat(
+          Number(money) + Number(formData.data.sampleProjectList[i].amount)
+        ).toFixed(2);
+      }
+    }
+  }
+  formData.data.amount = money;
+};
+const clickAdd = () => {
+  if (
+    formData.data.sampleProjectList &&
+    formData.data.sampleProjectList.length > 0
+  ) {
+    formData.data.sampleProjectList.push({
+      payName: "",
+      amount: undefined,
+      remark: "",
+    });
+  } else {
+    formData.data.sampleProjectList = [
+      { payName: "", amount: undefined, remark: "" },
+    ];
+  }
+};
+const handleDelete = async (index) => {
+  await formData.data.sampleProjectList.splice(index, 1);
+  totalAmount();
+};
+const querySearch = (queryString, callback) => {
+  proxy.post("/quotationPay/page", { payName: queryString }).then((res) => {
+    if (res.rows && res.rows.length > 0) {
+      res.rows = res.rows.map((item) => {
+        return {
+          ...item,
+          value: item.payName,
+        };
+      });
+      callback(res.rows);
+    } else {
+      callback([]);
+    }
+  });
+};
+const handleSubmit = async () => {
+  let status = await submit.value.handleSubmit(() => {});
+  if (status) {
+    if (
+      !(
+        formData.data.sampleProductList &&
+        formData.data.sampleProductList.length > 0
+      )
+    ) {
+      ElMessage("请添加至少一件商品");
+      return false;
+    }
+    if (formData.data.fileList && formData.data.fileList.length > 0) {
+      for (let i = 0; i < formData.data.fileList.length; i++) {
+        if (formData.data.fileList[i].raw.uploadState) {
+          ElMessage("文件上传中,请稍后提交");
+          return false;
+        }
+      }
+    }
+    if (
+      formData.data.packageFileList &&
+      formData.data.packageFileList.length > 0
+    ) {
+      for (let i = 0; i < formData.data.packageFileList.length; i++) {
+        if (formData.data.packageFileList[i].raw.uploadState) {
+          ElMessage("文件上传中,请稍后提交");
+          return false;
+        }
+      }
+    }
+    if (
+      formData.data.sampleShipmentList &&
+      formData.data.sampleShipmentList.length > 0
+    ) {
+      for (let i = 0; i < formData.data.sampleProductList.length; i++) {
+        let data = formData.data.sampleShipmentList.filter(
+          (item) =>
+            item.productId === formData.data.sampleProductList[i].productId
+        );
+        if (data && data.length > 0) {
+          let quantity = 0;
+          for (let j = 0; j < data.length; j++) {
+            quantity = parseFloat(Number(quantity) + Number(data[j].quantity));
+          }
+          if (quantity > formData.data.sampleProductList[i].quantity) {
+            ElMessage("出货数量不能大于商品数量");
+            return false;
+          }
+        }
+      }
+    }
+    return true;
+  } else {
+    setTimeout(() => {
+      const errorDiv = document.getElementsByClassName("is-error");
+      errorDiv[0].scrollIntoView();
+    }, 0);
+  }
+  return status;
+};
+// 接收父组件的传值
+const props = defineProps({
+  queryData: Object,
+});
+watch(
+  props.queryData,
+  () => {
+    formOption.disabled = judgeStatus();
+    return;
+    if (
+      props.queryData &&
+      ["10", "20", "30"].includes(route.query.processType)
+    ) {
+      for (var text in props.queryData) {
+        if (text === "fileList" || text === "packageFileList") {
+          if (props.queryData[text] && props.queryData[text].length > 0) {
+            formData.data[text] = props.queryData[text].map((item) => {
+              return {
+                raw: item,
+                name: item.fileName,
+                url: item.fileUrl,
+              };
+            });
+          }
+        } else {
+          formData.data[text] = props.queryData[text];
+        }
+      }
+      if (formData.data.countryId) {
+        getCityData(formData.data.countryId, "20");
+      }
+      if (formData.data.provinceId) {
+        getCityData(formData.data.provinceId, "30");
+      }
+    }
+  },
+  {
+    deep: true,
+  }
+);
+const clickCustomerProduct = () => {
+  if (!formData.data.buyCorporationId) {
+    return ElMessage("请先选择客户");
+  }
+  openProductCustomer.value = true;
+};
+
+const loadingSearch = ref(false);
+const remoteMethod = (keyword) => {
+  if (keyword && typeof keyword === "string") {
+    loadingSearch.value = true;
+    proxy.post("/customer/selPage", { keyword }).then((res) => {
+      customerList.value = res.rows.map((x) => ({
+        ...x,
+        label: x.name,
+        value: x.id,
+      }));
+      loadingSearch.value = false;
+    });
+  }
+  return;
+};
+
+const getFormData = () => {
+  return proxy.deepClone(formData.data);
+};
+// 向父组件暴露
+defineExpose({
+  getFormData,
+  handleSubmit,
+});
+const changeShroffAccount = (val) => {
+  if (val) {
+    let data = accountList.value.filter((item) => item.value === val);
+    if (data && data.length > 0) {
+      formData.data.beneficiaryName = data[0].beneficiaryName;
+      formData.data.beneficiaryBank = data[0].beneficiaryBank;
+      formData.data.beneficiaryBankAddress = data[0].beneficiaryBankAddress;
+      formData.data.beneficiaryAccountNumber = data[0].beneficiaryAccountNumber;
+      formData.data.swiftCode = data[0].swiftCode;
+      formData.data.beneficiaryAddress = data[0].beneficiaryAddress;
+    }
+  }
+};
+const changeActiveName = () => {
+  if (activeName.value) {
+    activeName.value = "";
+  } else {
+    activeName.value = "1";
+  }
+};
+const uploadFile = async (file) => {
+  const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
+  uploadData.value = res.uploadBody;
+  file.id = res.id;
+  file.fileName = res.fileName;
+  file.fileUrl = res.fileUrl;
+  file.uploadState = true;
+  return true;
+};
+const indicationUploadFile = async (file) => {
+  const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
+  indicationUploadData.value = res.uploadBody;
+  file.id = res.id;
+  file.fileName = res.fileName;
+  file.fileUrl = res.fileUrl;
+  file.uploadState = true;
+  return true;
+};
+const handleSuccess = (any, UploadFile) => {
+  UploadFile.raw.uploadState = false;
+};
+const onPreviewFile = (file) => {
+  window.open(file.raw.fileUrl, "_blank");
+};
+const clickSplit = (item) => {
+  formData.data.sampleShipmentList.push({
+    productCode: item.code,
+    productId: item.productId,
+    productName: item.productName,
+    shipmentTime: "",
+    quantity: undefined,
+  });
+};
+const clickDelete = (index) => {
+  formData.data.sampleShipmentList.splice(index, 1);
+};
+onMounted(() => {
+  formOption.disabled = judgeStatus();
+  if (route.query && route.query.processType) {
+    let businessId = route.query.businessId;
+    proxy.post("/sample/detail", { id: businessId }).then((res) => {
+      res.sampleShipmentList = res.sampleShipmentLists;
+      res.countryId = res.buyCountryId;
+      res.provinceId = res.buyProvinceId;
+      res.cityId = res.buyCityId;
+      if (!res.fileList) {
+        res.fileList = [];
+      }
+      if (!res.packageFileList) {
+        res.packageFileList = [];
+      }
+      for (const key in res) {
+        formData.data[key] = res[key];
+      }
+      proxy
+        .post("/fileInfo/getList", {
+          businessIdList: [businessId],
+        })
+        .then((fileObj) => {
+          if (fileObj[businessId] && fileObj[businessId].length > 0) {
+            formData.data.fileList = fileObj[businessId]
+              .filter((x) => x.businessType === "1")
+              .map((x) => ({ raw: x, name: x.fileName, url: x.fileUrl }));
+            formData.data.packageFileList = fileObj[businessId]
+              .filter((x) => x.businessType === "2")
+              .map((x) => ({ raw: x, name: x.fileName, url: x.fileUrl }));
+          }
+        });
+      if (
+        formData.data.sampleProductList &&
+        formData.data.sampleProductList.length > 0
+      ) {
+        for (let i = 0; i < formData.data.sampleProductList.length; i++) {
+          const e = formData.data.sampleProductList[i];
+          if (e.ehsdJson) {
+            let obj = JSON.parse(e.ehsdJson);
+            e.packMethod = obj.packMethod;
+            e.tradeMethods = obj.tradeMethods;
+          }
+        }
+        let ids = formData.data.sampleProductList.map((x) => x.productId);
+        proxy
+          .post("/fileInfo/getList", {
+            businessIdList: ids,
+          })
+          .then((fileObj) => {
+            for (let i = 0; i < formData.data.sampleProductList.length; i++) {
+              const e = formData.data.sampleProductList[i];
+              for (const key in fileObj) {
+                if (e.productId === key) {
+                  e.fileList = fileObj[key] || [];
+
+                  if (e.fileList && e.fileList.length > 0) {
+                    e.fileUrl = e.fileList[0].fileUrl;
+                  }
+                }
+              }
+            }
+          });
+      }
+      if (formData.data.countryId) {
+        getCityData(formData.data.countryId, "20");
+      }
+      if (formData.data.provinceId) {
+        getCityData(formData.data.provinceId, "30");
+      }
+    });
+  } else if (route.query && !route.query.processType) {
+    let businessId = route.query.businessId;
+    proxy.post("/sample/detail", { id: businessId }).then((res) => {
+      if (res && res.dataJson) {
+        res = { ...res, ...JSON.parse(res.dataJson) };
+      }
+      res.sampleShipmentList = res.sampleShipmentLists;
+      res.countryId = res.buyCountryId;
+      res.provinceId = res.buyProvinceId;
+      res.cityId = res.buyCityId;
+      if (!res.fileList) {
+        res.fileList = [];
+      }
+      if (!res.packageFileList) {
+        res.packageFileList = [];
+      }
+      for (const key in res) {
+        formData.data[key] = res[key];
+      }
+      formData.data.oldSampleId = formData.data.id;
+      delete formData.data.id;
+      proxy
+        .post("/fileInfo/getList", {
+          businessIdList: [businessId],
+        })
+        .then((fileObj) => {
+          if (fileObj[businessId] && fileObj[businessId].length > 0) {
+            formData.data.fileList = fileObj[businessId]
+              .filter((x) => x.businessType === "1")
+              .map((x) => ({ raw: x, name: x.fileName, url: x.fileUrl }));
+            formData.data.packageFileList = fileObj[businessId]
+              .filter((x) => x.businessType === "2")
+              .map((x) => ({ raw: x, name: x.fileName, url: x.fileUrl }));
+          }
+        });
+      if (
+        formData.data.sampleProductList &&
+        formData.data.sampleProductList.length > 0
+      ) {
+        for (let i = 0; i < formData.data.sampleProductList.length; i++) {
+          const e = formData.data.sampleProductList[i];
+          if (e.ehsdJson) {
+            let obj = JSON.parse(e.ehsdJson);
+            e.packMethod = obj.packMethod;
+            e.tradeMethods = obj.tradeMethods;
+          }
+        }
+        let ids = formData.data.sampleProductList.map((x) => x.productId);
+        proxy
+          .post("/fileInfo/getList", {
+            businessIdList: ids,
+          })
+          .then((fileObj) => {
+            for (let i = 0; i < formData.data.sampleProductList.length; i++) {
+              const e = formData.data.sampleProductList[i];
+              for (const key in fileObj) {
+                if (e.productId === key) {
+                  e.fileList = fileObj[key] || [];
+
+                  if (e.fileList && e.fileList.length > 0) {
+                    e.fileUrl = e.fileList[0].fileUrl;
+                  }
+                }
+              }
+            }
+          });
+      }
+      if (formData.data.countryId) {
+        getCityData(formData.data.countryId, "20");
+      }
+      if (formData.data.provinceId) {
+        getCityData(formData.data.provinceId, "30");
+      }
+    });
+  }
+});
+</script>
+
+<style lang="scss" scoped>
+::v-deep(.el-input-number .el-input__inner) {
+  text-align: left;
+}
+.pic {
+  object-fit: contain;
+  width: 50px;
+  height: 50px;
+  cursor: pointer;
+  vertical-align: middle;
+}
+.shrinkPadding {
+  padding-right: 0 !important;
+}
+.hideCollapse {
+  margin-top: -62px;
+  border: 0 !important;
+}
+::v-deep(.el-collapse-item__arrow) {
+  display: none !important;
+}
+::v-deep(.el-collapse-item__wrap) {
+  border: 0 !important;
+}
+::v-deep(.el-collapse-item__header) {
+  border: 0 !important;
+}
+</style>

+ 3 - 3
src/utils/request.js

@@ -64,7 +64,7 @@ service.interceptors.request.use(config => {
       const s_url = sessionObj.url; // 请求地址
       const s_data = sessionObj.data; // 请求数据
       const s_time = sessionObj.time; // 请求时间
-      const interval = 1000; // 间隔时间(ms),小于此时间视为重复提交
+      const interval = 500; // 间隔时间(ms),小于此时间视为重复提交
       if (s_data === requestObj.data && requestObj.time - s_time < interval && s_url === requestObj.url) {
         const message = '数据正在处理,请勿重复提交';
         // console.warn(`[${s_url}]: ` + message)
@@ -140,10 +140,10 @@ service.interceptors.response.use(res => {
       message = "系统接口请求超时";
     } else if (message.includes("Request failed with status code")) {
       message = "系统接口" + message.substr(message.length - 3) + "异常";
-    } else if(message.includes("java.lang.NoClassDefFoundError")) {
+    } else if (message.includes("java.lang.NoClassDefFoundError")) {
       message = '服务器部署中,请稍后再试'
     }
-    
+
     ElMessage({
       message: message,
       type: 'error',

+ 25 - 0
src/views/EHSD/saleContract/sampleEHSD/index.vue

@@ -368,6 +368,19 @@ const config = computed(() => {
       },
       renderHTML(row) {
         return [
+          row.status == 30
+            ? {
+                attrs: {
+                  label: "变更",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  clickAlteration(row);
+                },
+              }
+            : {},
           {
             attrs: {
               label: "交接单",
@@ -771,6 +784,18 @@ const printObj = ref({
 const clickDownload = () => {
   proxy.getPdf("样品单PDF文件");
 };
+
+const clickAlteration = (row) => {
+  proxy.$router.push({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: "sample_update_flow",
+      flowName: "样品单变更流程",
+      random: proxy.random(),
+      businessId: row.id,
+    },
+  });
+};
 </script>
 
 <style lang="scss" scoped>

+ 24 - 12
src/views/finance/fundManage/fundsStatement/index.vue

@@ -34,43 +34,55 @@
     >
       <div class="statistics-item one">
         <div class="left">期末余额</div>
-        <div class="center"></div>
+        <div class="center" style="margin: 0 15px"></div>
         <div class="right">
           <div
             style="padding: 4px"
             v-for="(item, index) in headerData"
             :key="index"
           >
-            <span style="margin-right: 10px">{{ item.currency }}</span>
-            <span> {{ moneyFormat(item.balance, 2) }}</span>
+            <span style="margin-right: 24px; font-weight: 400">{{
+              item.currency
+            }}</span>
+            <span style="text-align: right; letter-spacing: 1px; float: right">
+              {{ moneyFormat(item.balance, 2) }}
+            </span>
           </div>
         </div>
       </div>
       <div class="statistics-item two">
         <div class="left">收入合计</div>
-        <div class="center"></div>
+        <div class="center" style="margin: 0 15px"></div>
         <div class="right">
           <div
             style="padding: 4px"
             v-for="(item, index) in headerData"
             :key="index"
           >
-            <span style="margin-right: 10px">{{ item.currency }}</span>
-            <span> {{ moneyFormat(item.income, 2) }}</span>
+            <span style="margin-right: 24px; font-weight: 400">{{
+              item.currency
+            }}</span>
+            <span style="text-align: right; letter-spacing: 1px; float: right">
+              {{ moneyFormat(item.income, 2) }}
+            </span>
           </div>
         </div>
       </div>
       <div class="statistics-item three">
         <div class="left">支出合计</div>
-        <div class="center"></div>
+        <div class="center" style="margin: 0 15px"></div>
         <div class="right">
           <div
             style="padding: 4px"
             v-for="(item, index) in headerData"
             :key="index"
           >
-            <span style="margin-right: 10px">{{ item.currency }}</span>
-            <span> {{ moneyFormat(item.expenditure, 2) }}</span>
+            <span style="margin-right: 24px; font-weight: 400">{{
+              item.currency
+            }}</span>
+            <span style="text-align: right; letter-spacing: 1px; float: right">
+              {{ moneyFormat(item.expenditure, 2) }}
+            </span>
           </div>
         </div>
       </div>
@@ -92,7 +104,7 @@
         >
           <template #default="{ row, $index }">
             <div v-if="$index === 0">
-              <div style="font-weight: 700; font-size: 14px">
+              <div style="font-weight: 700; font-size: 14px; color: #333">
                 {{ row.name }}
               </div>
             </div>
@@ -455,8 +467,8 @@ getAccountManagement();
     align-items: center;
     justify-content: space-around;
     margin-right: 20px;
-    width: 280px;
-    height: 120px;
+    // width: 280px;
+    // height: 120px;
     display: flex;
     // background: #eff6ff;
     border-radius: 8px 8px 8px 8px;

+ 15 - 1
src/views/index.vue

@@ -17,7 +17,7 @@
           </div>
         </li>
         <li class="theme3">
-          <div class="num">3</div>
+          <div class="num">{{ pushInfo.total }}</div>
           <div class="label">未读消息</div>
           <div class="icon-box">
             <i class="icon iconfont icon-iconm_unread"></i>
@@ -161,6 +161,10 @@ const pushProcessApprovalOne = (row) => {
   return;
 };
 const { proxy } = getCurrentInstance();
+const pushInfo = ref({
+  total: 0,
+  rows: [],
+});
 const getData = () => {
   proxy
     .post("/flowExample/getToBeProcessedPage", {
@@ -187,6 +191,16 @@ const getData = () => {
     .then((res) => {
       sendMegData.value = res;
     });
+
+  proxy
+    .post("pushInfo/page", {
+      pageNum: 1,
+      pageSize: 3,
+      pushRead: 0,
+    })
+    .then((res) => {
+      pushInfo.value = res;
+    });
 };
 const toUrl = (name, type) => {
   //获取name为name的路由的基础信息

+ 15 - 1
src/views/process/processApproval/index.vue

@@ -19,6 +19,13 @@
         <template v-else-if="flowForm.flowKey == 'sample_flow'">
           <SampleEHSD ref="makeDom" :queryData="queryData.data"></SampleEHSD>
         </template>
+        <!-- 样品单变更 -->
+        <template v-else-if="flowForm.flowKey == 'sample_update_flow'">
+          <SampleChangeEHSD
+            ref="makeDom"
+            :queryData="queryData.data"
+          ></SampleChangeEHSD>
+        </template>
 
         <!-- 销售合同 -->
         <template v-else-if="flowForm.flowKey == 'contract_flow'">
@@ -231,6 +238,8 @@ import ContractEHSD from "@/components/process/EHSD/Contract";
 import ContractChangeEHSD from "@/components/process/EHSD/ContractChange";
 // 样品单-EHSD
 import SampleEHSD from "@/components/process/EHSD/Sample";
+// 样品单变更-EHSD
+import SampleChangeEHSD from "@/components/process/EHSD/SampleChange";
 // 采购交接单-EHSD
 import PurchaseEHSD from "@/components/process/EHSD/Purchase";
 // 采购交接单-EHSD
@@ -416,6 +425,8 @@ const handleSubmit = async (_type) => {
                 ehsdJson: ehsdJson,
               };
             });
+          } else if (flowForm.flowKey == "sample_update_flow") {
+            data.dataJson = JSON.stringify(proxy.deepClone(data));
           }
           flowForm.fileList = flowForm.fileList.map((item) => {
             return {
@@ -509,7 +520,10 @@ const skipPage = () => {
       router.replace({
         path: "/ehsd/saleContract/contract",
       });
-    } else if (flowForm.flowKey == "sample_flow") {
+    } else if (
+      flowForm.flowKey == "sample_flow" ||
+      flowForm.flowKey == "sample_update_flow"
+    ) {
       router.replace({
         path: "/ehsd/saleContract/sample",
       });