Ver Fonte

维多利亚需求更改,请款禁用表单bug解决,增加请款附件下载预览

cz há 1 ano atrás
pai
commit
1cc1acdb9d

BIN
src/assets/images/mail/replied.png


+ 0 - 1
src/components/WDLY/process/SendPurchaseWDLY.vue

@@ -207,7 +207,6 @@
                   v-model="row.price"
                   :precision="4"
                   :controls="false"
-                  :min="0"
                   @change="handleChangeAmount"
                 />
               </el-form-item>

+ 35 - 3
src/components/process/SendFunds.vue

@@ -113,15 +113,19 @@
       </el-form-item>
       <div style="margin-bottom: 15px">
         <el-tag
-          style="margin-right: 10px; margin-top: 5px"
+          style="margin-right: 10px; margin-top: 8px"
           class="ml-2"
           type="info"
           v-for="(item, index) in formData.data.fileList"
           :key="index"
           :closable="!route.query.processType"
           @close="handleClose(index)"
-          >{{ item.fileName }}</el-tag
-        >
+          @click="handleClickFile(item)"
+          >{{ item.fileName }}
+          <span style="margin-left: 5px"
+            ><el-icon @click.native.stop="handleClickDownload(item)"
+              ><Download /></el-icon></span
+        ></el-tag>
       </div>
       <div class="_t">请款明细</div>
       <el-form-item>
@@ -495,6 +499,34 @@ const handleBeforeUpload = async (file) => {
 const handleClose = (index) => {
   formData.data.fileList.splice(index, 1);
 };
+
+const handleClickFile = (file) => {
+  const path = file.path ? file.path : file.url ? file.url : "";
+  if (path) {
+    window.open(path, "_blank");
+  }
+};
+
+const handleClickDownload = (file) => {
+  let xhr = new XMLHttpRequest();
+  //域名是华为云的
+  xhr.open("GET", `${file.path}`, true);
+  xhr.responseType = "blob";
+  xhr.send();
+  xhr.onreadystatechange = function () {
+    if (xhr.readyState === 4 && xhr.status === 200) {
+      let url = window.URL.createObjectURL(xhr.response);
+      const a = document.createElement("a");
+      a.href = url;
+      a.download = file.fileName; // 下载后文件名
+      a.style.display = "none";
+      document.body.appendChild(a);
+      a.click(); // 点击下载
+      window.URL.revokeObjectURL(a.href);
+      document.body.removeChild(a); // 下载完成移除元素
+    }
+  };
+};
 // 向父组件暴露
 defineExpose({
   submitData: formData.data,

+ 38 - 1
src/views/WDLY/purchaseManage/alreadyPurchase/index.vue

@@ -259,7 +259,7 @@
                   </div>
                 </template>
               </el-table-column>
-              <el-table-column prop="arrivalQuantity" label="已到货">
+              <!-- <el-table-column prop="arrivalQuantity" label="已到货">
                 <template #default="{ row }">
                   <div>
                     <el-popover
@@ -294,7 +294,44 @@
                     </el-popover>
                   </div>
                 </template>
+              </el-table-column> -->
+              <el-table-column prop="receiptQuantity" label="已入库">
+                <template #default="{ row }">
+                  <div>
+                    <el-popover
+                      placement="bottom-start"
+                      title="入库详情"
+                      :width="500"
+                      trigger="hover"
+                    >
+                      <div default>
+                        <el-table :data="row.receiptList">
+                          <el-table-column
+                            label="入库时间"
+                            prop="createTime"
+                            width="155"
+                          />
+                          <el-table-column
+                            label="入库单号"
+                            prop="logisticsCode"
+                          />
+                          <el-table-column
+                            label="数量"
+                            prop="quantity"
+                            width="100"
+                          />
+                        </el-table>
+                      </div>
+                      <template #reference>
+                        <div style="cursor: pointer; color: #0084ff">
+                          {{ row.receiptQuantity }}
+                        </div>
+                      </template>
+                    </el-popover>
+                  </div>
+                </template>
               </el-table-column>
+
               <el-table-column prop="purchaseBackQuantity" label="退货">
                 <template #default="{ row }">
                   <div>

+ 13 - 8
src/views/WDLY/purchaseManage/purchase/index.vue

@@ -243,6 +243,7 @@ const getList = async (req) => {
     };
   }
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  getDeptList();
   loading.value = true;
   proxy
     .post("/subscribeDetail/pageByWdly", sourceList.value.pagination)
@@ -336,7 +337,17 @@ const start = (type) => {
 const warehouseList = ref([]);
 const productUnit = ref([]);
 const deptData = ref([]);
-
+const getDeptList = () => {
+  proxy
+    .post("/subscribe/getDepts", { status: sourceList.value.pagination.status })
+    .then((res) => {
+      deptData.value = res.data;
+      selectConfig[2].data = res.data.map((x) => ({
+        label: x.deptName,
+        value: x.deptId,
+      }));
+    });
+};
 const getDict = () => {
   proxy.getDict(["unit"]).then((res) => {
     productUnit.value = res["unit"];
@@ -353,13 +364,7 @@ const getDict = () => {
         value: x.id,
       }));
     });
-  proxy.get("/subscribe/getDepts").then((res) => {
-    deptData.value = res.data;
-    selectConfig[2].data = res.data.map((x) => ({
-      label: x.deptName,
-      value: x.deptId,
-    }));
-  });
+  getDeptList();
 };
 getDict();
 getList();

+ 2 - 2
src/views/WDLY/purchaseManage/subscribe/index.vue

@@ -205,13 +205,13 @@ const config = computed(() => {
       // 渲染 el-button,一般用在最后一列。
       renderHTML(row) {
         return [
-          row.status == 30
+          row.status == 15
             ? {
                 attrs: {
                   label: "作废",
                   type: "danger",
                   text: true,
-                  disabled: row.status != 30,
+                  // disabled: row.status != 30,
                 },
                 el: "button",
                 click() {

+ 269 - 250
src/views/login.vue

@@ -1,64 +1,75 @@
 <template>
-	<div class="login">
-		<h1>ByteSailing</h1>
-		<div class="content">
-			<div class="warp-bg">
-				<div class="left-bg">
-					<img src="../assets/images/login-img.png" alt="" />
-					
-					<div class="swiper-text">
-						<el-carousel height="100px" direction="vertical" indicator-position='none' :autoplay="true">
-							<el-carousel-item>
-								<h3>为中小企业提供数字化管理</h3>
-								<p>一站式定制解决方案</p>
-							</el-carousel-item>
-							<el-carousel-item>
-								<h3>物联网筑基,云计算赋能</h3>
-								<p>助力企业实现数字化协同</p>
-							</el-carousel-item>
-							<el-carousel-item>
-								<h3>数据驱动,助力决策</h3>
-								<p>loT-SaaS定制全套解决方案</p>
-							</el-carousel-item>
-						</el-carousel>
-						
-					</div>
-				</div>
-				<div class="right-bg">
-					<el-form ref="loginRef" :model="loginForm" :rules="loginRules" class="login-form">
-						<div class="form" style="margin-top:300px">
-							<div class="">欢迎登录~</div>
-							<h2>ByteSailing 管理系统</h2>
-							<el-form-item prop="tenantId" style="margin-top:30px">
-								<el-input
-									placeholder="请输入租户号"
-									prefix-icon="user"
-									@keyup.enter="handleLogin"
-									autocomplete="email"
-									v-model="loginForm.tenantId">
-									
-								</el-input>
-							</el-form-item>
-							<el-form-item prop="username" style="margin-top:30px">
-								<el-input
-									placeholder="请输入账号"
-									prefix-icon="UserFilled"
-									@keyup.enter="handleLogin"
-									autocomplete="username"
-									v-model="loginForm.username">
-								</el-input>
-							</el-form-item>
-							<el-form-item prop="password" style="margin-top:30px">
-								<el-input
-									placeholder="请输入密码"
-									prefix-icon="View"
-									type="password"
-									v-model="loginForm.password"
-									autocomplete="current-password"
-									@keyup.enter="handleLogin">
-								</el-input>
-							</el-form-item>
-							<!-- <el-form-item prop="code" class="code" style="margin-top:30px">
+  <div class="login">
+    <h1>ByteSailing</h1>
+    <div class="content">
+      <div class="warp-bg">
+        <div class="left-bg">
+          <img src="../assets/images/login-img.png" alt="" />
+
+          <div class="swiper-text">
+            <el-carousel
+              height="100px"
+              direction="vertical"
+              indicator-position="none"
+              :autoplay="true"
+            >
+              <el-carousel-item>
+                <h3>为中小企业提供数字化管理</h3>
+                <p>一站式定制解决方案</p>
+              </el-carousel-item>
+              <el-carousel-item>
+                <h3>物联网筑基,云计算赋能</h3>
+                <p>助力企业实现数字化协同</p>
+              </el-carousel-item>
+              <el-carousel-item>
+                <h3>数据驱动,助力决策</h3>
+                <p>loT-SaaS定制全套解决方案</p>
+              </el-carousel-item>
+            </el-carousel>
+          </div>
+        </div>
+        <div class="right-bg">
+          <el-form
+            ref="loginRef"
+            :model="loginForm"
+            :rules="loginRules"
+            class="login-form"
+          >
+            <div class="form" style="margin-top: 300px">
+              <div class="">欢迎登录~</div>
+              <h2>ByteSailing 管理系统</h2>
+              <el-form-item prop="tenantId" style="margin-top: 30px">
+                <el-input
+                  placeholder="请输入租户号"
+                  prefix-icon="user"
+                  @keyup.enter="handleLogin"
+                  autocomplete="email"
+                  v-model="loginForm.tenantId"
+                >
+                </el-input>
+              </el-form-item>
+              <el-form-item prop="username" style="margin-top: 30px">
+                <el-input
+                  placeholder="请输入账号"
+                  prefix-icon="UserFilled"
+                  @keyup.enter="handleLogin"
+                  autocomplete="username"
+                  v-model="loginForm.username"
+                >
+                </el-input>
+              </el-form-item>
+              <el-form-item prop="password" style="margin-top: 30px">
+                <el-input
+                  placeholder="请输入密码"
+                  prefix-icon="View"
+                  type="password"
+                  v-model="loginForm.password"
+                  autocomplete="current-password"
+                  @keyup.enter="handleLogin"
+                >
+                </el-input>
+              </el-form-item>
+              <!-- <el-form-item prop="code" class="code" style="margin-top:30px">
 								<el-input
 									placeholder="请输入验证码"
 									prefix-icon="ChatSquare"
@@ -67,220 +78,228 @@
 								</el-input>
 								<img :src="codeUrl" @click="getCode" class="login-code-img"/>
 							</el-form-item> -->
-							<div  style="margin-top:30px">
-								<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
-							</div>
-							<el-button type="primary"  @click="handleLogin" style="width:100%;margin-top:30px">登录</el-button>
-						</div>
-					
-					</el-form>
-					
-				</div>
-			</div>
-		</div>
-	</div>
+              <div style="margin-top: 30px">
+                <el-checkbox
+                  v-model="loginForm.rememberMe"
+                  style="margin: 0px 0px 25px 0px"
+                  >记住密码</el-checkbox
+                >
+              </div>
+              <el-button
+                type="primary"
+                @click="handleLogin"
+                style="width: 100%; margin-top: 30px"
+                >登录</el-button
+              >
+            </div>
+          </el-form>
+        </div>
+      </div>
+    </div>
+  </div>
 </template>
 
 <script setup>
-import { getCodeImg } from '@/api/login'
-import Cookies from 'js-cookie'
-import { encrypt, decrypt } from '@/utils/jsencrypt'
-import useUserStore from '@/store/modules/user'
+import { getCodeImg } from "@/api/login";
+import Cookies from "js-cookie";
+import { encrypt, decrypt } from "@/utils/jsencrypt";
+import useUserStore from "@/store/modules/user";
 
-const userStore = useUserStore()
-const router = useRouter()
-const { proxy } = getCurrentInstance()
+const userStore = useUserStore();
+const router = useRouter();
+const { proxy } = getCurrentInstance();
 
 const loginForm = ref({
-	username: '',
-	password: '',
-	rememberMe: false,
-	tenantId:'',
-	code: '',
-	uuid: '',
-})
+  username: "",
+  password: "",
+  rememberMe: false,
+  tenantId: "",
+  code: "",
+  uuid: "",
+});
 
 const loginRules = {
-	username: [{ required: true, trigger: 'blur', message: '请输入您的账号' }],
-	password: [{ required: true, trigger: 'blur', message: '请输入您的密码' }],
-	code: [{ required: true, trigger: 'change', message: '请输入验证码' }],
-}
+  username: [{ required: true, trigger: "blur", message: "请输入您的账号" }],
+  password: [{ required: true, trigger: "blur", message: "请输入您的密码" }],
+  code: [{ required: true, trigger: "change", message: "请输入验证码" }],
+};
 
-const codeUrl = ref('')
-const loading = ref(false)
+const codeUrl = ref("");
+const loading = ref(false);
 // 验证码开关
-const captchaEnabled = ref(true)
+const captchaEnabled = ref(true);
 // 注册开关
-const register = ref(false)
-const redirect = ref(undefined)
+const register = ref(false);
+const redirect = ref(undefined);
 
 function handleLogin() {
-	proxy.$refs.loginRef.validate((valid) => {
-		if (valid) {
-			loading.value = true
-			Cookies.set('tenantId', loginForm.value.tenantId, {
-				expires: 30,
-			})
-			// 勾选了需要记住密码设置在 cookie 中设置记住用户名和密码
-			if (loginForm.value.rememberMe) {
-				Cookies.set('username', loginForm.value.username, {
-					expires: 30,
-				})
-				
-				Cookies.set('password', encrypt(loginForm.value.password), {
-					expires: 30,
-				})
-				Cookies.set('rememberMe', loginForm.value.rememberMe, {
-					expires: 30,
-				})
-			} else {
-				// 否则移除
-				
-				Cookies.remove('username')
-				Cookies.remove('password')
-				Cookies.remove('rememberMe')
-			}
-			// 调用action的登录方法
-			userStore
-				.login(loginForm.value)
-				.then(() => {
-					router.push({ path: redirect.value || '/' })
-				})
-				.catch(() => {
-					loading.value = false
-					// 重新获取验证码
-					if (captchaEnabled.value) {
-						getCode()
-					}
-				})
-		}
-	})
+  proxy.$refs.loginRef.validate((valid) => {
+    if (valid) {
+      loading.value = true;
+      Cookies.set("tenantId", loginForm.value.tenantId, {
+        expires: 30,
+      });
+      // 勾选了需要记住密码设置在 cookie 中设置记住用户名和密码
+      if (loginForm.value.rememberMe) {
+        Cookies.set("username", loginForm.value.username, {
+          expires: 30,
+        });
+
+        Cookies.set("password", encrypt(loginForm.value.password), {
+          expires: 30,
+        });
+        Cookies.set("rememberMe", loginForm.value.rememberMe, {
+          expires: 30,
+        });
+      } else {
+        // 否则移除
+
+        Cookies.remove("username");
+        Cookies.remove("password");
+        Cookies.remove("rememberMe");
+      }
+      // 调用action的登录方法
+      userStore
+        .login(loginForm.value)
+        .then(() => {
+          router.push({ path: redirect.value || "/" });
+          // 登录刷新
+          setTimeout(() => {
+            location.reload();
+          }, 100);
+        })
+        .catch(() => {
+          loading.value = false;
+          // 重新获取验证码
+          if (captchaEnabled.value) {
+            getCode();
+          }
+        });
+    }
+  });
 }
 
 function getCode() {
-	getCodeImg().then((res) => {
-		captchaEnabled.value =
-			res.captchaEnabled === undefined ? true : res.captchaEnabled
-		if (captchaEnabled.value) {
-			codeUrl.value = 'data:image/gif;base64,' + res.img
-			loginForm.value.uuid = res.uuid
-		}
-	})
+  getCodeImg().then((res) => {
+    captchaEnabled.value =
+      res.captchaEnabled === undefined ? true : res.captchaEnabled;
+    if (captchaEnabled.value) {
+      codeUrl.value = "data:image/gif;base64," + res.img;
+      loginForm.value.uuid = res.uuid;
+    }
+  });
 }
 
 function getCookie() {
-	const username = Cookies.get('username')
-	const password = Cookies.get('password')
-	const rememberMe = Cookies.get('rememberMe')
-	const tenantId = Cookies.get('tenantId')
-	loginForm.value = {
-		username: username === undefined ? loginForm.value.username : username,
-		password:
-			password === undefined
-				? loginForm.value.password
-				: decrypt(password),
-		rememberMe: rememberMe === undefined ? false : Boolean(rememberMe),
-		tenantId: tenantId === undefined ? loginForm.value.tenantId : tenantId,
-	}
+  const username = Cookies.get("username");
+  const password = Cookies.get("password");
+  const rememberMe = Cookies.get("rememberMe");
+  const tenantId = Cookies.get("tenantId");
+  loginForm.value = {
+    username: username === undefined ? loginForm.value.username : username,
+    password:
+      password === undefined ? loginForm.value.password : decrypt(password),
+    rememberMe: rememberMe === undefined ? false : Boolean(rememberMe),
+    tenantId: tenantId === undefined ? loginForm.value.tenantId : tenantId,
+  };
 }
 
-getCode()
-getCookie()
+getCode();
+getCookie();
 </script>
 
 <style lang="scss">
-.login{
-	.warp-bg{
-		background: #fff;
-		height: 100vh;
-		width: 100vw;
-		overflow: hidden;
-		.left-bg{
-			width: calc(50vw + 200px);
-			background: #0084FF;
-			height: 100vh;
-			float: left;
-			overflow: hidden;
-			position: relative;
-			img{
-				float: right;
-				margin-right: 75px;
-				margin-top: 120px;
-			}
+.login {
+  .warp-bg {
+    background: #fff;
+    height: 100vh;
+    width: 100vw;
+    overflow: hidden;
+    .left-bg {
+      width: calc(50vw + 200px);
+      background: #0084ff;
+      height: 100vh;
+      float: left;
+      overflow: hidden;
+      position: relative;
+      img {
+        float: right;
+        margin-right: 75px;
+        margin-top: 120px;
+      }
 
-			.swiper-text{
-				position: absolute;
-				right: 164px;
-				top: 120px;
-				color:#fff;
-				overflow: hidden;
-				height: 200px;
-				width: 500px;
-				.el-carousel{
-					width: 100%;
-					height: 100%;
-				}
-				h3{
-					font-size: 40px;
-					font-weight: 400;
-					margin-bottom: 20px;
-					margin-top: 0;
-				}
-				p{
-					font-size: 26px;
-					margin: 0;
-				}
-				p::before{
-					content:' ';
-					border-bottom: 4px solid #fff;
-					display: inline-block;
-					width: 60px;
-					margin-right: 20px;
-					position: relative;
-					top:-5px;
-				}
-			}
-		}
-		.right-bg{
-			width: calc(50vw - 200px);
-			background: url(../assets/images/login-right-bg.png) no-repeat;
-			background-size: cover;
-			height: 100vh;
-			float: right;
-			overflow: hidden;
-			.form{
-				width: 500px;
-				padding:0 75px;
-				box-sizing: border-box;
-				.el-input{
-					input{
-						border:none;
-						border-bottom: 1px solid #DDDDDD;
-					}
-				}
-				.el-input__wrapper{
-					box-shadow:0 0 0 0!important;
-				}
-				.code{
-					position: relative;
-					img{
-						position: absolute;
-						right: 0;
-						bottom: 0;
-					}
-				}
-			}
-		}
-	}
-	h1{
-		position: fixed;
-		left: 40px;
-		top: 0;
-		height: 96px;
-		line-height: 96px;
-		font-size: 26px;
-		color: #fff;
-	}
-	
+      .swiper-text {
+        position: absolute;
+        right: 164px;
+        top: 120px;
+        color: #fff;
+        overflow: hidden;
+        height: 200px;
+        width: 500px;
+        .el-carousel {
+          width: 100%;
+          height: 100%;
+        }
+        h3 {
+          font-size: 40px;
+          font-weight: 400;
+          margin-bottom: 20px;
+          margin-top: 0;
+        }
+        p {
+          font-size: 26px;
+          margin: 0;
+        }
+        p::before {
+          content: " ";
+          border-bottom: 4px solid #fff;
+          display: inline-block;
+          width: 60px;
+          margin-right: 20px;
+          position: relative;
+          top: -5px;
+        }
+      }
+    }
+    .right-bg {
+      width: calc(50vw - 200px);
+      background: url(../assets/images/login-right-bg.png) no-repeat;
+      background-size: cover;
+      height: 100vh;
+      float: right;
+      overflow: hidden;
+      .form {
+        width: 500px;
+        padding: 0 75px;
+        box-sizing: border-box;
+        .el-input {
+          input {
+            border: none;
+            border-bottom: 1px solid #dddddd;
+          }
+        }
+        .el-input__wrapper {
+          box-shadow: 0 0 0 0 !important;
+        }
+        .code {
+          position: relative;
+          img {
+            position: absolute;
+            right: 0;
+            bottom: 0;
+          }
+        }
+      }
+    }
+  }
+  h1 {
+    position: fixed;
+    left: 40px;
+    top: 0;
+    height: 96px;
+    line-height: 96px;
+    font-size: 26px;
+    color: #fff;
+  }
 }
 </style>

+ 201 - 103
src/views/process/processApproval/index.vue

@@ -5,41 +5,108 @@
         <div class="commons-title title">
           {{ route.query.flowName || "流程标题(发起)" }}
         </div>
-        <SendSubscribe ref="makeDom" v-if="flowForm.flowKey == 'subscribe_flow'"></SendSubscribe>
-        <SendPurchase ref="makeDom" v-else-if="flowForm.flowKey == 'purchase_flow'" :queryData="queryData.data"></SendPurchase>
-        <SendFunds ref="makeDom" v-else-if="flowForm.flowKey == 'account_request_funds_flow'" :queryData="queryData.data"></SendFunds>
-        <ReturnGood ref="makeDom" v-else-if="flowForm.flowKey == 'sales_return_flow'" :queryData="queryData.data"></ReturnGood>
-        <PurchaseRefund ref="makeDom" v-else-if="flowForm.flowKey == 'refund_flow'" :queryData="queryData.data"></PurchaseRefund>
-        <PurchasePayment ref="makeDom" v-else-if="flowForm.flowKey == 'pay_flow'" :queryData="queryData.data"></PurchasePayment>
+        <SendSubscribe
+          ref="makeDom"
+          v-if="flowForm.flowKey == 'subscribe_flow'"
+        ></SendSubscribe>
+        <SendPurchase
+          ref="makeDom"
+          v-else-if="flowForm.flowKey == 'purchase_flow'"
+          :queryData="queryData.data"
+        ></SendPurchase>
+        <SendFunds
+          ref="makeDom"
+          v-else-if="flowForm.flowKey == 'account_request_funds_flow'"
+          :queryData="queryData.data"
+        ></SendFunds>
+        <ReturnGood
+          ref="makeDom"
+          v-else-if="flowForm.flowKey == 'sales_return_flow'"
+          :queryData="queryData.data"
+        ></ReturnGood>
+        <PurchaseRefund
+          ref="makeDom"
+          v-else-if="flowForm.flowKey == 'refund_flow'"
+          :queryData="queryData.data"
+        ></PurchaseRefund>
+        <PurchasePayment
+          ref="makeDom"
+          v-else-if="flowForm.flowKey == 'pay_flow'"
+          :queryData="queryData.data"
+        ></PurchasePayment>
         <template v-else-if="flowForm.flowKey == 'sale_quotation_flow'">
-          <PriceSheetEHSD ref="makeDom" v-if="flowForm.tenantType === 'EHSD'" :queryData="queryData.data"></PriceSheetEHSD>
-          <PriceSheet ref="makeDom" v-else :queryData="queryData.data"></PriceSheet>
+          <PriceSheetEHSD
+            ref="makeDom"
+            v-if="flowForm.tenantType === 'EHSD'"
+            :queryData="queryData.data"
+          ></PriceSheetEHSD>
+          <PriceSheet
+            ref="makeDom"
+            v-else
+            :queryData="queryData.data"
+          ></PriceSheet>
         </template>
         <template v-else-if="flowForm.flowKey == 'contract_flow'">
-          <ContractEHSD ref="makeDom" v-if="flowForm.tenantType === 'EHSD'" :queryData="queryData.data"></ContractEHSD>
+          <ContractEHSD
+            ref="makeDom"
+            v-if="flowForm.tenantType === 'EHSD'"
+            :queryData="queryData.data"
+          ></ContractEHSD>
           <Contract ref="makeDom" v-else :queryData="queryData.data"></Contract>
         </template>
         <template v-else-if="flowForm.flowKey == 'sample_flow'">
           <SampleEHSD ref="makeDom" :queryData="queryData.data"></SampleEHSD>
         </template>
         <template v-else-if="flowForm.flowKey == 'ehsd_purchase_flow'">
-          <PurchaseEHSD ref="makeDom" :queryData="queryData.data"></PurchaseEHSD>
+          <PurchaseEHSD
+            ref="makeDom"
+            :queryData="queryData.data"
+          ></PurchaseEHSD>
         </template>
 
-        <ServiceContract ref="makeDom" v-else-if="flowForm.flowKey == 'service_contract_flow'" :queryData="queryData.data"></ServiceContract>
+        <ServiceContract
+          ref="makeDom"
+          v-else-if="flowForm.flowKey == 'service_contract_flow'"
+          :queryData="queryData.data"
+        ></ServiceContract>
         <!-- 维多利亚 -->
-        <SendSubscribeWDLY ref="makeDom" v-else-if="flowForm.flowKey == 'wdly_apply_purchase'" :queryData="queryData.data"></SendSubscribeWDLY>
-        <SendPurchaseWDLY ref="makeDom" v-else-if="flowForm.flowKey == 'wdly_purchase'" :queryData="queryData.data"></SendPurchaseWDLY>
+        <SendSubscribeWDLY
+          ref="makeDom"
+          v-else-if="flowForm.flowKey == 'wdly_apply_purchase'"
+          :queryData="queryData.data"
+        ></SendSubscribeWDLY>
+        <SendPurchaseWDLY
+          ref="makeDom"
+          v-else-if="flowForm.flowKey == 'wdly_purchase'"
+          :queryData="queryData.data"
+        ></SendPurchaseWDLY>
       </div>
       <div class="bottom" v-if="route.query.processType != 20">
         <div class="commons-title title">处理意见</div>
         <el-form :model="flowForm" :rules="flowRules" ref="flowFormDom">
           <el-form-item prop="remark" label-width="0px" label="">
-            <el-input type="textarea" placeholder="请输入" v-model="flowForm.remark"> </el-input>
+            <el-input
+              type="textarea"
+              placeholder="请输入"
+              v-model="flowForm.remark"
+            >
+            </el-input>
           </el-form-item>
           <el-form-item>
-            <el-button type="primary" v-if="approvalRecordData.buttonInfoList.length == 0" @click="handleSubmit">提交</el-button>
-            <el-button type="primary" v-else v-for="i in approvalRecordData.buttonInfoList" :key="i.type" @click="handleSubmit(i.type)">{{ i.name }}</el-button>
+            <el-button
+              type="primary"
+              v-if="approvalRecordData.buttonInfoList.length == 0"
+              @click="handleSubmit"
+              >提交</el-button
+            >
+            <el-button
+              type="primary"
+              v-else
+              v-for="i in approvalRecordData.buttonInfoList"
+              :key="i.type"
+              @click="handleSubmit(i.type)"
+              >{{ i.name }}</el-button
+            >
           </el-form-item>
         </el-form>
       </div>
@@ -52,8 +119,15 @@
               v-for="item in recordList"
               :key="item.id"
               :class="
-                item.status == 2 ? 'flow-orange' : item.status == 3 && !route.query.id ? 'flow-orange' : item.status == 3 && route.query.id ? 'flow-grey' : ''
-              ">
+                item.status == 2
+                  ? 'flow-orange'
+                  : item.status == 3 && !route.query.id
+                  ? 'flow-orange'
+                  : item.status == 3 && route.query.id
+                  ? 'flow-grey'
+                  : ''
+              "
+            >
               <div class="left-icon">
                 <i class="iconfont icon-iconm_daick"></i>
                 <i class="iconfont icon-icomx_quertj1 right-btm-status"></i>
@@ -62,7 +136,9 @@
                 <div class="name">{{ item.nodeName }}</div>
                 <div class="remark">
                   <div class="label">
-                    <span v-if="item.status != 3">办理人:</span>{{ item.processedUser }}<span class="time">{{ item.processedDate }}</span>
+                    <span v-if="item.status != 3">办理人:</span
+                    >{{ item.processedUser
+                    }}<span class="time">{{ item.processedDate }}</span>
                   </div>
                   {{ item.remark }}
                 </div>
@@ -81,8 +157,18 @@
     <el-dialog title="下一处理人" width="400" v-model="dialogVisible">
       <el-form :model="flowForm">
         <el-form-item prop="remark" label="处理人">
-          <el-select v-model="flowForm.handleUserId" placeholder="请选择" filterable style="width: 100%">
-            <el-option v-for="item in nextHandleUser" :label="item.name" :value="item.id"> </el-option>
+          <el-select
+            v-model="flowForm.handleUserId"
+            placeholder="请选择"
+            filterable
+            style="width: 100%"
+          >
+            <el-option
+              v-for="item in nextHandleUser"
+              :label="item.name"
+              :value="item.id"
+            >
+            </el-option>
           </el-select>
         </el-form-item>
         <el-form-item>
@@ -234,16 +320,18 @@ const handleSubmit = async (_type) => {
               data.ehsdJson = JSON.stringify({
                 deliveryTime: data.deliveryTime,
               });
-              data.quotationProductList = data.quotationProductList.map((item) => {
-                let ehsdJson = JSON.stringify({
-                  packMethod: item.packMethod,
-                  tradeMethods: item.tradeMethods,
-                });
-                return {
-                  ...item,
-                  ehsdJson: ehsdJson,
-                };
-              });
+              data.quotationProductList = data.quotationProductList.map(
+                (item) => {
+                  let ehsdJson = JSON.stringify({
+                    packMethod: item.packMethod,
+                    tradeMethods: item.tradeMethods,
+                  });
+                  return {
+                    ...item,
+                    ehsdJson: ehsdJson,
+                  };
+                }
+              );
             }
           } else if (flowForm.flowKey == "contract_flow") {
             if (flowForm.tenantType === "EHSD") {
@@ -272,16 +360,18 @@ const handleSubmit = async (_type) => {
               data.ehsdJson = JSON.stringify({
                 deliveryTime: data.deliveryTime,
               });
-              data.contractProductList = data.contractProductList.map((item) => {
-                let ehsdJson = JSON.stringify({
-                  packMethod: item.packMethod,
-                  tradeMethods: item.tradeMethods,
-                });
-                return {
-                  ...item,
-                  ehsdJson: ehsdJson,
-                };
-              });
+              data.contractProductList = data.contractProductList.map(
+                (item) => {
+                  let ehsdJson = JSON.stringify({
+                    packMethod: item.packMethod,
+                    tradeMethods: item.tradeMethods,
+                  });
+                  return {
+                    ...item,
+                    ehsdJson: ehsdJson,
+                  };
+                }
+              );
             }
           } else if (flowForm.flowKey == "sample_flow") {
             if (data.fileList && data.fileList.length > 0) {
@@ -352,77 +442,83 @@ const handleSubmit = async (_type) => {
 };
 // 页面跳转
 const skipPage = () => {
-  const useTagsStore = useTagsViewStore();
-  console.log(useTagsStore);
-  useTagsStore.delVisitedView(router.currentRoute.value);
-  ElMessage({
-    message: "操作成功!",
-    type: "success",
-  });
-  if (flowForm.flowKey == "subscribe_flow") {
-    router.replace({
-      path: "/ERP/purchaseManage/subscribe",
-    });
-  } else if (flowForm.flowKey == "purchase_flow") {
+  if (route.query.processType === 10) {
     router.replace({
-      path: "/ERP/purchaseManage/purchase",
+      path: "/oa/1/dealWith",
     });
-  } else if (flowForm.flowKey == "sales_return_flow") {
-    router.replace({
-      path: "/ERP/purchaseManage/returnGoods",
-    });
-  } else if (flowForm.flowKey == "account_request_funds_flow") {
-    router.replace({
-      path: "/ERP/fundManage/funds",
-    });
-  } else if (flowForm.flowKey == "refund_flow") {
-    router.replace({
-      path: "/ERP/purchasePayment/invoice",
-    });
-  } else if (flowForm.flowKey == "pay_flow") {
-    router.replace({
-      path: "/ERP/purchasePayment/payment",
+  } else {
+    const useTagsStore = useTagsViewStore();
+    console.log(useTagsStore);
+    useTagsStore.delVisitedView(router.currentRoute.value);
+    ElMessage({
+      message: "操作成功!",
+      type: "success",
     });
-  } else if (flowForm.flowKey == "sale_quotation_flow") {
-    if (flowForm.tenantType === "EHSD") {
+    if (flowForm.flowKey == "subscribe_flow") {
       router.replace({
-        path: "/EHSD/saleContract/priceSheetEHSD",
+        path: "/ERP/purchaseManage/subscribe",
       });
-    } else {
+    } else if (flowForm.flowKey == "purchase_flow") {
       router.replace({
-        path: "/ERP/saleContract/priceSheet",
+        path: "/ERP/purchaseManage/purchase",
       });
-    }
-  } else if (flowForm.flowKey == "contract_flow") {
-    if (flowForm.tenantType === "EHSD") {
+    } else if (flowForm.flowKey == "sales_return_flow") {
+      router.replace({
+        path: "/ERP/purchaseManage/returnGoods",
+      });
+    } else if (flowForm.flowKey == "account_request_funds_flow") {
+      router.replace({
+        path: "/ERP/fundManage/funds",
+      });
+    } else if (flowForm.flowKey == "refund_flow") {
       router.replace({
-        path: "/EHSD/saleContract/contractEHSD",
+        path: "/ERP/purchasePayment/invoice",
       });
-    } else {
+    } else if (flowForm.flowKey == "pay_flow") {
       router.replace({
-        path: "/ERP/saleContract/contract",
+        path: "/ERP/purchasePayment/payment",
+      });
+    } else if (flowForm.flowKey == "sale_quotation_flow") {
+      if (flowForm.tenantType === "EHSD") {
+        router.replace({
+          path: "/EHSD/saleContract/priceSheetEHSD",
+        });
+      } else {
+        router.replace({
+          path: "/ERP/saleContract/priceSheet",
+        });
+      }
+    } else if (flowForm.flowKey == "contract_flow") {
+      if (flowForm.tenantType === "EHSD") {
+        router.replace({
+          path: "/EHSD/saleContract/contractEHSD",
+        });
+      } else {
+        router.replace({
+          path: "/ERP/saleContract/contract",
+        });
+      }
+    } else if (flowForm.flowKey == "sample_flow") {
+      router.replace({
+        path: "/EHSD/saleContract/sampleEHSD",
+      });
+    } else if (flowForm.flowKey == "ehsd_purchase_flow") {
+      router.replace({
+        path: "/EHSD/procurement/purchasedEHSD",
+      });
+    } else if (flowForm.flowKey == "service_contract_flow") {
+      router.replace({
+        path: "/ERP/saleContract/serviceContract",
+      });
+    } else if (flowForm.flowKey == "wdly_purchase") {
+      router.replace({
+        path: "/WDLY/purchaseManage/alreadyPurchase_wdly",
+      });
+    } else if (flowForm.flowKey == "wdly_apply_purchase") {
+      router.replace({
+        path: "/WDLY/purchaseManage/subscribe_wdly",
       });
     }
-  } else if (flowForm.flowKey == "sample_flow") {
-    router.replace({
-      path: "/EHSD/saleContract/sampleEHSD",
-    });
-  } else if (flowForm.flowKey == "ehsd_purchase_flow") {
-    router.replace({
-      path: "/EHSD/procurement/purchasedEHSD",
-    });
-  } else if (flowForm.flowKey == "service_contract_flow") {
-    router.replace({
-      path: "/ERP/saleContract/serviceContract",
-    });
-  } else if (flowForm.flowKey == "wdly_purchase") {
-    router.replace({
-      path: "/WDLY/purchaseManage/alreadyPurchase_wdly",
-    });
-  } else if (flowForm.flowKey == "wdly_apply_purchase") {
-    router.replace({
-      path: "/WDLY/purchaseManage/subscribe_wdly",
-    });
   }
 };
 let queryData = reactive({
@@ -458,9 +554,11 @@ const getRecords = (_id) => {
 onMounted(() => {
   //processType 10 为修改 20为查看
   if (route.query.processType == 10 || route.query.processType == 20) {
-    proxy.post("/flowProcess/getStartData", { flowId: route.query.id }).then((res) => {
-      queryData.data = { ...res };
-    });
+    proxy
+      .post("/flowProcess/getStartData", { flowId: route.query.id })
+      .then((res) => {
+        queryData.data = { ...res };
+      });
   } else {
     queryData.data = { ...route.query };
   }

+ 1 - 0
vite.config.js

@@ -40,6 +40,7 @@ export default defineConfig(({
         // https://cn.vitejs.dev/config/#server-proxy
         '/dev-api': {
           target: 'http://36.134.91.96:9898/test-api',
+          // 正式地址
           // target:"http://139.159.251.109/prod-api",
           changeOrigin: true,
           rewrite: (p) => p.replace(/^\/dev-api/, '')