Browse Source

全新src覆盖

cz 1 year ago
parent
commit
3a47cc83ee

BIN
src.zip


+ 12 - 2
src/assets/css/index.scss

@@ -261,5 +261,15 @@ li {
 }
 
 .van-tabbar--fixed,.van-tabbar{
-    z-index: 10!important;
-}
+    z-index: 3!important;
+}
+
+
+.van-nav-bar{
+    position: fixed!important;
+    top: 0;
+    left: 0;
+    right: 0;
+}
+
+

File diff suppressed because it is too large
+ 15650 - 5176
src/assets/icon/demo_index.html


File diff suppressed because it is too large
+ 1835 - 3
src/assets/icon/iconfont.css


File diff suppressed because it is too large
+ 0 - 0
src/assets/icon/iconfont.js


File diff suppressed because it is too large
+ 3206 - 0
src/assets/icon/iconfont.json


BIN
src/assets/icon/iconfont.ttf


BIN
src/assets/icon/iconfont.woff


BIN
src/assets/icon/iconfont.woff2


BIN
src/assets/images/iconm_dianzyx.png


BIN
src/assets/images/iconm_jichupeiz.png


BIN
src/assets/images/iconm_lissp.png


BIN
src/assets/images/iconm_xiaoxtz.png


+ 7 - 4
src/components/common-list.vue

@@ -11,20 +11,23 @@
             :disabled="optionalValue ? optionalValue != i[optionalKey] : false"
           ></van-checkbox>
         </div>
+        <p>
+          
+        </p>
         <div
           class="center-content"
           style="line-height: 24px"
           @click="listCk(i)"
         >
           <div v-for="j in config" :key="j.prop" style="display: flex">
-            <span>{{ j.label }}:</span>
-            <span v-if="j.type && j.type === 'slot'">
+            <span style="width:72px;">{{ j.label }}:</span>
+            <span v-if="j.type && j.type === 'slot'" style="flex: 1;">
               <slot :name="j.slotName" :row="i">
                 {{ j.slotName }}插槽占位符
               </slot>
             </span>
-            <span v-else>
-              {{ i[j.prop] }}
+            <span v-else  style="flex: 1;">
+              {{ i[j.prop] || ''}}
             </span>
           </div>
         </div>

+ 18 - 2
src/lang/cn.js

@@ -9,7 +9,7 @@ import {
 export const lang = {
 	common: {
 		//消息,工作台,物联网,我的,请输入关键词,添加没有更多了,释放即可刷新,下拉即可刷新,加载中,加载失败,加载完成,没有更多了,返回,提交,修改成功,新增成功,删除成功,确定,取消,提示,自动,手动,正常,运行,离线,明细,请选择,删除,添加明细,标题,请添加明细
-		//操作成功,产品明细,设备状态,正常,工作模式,自动,设备参数,型号,无匹配数据,选择日期,选择时间
+		//操作成功,产品明细,设备状态,正常,工作模式,自动,设备参数,型号,无匹配数据,选择日期,选择时间,查看,合同变更
 		message: '消息',
 		workbench: '工作台',
 		things: '物联网',
@@ -59,6 +59,17 @@ export const lang = {
 		selectTime: '选择时间',
 		selectDate:'选择日期',
 		selectTime:'选择时间',
+		view:'查看',
+		contractChange:'合同变更',
+	},
+	historyMessage:{
+		//历史消息,全部,消息类型,发送时间,消息内容
+		name:'历史消息',
+		all:'全部',
+		messageType:'消息类型',
+		sendTime:'发送时间',
+		messageContent:'消息内容',
+		
 	},
 	processApproval: {
 		//流程办理,流程类型,流程标题,发起人
@@ -902,7 +913,7 @@ export const lang = {
 		myFeedback: '我的反馈',
 	},
 	userCenter: {
-		//客户画像,修改密码,我的反馈,退出登录,您确定退出本次登录么?,退出成功,退出失败
+		//客户画像,修改密码,我的反馈,退出登录,您确定退出本次登录么?,退出成功,退出失败,消息中心,我的邮箱,工作台,待审批,联系我们
 		customerPortrait: '我的',
 		modifyPassword: '修改密码',
 		myFeedback: '我的反馈',
@@ -911,6 +922,11 @@ export const lang = {
 		logOutSuccess: '退出成功',
 		logOutFailed: '退出失败',
 		switchLanguage: 'switch English',
+		messageCenter: '消息中心',
+		myMailbox: '我的邮箱',
+		workbench: '工作台',
+		pendingApproval: '待审批',
+		contactUs: '联系我们',
 
 	},
 	login: {

+ 3 - 1
src/lang/cnLXF.js

@@ -45,6 +45,8 @@ export function cnLXF() {
       accountNameMsg: "请输入账户名",
       accountOpening: "银行账号",
       accountOpeningMsg: "请输入银行账号",
+      accountRemainder: "账户余额",
+      accountRemainderMsg: "多币种,请进入详情查看",
       interbankNumber: "联行号",
       foreignExchange: "外汇信息",
       beneficiaryName: "Beneficiary Name",
@@ -86,7 +88,7 @@ export function cnLXF() {
       followUpRecord: "添加跟进记录",
       date: "跟进时间",
       dateMsg: "请选择跟进时间",
-      customerName: "跟进人",
+      customerName1: "跟进人",
       content: "跟进记录",
       contentTwo: "跟进内容",
       contentTwoMsg: "请输入跟进内容",

+ 11 - 1
src/router/index.js

@@ -508,7 +508,17 @@ const routes = [{
 				path: "standardProductLibraryAdd",
 				name: "标准产品库添加",
 				component: () => import("../views/product-material/standard-product-library/add.vue"),
-			}
+			},
+			{
+				path: "historyMessage",
+				name: "历史消息",
+				component: () => import("../views/message/historyMessage.vue"),
+			},
+			{
+				path: "coming",
+				name: "开发中",
+				component: () => import("../views/home/coming.vue"),
+			},
 			
 		]
 	},

+ 1 - 0
src/views/JXSK/salesContract/index.vue

@@ -15,6 +15,7 @@
   />
   <van-pull-refresh v-model="loading" @refresh="onRefresh">
     <div class="list">
+      0
       <van-list
         v-model:loading="loading"
         :finished="finished"

+ 2 - 2
src/views/customer/file/detail.vue

@@ -132,8 +132,8 @@ const formOptionTwo = reactive({
       },
       {
         type: "input",
-        label: proxy.t("customerFile.customerName"),
-        prop: "customerName",
+        label: proxy.t("customerFile.customerName1"),
+        prop: "followUpUserName",
       },
       {
         type: "input",

+ 4 - 1
src/views/customer/file/index.vue

@@ -44,9 +44,12 @@ const getList = (type) => {
     .then((res) => {
       if (res.data.rows && res.data.rows.length > 0) {
         res.data.rows = res.data.rows.map((item) => {
+          item.countryName = item.countryName ? item.countryName : "";
+          item.provinceName = item.provinceName ? item.provinceName : "";
+          item.cityName = item.cityName ? item.cityName : "";
           return {
             ...item,
-            cityText: item.countryName + "," + item.provinceName + "," + item.cityName,
+            cityText: item.countryName + "," + item.provinceName   + "," + item.cityName ,
           };
         });
       }

+ 46 - 1
src/views/fund/account/index.vue

@@ -42,7 +42,48 @@ const getList = (type) => {
   proxy
     .post("/accountManagement/page", req.value)
     .then((res) => {
-      listData.value = type === "refresh" ? res.data.rows : listData.value.concat(res.data.rows);
+      listData.value =
+        type === "refresh"
+          ? res.data.rows.map((item) => {
+              if (item.accountRemainderList && item.accountRemainderList.length > 0) {
+                let accountRemainder = "";
+                if (item.accountRemainderList.length === 1) {
+                  accountRemainder = item.accountRemainderList[0].currency + " " + item.accountRemainderList[0].remainder;
+                } else {
+                  accountRemainder = proxy.t("account.accountRemainderMsg");
+                }
+                return {
+                  ...item,
+                  accountRemainder: accountRemainder,
+                };
+              } else {
+                return {
+                  ...item,
+                  accountRemainder: "",
+                };
+              }
+            })
+          : listData.value.concat(
+              res.data.rows.map((item) => {
+                if (item.accountRemainderList && item.accountRemainderList.length > 0) {
+                  let accountRemainder = "";
+                  if (item.accountRemainderList.length === 1) {
+                    accountRemainder = item.accountRemainderList[0].currency + " " + item.accountRemainderList[0].remainder;
+                  } else {
+                    accountRemainder = proxy.t("account.accountRemainderMsg");
+                  }
+                  return {
+                    ...item,
+                    accountRemainder: accountRemainder,
+                  };
+                } else {
+                  return {
+                    ...item,
+                    accountRemainder: "",
+                  };
+                }
+              })
+            );
       if (req.value.pageNum * 10 >= res.data.total) {
         finished.value = true;
       }
@@ -75,6 +116,10 @@ const listConfig = ref([
     label: proxy.t("account.accountOpening"),
     prop: "accountOpening",
   },
+  {
+    label: proxy.t("account.accountRemainder"),
+    prop: "accountRemainder",
+  },
 ]);
 </script>
 

+ 24 - 0
src/views/home/coming.vue

@@ -0,0 +1,24 @@
+<template>
+    <div>
+        <van-nav-bar title="coming soon" left-text="" left-arrow @click-left="onClickLeft" >
+			
+		</van-nav-bar>
+        <div class="coming">
+            coming soon...
+        </div>
+    </div>
+</template>
+<script setup>
+import { ref, getCurrentInstance } from "vue";
+const proxy = getCurrentInstance().proxy;
+const onClickLeft = () => proxy.$router.push("/main/working");
+</script>
+<style>
+
+.coming{
+    text-align: center;
+    margin-top: 50%;
+    font-size: 20px;
+    color: #999;
+}
+</style>

+ 140 - 38
src/views/home/index.vue

@@ -1,54 +1,88 @@
 <template>
 	<div class="home">
-		<div class="header">
+		<van-nav-bar :title="$t('userCenter.customerPortrait')" left-text="" >
+			
+		</van-nav-bar>
+		<div class="user-info-card">
+			<div class="img-box">
+				<img src="../../assets/images/people.png" alt="" />
+			</div>
+			<div class="text-box">
+				<div class="name">{{userInfo.nickName}}</div>
+				<div class="company">{{userInfo.dept ? userInfo.dept.deptName  : ''}}</div>
+			</div>
+		</div>
+		<div class="fun-box">
 			<div class="title">
-				<div class="back">
-					<!-- <van-icon name="arrow-left" size='20' /> -->
-				</div>
-				<div class="text">{{$t('userCenter.customerPortrait')}}</div>
-				<div class="more"></div>
+				常用功能
 			</div>
-			<div class="user-info">
-				<div class="user-icon">
-					<img src="../../assets/images/people.png" alt="" />
+			<div class="lists">
+				<div class="fun-item" @click="toRouter('message')">
+					<div class="icon-box">
+						<img src="../../assets/images/iconm_xiaoxtz.png" alt="">
+					</div>
+					<div class="text">{{$t('userCenter.messageCenter')}}</div>
 				</div>
-				<div class="user-text">
-					<div class="name">{{userInfo.nickName}}</div>
-					<div class="company">{{userInfo.dept ? userInfo.dept.deptName  : ''}}</div>
+				<div class="fun-item" @click="toRouter('email')">
+					<div class="icon-box">
+						<img src="../../assets/images/iconm_dianzyx.png" alt="">
+					</div>
+					<div class="text">{{$t('userCenter.myMailbox')}}</div>
 				</div>
-				<div class="more">
-					<van-icon name="arrow" size="16" />
+				<div class="fun-item" @click="toRouter('working')">
+					<div class="icon-box">
+						<img src="../../assets/images/iconm_jichupeiz.png" alt="">
+					</div>
+					<div class="text">{{$t('userCenter.workbench')}}</div>
+				</div>
+				<div class="fun-item" @click="toRouter('processApproval?status=1')">
+					<div class="icon-box">
+						<img src="../../assets/images/iconm_lissp.png" alt="">
+					</div>
+					<div class="text">{{$t('userCenter.pendingApproval')}}</div>
 				</div>
 			</div>
 		</div>
+		
 		<ul class="set-list">
-			<li @click="toRouter('changePassword')">
+			<li @click="switchLanguage()">
 				<div class="icon-box">
-					<i class="iconfont icon-icon_pz"></i>
+					<i class="iconfont icon-iconm_qiehyy"></i>
 				</div>
-				<div class="text">{{$t('userCenter.modifyPassword')}}</div>
+				<div class="text">{{$t('userCenter.switchLanguage')}}</div>
 				<div class="more">
 					<van-icon name="arrow" size="16" />
 				</div>
 			</li>
 			<li @click="toRouter('feedback')">
 				<div class="icon-box">
-					<i class="iconfont icon-icomx_kefu"></i>
+					<i class="iconfont icon-iconm_yijianfk"></i>
 				</div>
 				<div class="text">{{$t('userCenter.myFeedback')}}</div>
 				<div class="more">
 					<van-icon name="arrow" size="16" />
 				</div>
 			</li>
-			<li @click="switchLanguage()">
+			<li @click="toRouter('coming')">
 				<div class="icon-box">
-					<i class="iconfont icon-icomm__earth"></i>
+					<i class="iconfont icon-icomx_message"></i>
 				</div>
-				<div class="text">{{$t('userCenter.switchLanguage')}}</div>
+				<div class="text">{{$t('userCenter.contactUs')}}</div>
+				<div class="more">
+					<van-icon name="arrow" size="16" />
+				</div>
+			</li>
+			<li @click="toRouter('changePassword')">
+				<div class="icon-box">
+					<i class="iconfont icon-icomx_bianj"></i>
+				</div>
+				<div class="text">{{$t('userCenter.modifyPassword')}}</div>
 				<div class="more">
 					<van-icon name="arrow" size="16" />
 				</div>
 			</li>
+			
+			
 		</ul>
 		<van-button class="logout" v-if="!corpId" type="primary" @click="logout" block
 			>{{$t('userCenter.logOut')}}</van-button
@@ -97,35 +131,103 @@ const logout = () => {
 </script>
 <style lang="scss">
 .home {
-	background: #fff;
-	min-height: 100%;
+	min-height: calc(100%);
+	.fun-box{
+		padding: 20px 12px;
+		background: #fff;
+		margin: 12px;
+		border-radius: 12px;
+		.title{
+			margin-bottom: 20px;
+			font-size: 16px;
+			font-weight: bold;
+		}
+		.lists{
+			display: flex;
+			flex-wrap: wrap;
+			justify-content: space-between;
+		}
+		.fun-item {
+			width: 25%;
+			text-align: center;
+			.icon-box{
+				img{
+					width: 32px;
+				}
+			}
+			.text{
+				line-height: 30px;
+				font-size: 14px;
+				color: #333;
+			}
+		}
+	}
+	.user-info-card{
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		padding: 35px 12px;
+		height: 80px;
+		background: linear-gradient(180deg, #46A6FF 0%, #0084FF 100%);
+		margin: 12px;
+		border-radius: 12px;
+		.img-box {
+			width: 60px;
+			height: 60px;
+			background-color: #f1f1f1;
+			border-radius: 50%;
+			text-align: center;
+			img {
+				width: 40px;
+				margin-top: 10px;
+			}
+			overflow: hidden;
+		}
+		.text-box {
+			flex: 1;
+			margin: 0 12px;
+			color: #fff;
+			.name {
+				font-size: 20px;
+				font-weight: bold;
+				margin: 5px 0;
+			}
+			.company {
+				font-size: 14px;
+				
+			}
+		}
+		.more {
+			line-height: 60px;
+			i {
+				color: #999;
+			}
+		}
+	}
 	.van-nav-bar {
 		background: rgba(0, 0, 0, 0);
 	}
 	.logout {
 		border-radius: 22px;
-		background: #eaf0ff;
-		border: 1px solid #eaf0ff;
-		color: #3370ff;
-		width: 80% !important;
-		margin: 0 auto;
-		position: fixed;
-		bottom: 100px;
-		left: 10%;
+		background: #fff;
+		border: 1px solid #fff;
+		color: #0084FF;
+		width: calc(100% - 24px);
+		margin: 0 12px;
+		
 	}
 	.set-list {
-		position: relative;
-		top: -80px;
+		margin: 12px;
 		background: #fff;
-		min-height: 200px;
 		border-radius: 10px;
-		padding-top: 10px;
+		padding: 20px 12px;
+		color: #333;
 		li {
 			display: flex;
 			justify-content: space-between;
 			align-items: center;
 			height: 40px;
-			padding: 0 12px;
+			
 			.icon-box {
 				width: 40px;
 				height: 40px;
@@ -133,12 +235,12 @@ const logout = () => {
 				line-height: 40px;
 				i {
 					font-size: 20px;
-					color: #3370ff;
+					color:#333;
 				}
 			}
 			.text {
 				flex: 1;
-				margin: 0 12px;
+				margin-right:12px;
 				font-size: 16px;
 				color: #333;
 			}

+ 20 - 2
src/views/login.vue

@@ -66,6 +66,13 @@
 			</div>
 
 		</div>
+		<van-dialog v-model:show="langModal" title="选择语言" show-cancel-button @confirm="changeLang">
+			
+			<van-radio-group v-model="langType">
+				<van-radio name="zh-cn" style="height:50px;padding-left: 20px;">简体中文</van-radio>
+				<van-radio name="en-us" style="height:50px;padding-left: 20px;">English</van-radio>
+			</van-radio-group>
+		</van-dialog>
 	</div>
 </template>
 <style lang="scss" scoped>
@@ -134,6 +141,8 @@ import smtLogo from '@/assets/smtLogo.png'
 const route = useRoute()
 const proxy = getCurrentInstance().proxy
 const VUE_APP_USERNAME = ref(process.env.VUE_APP_USERNAME)
+const langModal = ref(false)
+const langType = ref('zh-cn')
 const loginForm = ref({
 	username: '',
 	password: '',
@@ -164,6 +173,12 @@ const onSubmit = () => {
 		})
 }
 
+const changeLang = () => {
+	proxy.$i18n.locale = langType.value
+	window.localStorage.setItem('lang', langType.value)
+	langModal.value = false
+}
+
 const getInfo = () => {
 	proxy.post('getInfo', {}, 'get').then((res) => {
 		console.log(res)
@@ -191,12 +206,15 @@ const getInfo = () => {
 		}
 	})
 }
-console.log(process.env)
 onMounted(() => {
 	let username = window.localStorage.getItem('username')
 	let password = window.localStorage.getItem('password')
 	let tenantId = window.localStorage.getItem('tenantId')
 	let rememberMeCopy = window.localStorage.getItem('rememberMe')
+	let lang = window.localStorage.getItem('lang')
+	if(!lang) {
+		langModal.value = true
+	}
 	if (rememberMeCopy == 'true') {
 		loginForm.value.username = username
 		loginForm.value.password = password
@@ -226,7 +244,7 @@ const ddLoginInit = () => {
 					})
 			},
 			onFail: function (err) {
-				alert("222" + err)
+				
 			},
 		})
 	})

+ 29 - 16
src/views/main.vue

@@ -4,36 +4,34 @@
 			<router-view />
     	</KeepAlive> -->
 		<router-view v-slot="{ Component, route }">
-			<Transition>
 			<keep-alive  include="working">
 				<component v-if="!route.meta.link" :is="Component" :key="route.fullPath"/>
 			</keep-alive>
-			</Transition>
-			
 		</router-view>
 		
 	</div>
-	<van-tabbar v-model="tabType" v-if="routerName != '/main/processDtl'">
-		<van-tabbar-item to="/main/message" :badge="msgCount">
+	<van-tabbar v-model="tabType" v-if="routerName != '/main/processDtl'" :style="isIos() ? 'height:65px' : ''">
+		<van-tabbar-item to="/main/message" :badge="msgCount" :style="isIos() ? 'padding-bottom:15px' : ''">
 			{{$t('common.message')}}
 			<template #icon="props">
 				<i class="icon iconfont icon-btn_shengc_gray1 footer-icon" :class="props.active ? 'footer-icon-active' : ''"></i>
 			</template>
 		</van-tabbar-item>
-		<van-tabbar-item to="/main/working">
+		<van-tabbar-item to="/main/working" :style="isIos() ? 'padding-bottom:15px' : ''">
 			{{$t('common.workbench')}}
 			<template #icon="props">
 				<i class="icon iconfont icon-btn_gongz footer-icon" :class="props.active ? 'footer-icon-active' : ''"></i>
 			</template>
 		</van-tabbar-item>
 		<van-tabbar-item
+			:style="isIos() ? 'padding-bottom:15px' : ''"
 			:to="tenantId == 'smt' ? '/main/xiamenList' : '/main/equipment'"
 			>{{$t('common.things')}}
 			<template #icon="props">
 				<i class="icon iconfont icon-btn_wulw footer-icon" :class="props.active ? 'footer-icon-active' : ''"></i>
 			</template>
 		</van-tabbar-item>
-		<van-tabbar-item icon="setting-o" to="/main/home">
+		<van-tabbar-item icon="setting-o" to="/main/home" :style="isIos() ? 'padding-bottom:15px' : ''">
 			{{$t('common.mine')}}
 			<template #icon="props">
 				<i class="icon iconfont icon-btn_mine footer-icon" :class="props.active ? 'footer-icon-active' : ''"></i>
@@ -58,7 +56,7 @@ const tabType = ref('home')
 const msgCount = ref(0)
 const socketInit = () => {
 	window.ws = new WebSocket(
-		'ws://'+ process.env.VUE_APP_IP +':20001'+ process.env.VUE_APP_WS_API +'/webStock/' +
+		'ws://'+ process.env.VUE_APP_IP + process.env.VUE_APP_WS_API +'/webStock/' +
 			getToken()
 		// 'ws://192.168.1.97:8300/webStock/' + window.localStorage.getItem('token')
 	)
@@ -110,10 +108,19 @@ const socketInit = () => {
 	}
 	window.ws.onerror = function (e) {
 		//如果出现连接、处理、接收、发送数据失败的时候触发onerror事件
-		console.log(error)
+		console.log(e)
 	}
 }
 socketInit()
+
+//判断是否是ios系统
+const isIos = () => {
+	const u = navigator.userAgent
+	const isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/) //ios终端
+	return isIOS
+}
+
+
 //判断是否为开发环境.如果是开发环境,则同步前后台中文配置表
 // const isDev = process.env.NODE_ENV === 'development'
 // if (isDev) {
@@ -165,14 +172,15 @@ watch(router.currentRoute, (to, from) => {
 </script>
 <style lang="scss">
 .main {
-	// position: fixed;
-	// top: 0;
-	// left: 0;
-	// right: 0;
-	// bottom: 50px;
-	padding-bottom:50px;
+	position: absolute;
+	top: 0;
+	left: 0;
+	right: 0;
+	bottom: 0;
+	padding-bottom:65px;
 	overflow-y: auto;
-	z-index: 1000;
+	
+	padding-top:46px;
 }
 .footer-icon{
 	font-size: 20px;
@@ -188,4 +196,9 @@ watch(router.currentRoute, (to, from) => {
 .footer-icon-active{
 	color: #3E7BFA;
 }
+</style>
+<style>
+.van-pull-refresh{
+    flex: 1;
+}
 </style>

+ 136 - 0
src/views/message/historyMessage.vue

@@ -0,0 +1,136 @@
+<template>
+    <van-nav-bar
+      :title="$t('historyMessage.name')"
+      left-text=""
+      left-arrow
+      @click-left="onClickLeft"
+      @click-right="onClickRight"
+    >
+      
+    </van-nav-bar>
+    <van-search
+      v-model="req.keyword"
+      :placeholder="$t('common.pleaseEnterKeywords')"
+      @search="onRefresh"
+    />
+    <van-pull-refresh v-model="loading" @refresh="onRefresh">
+      <div class="list">
+        <van-list
+          v-model:loading="loading"
+          :finished="finished"
+          :finished-text="$t('common.noMore')"
+          @load="getList"
+          style="margin-bottom: 60px"
+        >
+          <commonList :data="listData" @onClick="toDtl" :config="listConfig">
+            <template #typeName="{ row }">
+              <div>消息通知</div>
+            </template>
+          </commonList>
+        </van-list>
+      </div>
+    </van-pull-refresh>
+  </template>
+  <script setup>
+  import { ref, getCurrentInstance } from "vue";
+  import commonList from "@/components/common-list.vue";
+  
+  const proxy = getCurrentInstance().proxy;
+  const onClickLeft = () => proxy.$router.push("/main/working");
+  const req = ref({
+    pageNum: 1,
+    keyword: null,
+  });
+  const finished = ref(false);
+  const onRefresh = () => {
+    req.value.pageNum = 1;
+    finished.value = false;
+    getList("refresh");
+  };
+  const loading = ref(false);
+  const listData = ref([]);
+  const statusData = ref([
+    {
+      label: "草稿",
+      value: 0,
+    },
+    {
+      label: "审批中",
+      value: 10,
+    },
+    {
+      label: "驳回",
+      value: 20,
+    },
+    {
+      label: "审批通过",
+      value: 30,
+    },
+    {
+      label: "终止",
+      value: 99,
+    },
+  ]);
+  const payStatusData = ref([]);
+  const getDict = () => {
+    proxy.getDictOne(["pay_status"]).then((res) => {
+      payStatusData.value = res["pay_status"].data.map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+    });
+  };
+  getDict();
+  const getList = (type) => {
+    loading.value = true;
+    proxy
+      .post("/pushInfo/page", req.value)
+      .then((res) => {
+        listData.value =
+          type === "refresh"
+            ? res.data.rows
+            : listData.value.concat(res.data.rows);
+        if (req.value.pageNum * 10 >= res.data.total) {
+          finished.value = true;
+        }
+        req.value.pageNum++;
+        loading.value = false;
+      })
+      .catch(() => {
+        loading.value = false;
+      });
+  };
+  const toDtl = (row) => {};
+  const onClickRight = () => {
+    proxy.$router.push({
+      path: "/main/processDtl",
+      query: {
+        flowKey: "pay_flow",
+      },
+    });
+  };
+  const listConfig = ref([
+    {
+      type: "slot",
+      label: proxy.t("historyMessage.messageType"),
+      slotName: "typeName",
+    },
+    {
+      label: proxy.t("historyMessage.sendTime"),
+      prop: "createTime",
+    },
+    {
+      label: proxy.t("historyMessage.messageContent"),
+      prop: "title",
+    },
+    
+   
+  ]);
+  </script>
+  
+  <style lang="scss" scoped>
+  .list {
+    min-height: 70vh;
+  }
+  </style>
+  

+ 2 - 2
src/views/message/index.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="message">
         <van-nav-bar title="ByteSailing">
-            <template #right> <van-icon name="more-o" /> </template>
+            
         </van-nav-bar>
         <ul>
             <li  @click="toRouter('announcement')">
@@ -20,7 +20,7 @@
                     <van-icon name="arrow" size='16' />
                 </div>
             </li>
-            <li>
+            <li @click="toRouter('historyMessage')">
                 <div class="icon-box" style="background:#A06CFB">
                     <i  class="iconfont icon-iconm_yewtx"></i>
                 </div>

+ 1013 - 0
src/views/processApproval/components/ContractAlteration.vue

@@ -0,0 +1,1013 @@
+<template>
+    <div class="form">
+      <van-tabs v-model:active="active">
+        <van-tab :title="proxy.t('contract.transactionInformation')" />
+        <van-tab :title="proxy.t('contract.commodityInformation')" />
+        <van-tab :title="proxy.t('contract.otherCharges')" />
+        <van-tab :title="proxy.t('contract.deliveryInformation')" />
+        <van-tab :title="proxy.t('contract.shipmentPlan')" />
+        <div class="common-process-card" v-show="active == 0">
+          <div class="common-title">{{ proxy.t("contract.transactionInformation") }}</div>
+          <testForm v-model="formData.data" :formOption="formOption" :formConfig="formConfig" :rules="rules" ref="formDom1"> </testForm>
+        </div>
+        <div class="common-process-card" v-show="active == 1">
+          <div class="common-title">{{ proxy.t("contract.commodityInformation") }}</div>
+          <testForm v-model="formData.data" :formOption="formGoodsOption" :formConfig="formEmptyConfig" :rules="rules" ref="formDom2"> </testForm>
+          <testForm v-model="formData.data" :formOption="formOption" :formConfig="formAmountProductConfig" :rules="rules" ref="formDom3"> </testForm>
+        </div>
+        <div class="common-process-card" v-show="active == 2">
+          <div class="common-title">{{ proxy.t("contract.otherCharges") }}</div>
+          <testForm v-model="formData.data" :formOption="formProjectOption" :formConfig="formEmptyConfig" :rules="rules" ref="formDom4"> </testForm>
+          <testForm v-model="formData.data" :formOption="formOption" :formConfig="formAmountProjectConfig" :rules="rules" ref="formDom5"> </testForm>
+        </div>
+        <div class="common-process-card" v-show="active == 3">
+          <div class="common-title">{{ proxy.t("contract.deliveryInformation") }}</div>
+          <testForm v-model="formData.data" :formOption="formOption" :formConfig="formDeliveryConfig" :rules="rulesTwo" ref="formDom6"> </testForm>
+        </div>
+        <div class="common-process-card" v-show="active == 4">
+          <div class="common-title">{{ proxy.t("contract.shipmentPlan") }}</div>
+          <testForm v-model="formData.data" :formOption="formShipmentOption" :formConfig="formEmptyConfig" :rules="rulesTwo" ref="formDom7"> </testForm>
+        </div>
+      </van-tabs>
+    </div>
+  </template>
+  
+  <script setup>
+  import { ref, getCurrentInstance, onMounted, defineProps, defineExpose, watch, reactive, toRefs } from "vue";
+  import { useRoute } from "vue-router";
+  import testForm from "@/components/testForm/index.vue";
+  import { getUserInfo } from "@/utils/auth";
+  import { showFailToast } from "vant";
+  
+  // 接收父组件的传值
+  const props = defineProps({
+    queryData: Object,
+  });
+  const refProps = toRefs(props);
+  const proxy = getCurrentInstance().proxy;
+  const route = useRoute();
+  const active = ref(0);
+  const tabsChange = () => {
+    active.value++;
+  };
+  const formData = reactive({
+    data: {
+      contractType: "1",
+      contractProductList: [],
+      contractProjectList: [],
+      contractShipmentList: [],
+    },
+  });
+  const formDom1 = ref(null);
+  const formDom2 = ref(null);
+  const formDom3 = ref(null);
+  const formDom4 = ref(null);
+  const formDom5 = ref(null);
+  const formDom6 = ref(null);
+  const formDom7 = ref(null);
+  const formOption = reactive({
+    readonly: false,
+    disabled: false,
+    labelAlign: "top",
+    scroll: true,
+    labelWidth: "62pk",
+    hiddenSubmitBtn: true,
+  });
+  const formConfig = reactive([
+    {
+      type: "picker",
+      label: proxy.t("contract.contractType"),
+      prop: "contractType",
+      itemType: "onePicker",
+      showPicker: false,
+      fieldNames: {
+        text: "label",
+        value: "value",
+      },
+      data: [],
+    },
+    {
+      type: "picker",
+      label: proxy.t("contract.contractTemplateId"),
+      prop: "contractTemplateId",
+      itemType: "onePicker",
+      showPicker: false,
+      fieldNames: {
+        text: "label",
+        value: "value",
+      },
+      data: [],
+      changeFn: (val, data) => {
+        proxy.formChange(val, data, formData);
+        formData.data.sellCorporationId = "";
+        formData.data.sellCountryName = "";
+        formData.data.sellProvinceName = "";
+        formData.data.sellCityName = "";
+        formData.data.sellAddress = "";
+        formData.data.sellContactName = "";
+        formData.data.sellContactNumber = "";
+        if (val.selectedValues[0]) {
+          proxy.post("/contractTemplate/detail", { id: val.selectedValues[0] }).then((res) => {
+            formData.data.sellCorporationId = res.data.corporationId;
+            if (res.data.corporationId) {
+              proxy.post("/corporation/detail", { id: res.data.corporationId }).then((detailCorporation) => {
+                let sellCity = "";
+                if (detailCorporation.data.countryEnStr) {
+                  formData.data.sellCountryName = detailCorporation.data.countryEnStr;
+                  sellCity = detailCorporation.data.countryEnStr;
+                }
+                if (detailCorporation.data.provinceEnStr) {
+                  formData.data.sellProvinceName = detailCorporation.data.provinceEnStr;
+                  sellCity = sellCity + " " + detailCorporation.data.provinceEnStr;
+                }
+                if (detailCorporation.data.cityEnStr) {
+                  formData.data.sellCityName = detailCorporation.data.cityEnStr;
+                  sellCity = sellCity + " " + detailCorporation.data.cityEnStr;
+                }
+                if (detailCorporation.data.addressEn) {
+                  formData.data.sellAddress = detailCorporation.data.addressEn;
+                }
+                formData.data.sellCity = sellCity;
+                formDom1.value.formDataShowLabelOne();
+              });
+            }
+            formData.data.sellContactName = res.data.contactName;
+            formData.data.sellContactNumber = res.data.contactNumber;
+            formDom1.value.formDataShowLabelOne();
+          });
+        }
+        data.showPicker = false;
+      },
+    },
+    {
+      type: "title",
+      title: proxy.t("contract.sellerInformation"),
+    },
+    {
+      type: "picker",
+      label: proxy.t("contract.sellCorporationId"),
+      prop: "sellCorporationId",
+      itemType: "onePicker",
+      showPicker: false,
+      fieldNames: {
+        text: "label",
+        value: "value",
+      },
+      data: [],
+      readonly: true,
+    },
+    {
+      type: "input",
+      label: proxy.t("contract.cityText"),
+      prop: "sellCity",
+      itemType: "text",
+      readonly: true,
+    },
+    {
+      type: "input",
+      label: proxy.t("contract.address"),
+      prop: "sellAddress",
+      itemType: "textarea",
+    },
+    {
+      type: "input",
+      label: proxy.t("contract.contactName"),
+      prop: "sellContactName",
+      itemType: "text",
+    },
+    {
+      type: "input",
+      label: proxy.t("contract.contactNumber"),
+      prop: "sellContactNumber",
+      itemType: "text",
+    },
+    {
+      type: "title",
+      title: proxy.t("contract.buyerInformation"),
+    },
+    {
+      type: "picker",
+      label: proxy.t("contract.buyCorporationId"),
+      prop: "buyCorporationId",
+      itemType: "onePicker",
+      showPicker: false,
+      fieldNames: {
+        text: "label",
+        value: "value",
+      },
+      data: [],
+      changeFn: (val, data) => {
+        proxy.formChange(val, data, formData);
+        formData.data.buyContactName = "";
+        formData.data.buyContactNumber = "";
+        if (val.selectedValues[0]) {
+          proxy.post("/customer/detail", { id: val.selectedValues[0] }).then((res) => {
+            if (res.data.customerUserList && res.data.customerUserList.length > 0) {
+              formData.data.buyContactName = res.data.customerUserList[0].name;
+              if (res.data.customerUserList[0].contactJson) {
+                let contactJson = JSON.parse(res.data.customerUserList[0].contactJson);
+                if (contactJson && contactJson.length > 0) {
+                  formData.data.buyContactNumber = contactJson[0].contactNo;
+                }
+              }
+            }
+            let countryCityName = "";
+            if (res.data.countryName) {
+              countryCityName = res.data.countryName;
+              if (res.data.provinceName) {
+                countryCityName = countryCityName + " " + res.data.provinceName;
+                if (res.data.cityName) {
+                  countryCityName = countryCityName + " " + res.data.cityName;
+                }
+              }
+            }
+            formData.data.countryCityName = countryCityName;
+            if (res.data.cityId) {
+              formData.data.countryCity = res.data.cityId;
+            } else if (res.data.provinceId) {
+              formData.data.countryCity = res.data.provinceId;
+            } else if (res.data.countryId) {
+              formData.data.countryCity = res.data.countryId;
+            } else {
+              formData.data.countryCity = "";
+            }
+            formData.data.countryId = res.data.countryId;
+            formData.data.provinceId = res.data.provinceId;
+            formData.data.cityId = res.data.cityId;
+            formData.data.buyPostalCode = res.data.zipCode;
+            formData.data.buyAddress = res.data.address;
+          });
+        } else {
+          formData.data.countryId = "";
+          formData.data.provinceId = "";
+          formData.data.cityId = "";
+          formData.data.buyPostalCode = "";
+          formData.data.buyAddress = "";
+        }
+        data.showPicker = false;
+      },
+    },
+    {
+      type: "cascader",
+      label: proxy.t("contract.cityText"),
+      prop: "countryCity",
+      itemType: "city",
+      showPicker: false,
+    },
+    {
+      type: "input",
+      label: proxy.t("contract.address"),
+      prop: "buyAddress",
+      itemType: "textarea",
+    },
+    {
+      type: "input",
+      label: proxy.t("contract.postalCode"),
+      prop: "buyPostalCode",
+      itemType: "text",
+    },
+    {
+      type: "input",
+      label: proxy.t("contract.contactName"),
+      prop: "buyContactName",
+      itemType: "text",
+    },
+    {
+      type: "input",
+      label: proxy.t("contract.contactNumber"),
+      prop: "buyContactNumber",
+      itemType: "text",
+    },
+  ]);
+  const formGoodsOption = reactive({
+    readonly: false,
+    disabled: false,
+    labelAlign: "top",
+    scroll: true,
+    labelWidth: "62pk",
+    hiddenSubmitBtn: true,
+    btnConfig: {
+      isNeed: true,
+      prop: "contractProductList",
+      plain: true,
+      listTitle: proxy.t("contract.commodityInformation"),
+      listConfig: [
+        {
+          type: "picker",
+          label: proxy.t("contract.productId"),
+          prop: "productId",
+          itemType: "onePicker",
+          showPicker: false,
+          readonly: false,
+          fieldNames: {
+            text: "label",
+            value: "value",
+          },
+          data: [],
+          changeFn: (val, data, index, indexTwo, propName) => {
+            let selectList = formData.data[propName].filter((item, itemIndex) => item[data.prop] === val.selectedValues[0] && itemIndex !== index);
+            if (selectList && selectList.length > 0) {
+              return showFailToast(proxy.t("contract.productRepeat"));
+            }
+            formData.data[propName][index][data.prop] = val.selectedValues[0];
+            formData.data.contractShipmentList[index][data.prop] = val.selectedValues[0];
+            let list = data.data.filter((item) => item[data.fieldNames.value] == val.selectedValues[0]);
+            if (list && list.length > 0) {
+              formData.data[propName][index][data.prop + "Name"] = list[0][data.fieldNames.text];
+              let name = list[0].name;
+              if (list[0].standardJson) {
+                let standardJson = JSON.parse(list[0].standardJson);
+                if (standardJson && standardJson.englishName) {
+                  name = standardJson.englishName;
+                }
+              }
+              formData.data[propName][index].productName = name;
+              formData.data[propName][index].productModel = list[0].spec;
+              formData.data.contractShipmentList[index].productName = name;
+            } else {
+              formData.data[propName][index][data.prop + "Name"] = "";
+            }
+            formData.data[propName][index].quantity = null;
+            formData.data[propName][index].price = null;
+            formData.data[propName][index].amount = null;
+            formData.data[propName][index].remark = null;
+            formData.data.contractShipmentList[index].shipmentTime = null;
+            formData.data.contractShipmentList[index].quantity = null;
+            formData.data.contractShipmentList[index].remark = null;
+            data.showPicker = false;
+          },
+        },
+        {
+          type: "input",
+          label: proxy.t("contract.productName"),
+          prop: "productName",
+          itemType: "text",
+        },
+        {
+          type: "input",
+          label: proxy.t("contract.productModel"),
+          prop: "productModel",
+          itemType: "text",
+        },
+        {
+          type: "input",
+          label: proxy.t("contract.quantity"),
+          prop: "quantity",
+          itemType: "number",
+          changeFn: () => {
+            calculatedAmount();
+          },
+        },
+        {
+          type: "input",
+          label: proxy.t("contract.price"),
+          prop: "price",
+          itemType: "number",
+          changeFn: () => {
+            calculatedAmount();
+          },
+        },
+      ],
+      clickFn: () => {
+        if (formData.data.contractProductList && formData.data.contractProductList.length > 0) {
+          formData.data.contractProductList.push({
+            productId: null,
+            productName: null,
+            productModel: null,
+            quantity: null,
+            price: null,
+            amount: null,
+            remark: null,
+          });
+          formData.data.contractShipmentList.push({
+            productId: null,
+            productName: null,
+            shipmentTime: null,
+            quantity: null,
+            remark: null,
+          });
+        } else {
+          formData.data.contractProductList = [
+            {
+              productId: null,
+              productName: null,
+              productModel: null,
+              quantity: null,
+              price: null,
+              amount: null,
+              remark: null,
+            },
+          ];
+          formData.data.contractShipmentList = [
+            {
+              productId: null,
+              productName: null,
+              shipmentTime: null,
+              quantity: null,
+              remark: null,
+            },
+          ];
+        }
+      },
+      deleteFn: (index) => {
+        formData.data.contractProductList.splice(index, 1);
+        formData.data.contractShipmentList.splice(index, 1);
+        handleChangeAmount();
+      },
+    },
+  });
+  const formEmptyConfig = reactive([]);
+  const formAmountProductConfig = reactive([
+    {
+      type: "input",
+      label: proxy.t("contract.amountProduct"),
+      prop: "amountProduct",
+      itemType: "text",
+      readonly: true,
+      placeholder: proxy.t("contract.amountProductPlaceholder"),
+    },
+  ]);
+  const formAmountProjectConfig = reactive([
+    {
+      type: "input",
+      label: proxy.t("contract.amountProject"),
+      prop: "amountProject",
+      itemType: "text",
+      readonly: true,
+      placeholder: proxy.t("contract.amountProjectPlaceholder"),
+    },
+  ]);
+  const formProjectOption = reactive({
+    readonly: false,
+    disabled: false,
+    labelAlign: "top",
+    scroll: true,
+    labelWidth: "62pk",
+    hiddenSubmitBtn: true,
+    btnConfig: {
+      isNeed: true,
+      prop: "contractProjectList",
+      plain: true,
+      listTitle: proxy.t("contract.chargeItem"),
+      listConfig: [
+        {
+          type: "input",
+          label: proxy.t("contract.chargeItem"),
+          prop: "payName",
+          itemType: "text",
+        },
+        {
+          type: "input",
+          label: proxy.t("contract.amount"),
+          prop: "amount",
+          itemType: "number",
+          changeFn: () => {
+            handleChangeAmount();
+          },
+        },
+        {
+          type: "input",
+          label: proxy.t("contract.remark"),
+          prop: "remark",
+          itemType: "textarea",
+        },
+      ],
+      clickFn: () => {
+        if (formData.data.contractProjectList && formData.data.contractProjectList.length > 0) {
+          formData.data.contractProjectList.push({
+            payName: null,
+            amount: null,
+            remark: null,
+          });
+        } else {
+          formData.data.contractProjectList = [
+            {
+              payName: null,
+              amount: null,
+              remark: null,
+            },
+          ];
+        }
+      },
+      deleteFn: (index) => {
+        formData.data.contractProjectList.splice(index, 1);
+        handleChangeAmount();
+      },
+    },
+  });
+  const formDeliveryConfig = reactive([
+    {
+      type: "title",
+      title: proxy.t("contract.collectionInformation"),
+    },
+    {
+      type: "picker",
+      label: proxy.t("contract.currency"),
+      prop: "currency",
+      itemType: "onePicker",
+      showPicker: false,
+      fieldNames: {
+        text: "label",
+        value: "value",
+      },
+      data: [],
+    },
+    {
+      type: "input",
+      label: proxy.t("contract.amountAll"),
+      prop: "amount",
+      itemType: "text",
+      readonly: true,
+      placeholder: proxy.t("contract.amountAllPlaceholder"),
+    },
+    {
+      type: "picker",
+      label: proxy.t("contract.paymentMethod"),
+      prop: "paymentMethod",
+      itemType: "onePicker",
+      showPicker: false,
+      fieldNames: {
+        text: "label",
+        value: "value",
+      },
+      data: [],
+    },
+    {
+      type: "input",
+      label: proxy.t("contract.advanceRatio"),
+      prop: "advanceRatio",
+      itemType: "number",
+      inputFn: (val) => {
+        if (val) {
+          if (val > 100) {
+            formData.data.advanceRatio = 100;
+          } else if (val < 0) {
+            formData.data.advanceRatio = 0;
+          }
+        }
+      },
+    },
+    {
+      type: "picker",
+      label: proxy.t("contract.shroffAccountId"),
+      prop: "shroffAccountId",
+      itemType: "onePicker",
+      showPicker: false,
+      fieldNames: {
+        text: "label",
+        value: "value",
+      },
+      data: [],
+    },
+    {
+      type: "title",
+      title: proxy.t("contract.deliveryInformation"),
+    },
+    {
+      type: "picker",
+      label: proxy.t("contract.tradeMethods"),
+      prop: "tradeMethods",
+      itemType: "onePicker",
+      showPicker: false,
+      fieldNames: {
+        text: "label",
+        value: "value",
+      },
+      data: [],
+    },
+    {
+      type: "picker",
+      label: proxy.t("contract.transportMethod"),
+      prop: "transportMethod",
+      itemType: "onePicker",
+      showPicker: false,
+      fieldNames: {
+        text: "label",
+        value: "value",
+      },
+      data: [],
+    },
+    {
+      type: "input",
+      label: proxy.t("contract.transportRemark"),
+      prop: "transportRemark",
+      itemType: "text",
+    },
+    {
+      type: "input",
+      label: proxy.t("contract.remarks"),
+      prop: "remark",
+      itemType: "textarea",
+    },
+    {
+      type: "input",
+      label: proxy.t("contract.warranty"),
+      prop: "warranty",
+      itemType: "digit",
+    },
+    {
+      type: "input",
+      label: proxy.t("contract.deliveryTime"),
+      prop: "deliveryTime",
+      itemType: "digit",
+    },
+  ]);
+  const formShipmentOption = reactive({
+    readonly: false,
+    disabled: false,
+    labelAlign: "top",
+    scroll: true,
+    labelWidth: "62pk",
+    hiddenSubmitBtn: true,
+    btnConfig: {
+      isNeed: false,
+      prop: "contractShipmentList",
+      plain: true,
+      listTitle: proxy.t("contract.commodity"),
+      listConfig: [
+        {
+          type: "input",
+          label: proxy.t("contract.productName"),
+          prop: "productName",
+          itemType: "text",
+          readonly: true,
+          placeholder: proxy.t("contract.productNamePlaceholder"),
+        },
+        {
+          type: "picker",
+          label: proxy.t("contract.shipmentTime"),
+          prop: "shipmentTime",
+          itemType: "datePicker",
+          showPicker: false,
+          split: "-",
+          columnsType: ["year", "month", "day"],
+        },
+        {
+          type: "input",
+          label: proxy.t("contract.quantityShipment"),
+          prop: "quantity",
+          itemType: "number",
+        },
+      ],
+    },
+  });
+  const rules = {
+    contractType: [{ required: true, message: proxy.t("contract.contractTypeMsg") }],
+    contractTemplateId: [{ required: true, message: proxy.t("contract.contractTemplateIdMsg") }],
+    sellCorporationId: [{ required: true, message: proxy.t("contract.sellCorporationIdMsg") }],
+    buyCorporationId: [{ required: true, message: proxy.t("contract.buyCorporationIdMsg") }],
+    sellCity: [{ required: true, message: proxy.t("contract.cityMsg") }],
+    countryCity: [{ required: true, message: proxy.t("contract.cityMsg") }],
+    sellAddress: [{ required: true, message: proxy.t("contract.addressMsg") }],
+    buyAddress: [{ required: true, message: proxy.t("contract.addressMsg") }],
+    sellContactName: [{ required: true, message: proxy.t("contract.contactNameMsg") }],
+    sellContactNumber: [{ required: true, message: proxy.t("contract.contactNumberMsg") }],
+    // buyPostalCode: [{ required: true, message: proxy.t("contract.postalCodeMsg") }],
+    buyContactName: [{ required: true, message: proxy.t("contract.contactNameMsg") }],
+    buyContactNumber: [{ required: true, message: proxy.t("contract.contactNumberMsg") }],
+    productId: [{ required: true, message: proxy.t("contract.productIdMsg") }],
+    productName: [{ required: true, message: proxy.t("contract.productNameMsg") }],
+    productModel: [{ required: true, message: proxy.t("contract.productModelMsg") }],
+    quantity: [{ required: true, message: proxy.t("contract.quantityMsg") }],
+    price: [{ required: true, message: proxy.t("contract.priceMsg") }],
+    payName: [{ required: true, message: proxy.t("contract.chargeItemMsg") }],
+    amount: [{ required: true, message: proxy.t("contract.amountMsg") }],
+  };
+  const rulesTwo = {
+    currency: [{ required: true, message: proxy.t("contract.currencyMsg") }],
+    paymentMethod: [{ required: true, message: proxy.t("contract.paymentMethodMsg") }],
+    advanceRatio: [{ required: true, message: proxy.t("contract.advanceRatioMsg") }],
+    shroffAccountId: [{ required: true, message: proxy.t("contract.shroffAccountIdMsg") }],
+    tradeMethods: [{ required: true, message: proxy.t("contract.tradeMethodsMsg") }],
+    transportMethod: [{ required: true, message: proxy.t("contract.transportMethodMsg") }],
+    transportRemark: [{ required: true, message: proxy.t("contract.transportRemarkMsg") }],
+    remark: [{ required: true, message: proxy.t("contract.remarksMsg") }],
+  };
+  const getDict = () => {
+    let query = {
+      pageNum: 1,
+      pageSize: 999,
+      tenantId: getUserInfo().tenantId,
+    };
+    proxy.post("/dictTenantData/page", { ...query, dictCode: "contract_type" }).then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formConfig[0].data = res.data.rows.map((item) => {
+          return {
+            label: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
+    proxy.post("/contractTemplate/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formConfig[1].data = res.data.rows.map((item) => {
+          return {
+            ...item,
+            label: item.templateName,
+            value: item.id,
+          };
+        });
+      }
+    });
+    proxy.post("/corporation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formConfig[3].data = res.data.rows.map((item) => {
+          return {
+            ...item,
+            label: item.name,
+            value: item.id,
+          };
+        });
+      }
+    });
+    proxy.post("/productInfo/page", { pageNum: 1, pageSize: 9999, definition: "1" }).then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formGoodsOption.btnConfig.listConfig[0].data = res.data.rows.map((item) => {
+          return {
+            ...item,
+            label: item.name,
+            value: item.id,
+          };
+        });
+      }
+    });
+    proxy.post("/dictTenantData/page", { ...query, dictCode: "account_currency" }).then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formDeliveryConfig[1].data = res.data.rows.map((item) => {
+          return {
+            label: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
+    proxy.post("/dictTenantData/page", { ...query, dictCode: "funds_payment_method" }).then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formDeliveryConfig[3].data = res.data.rows.map((item) => {
+          return {
+            label: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
+    proxy.post("/accountManagement/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formDeliveryConfig[5].data = res.data.rows.map((item) => {
+          return {
+            ...item,
+            label: item.alias,
+            value: item.id,
+          };
+        });
+      }
+    });
+    proxy.post("/dictTenantData/page", { ...query, dictCode: "trade_mode" }).then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formDeliveryConfig[7].data = res.data.rows.map((item) => {
+          return {
+            label: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
+    proxy.post("/dictTenantData/page", { ...query, dictCode: "shipping_method" }).then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formDeliveryConfig[8].data = res.data.rows.map((item) => {
+          return {
+            label: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
+    if (["10", "20"].includes(route.query.processType)) {
+      proxy.post("/customer/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+        if (res.data.rows && res.data.rows.length > 0) {
+          formConfig[9].data = res.data.rows.map((item) => {
+            return {
+              ...item,
+              label: item.name,
+              value: item.id,
+            };
+          });
+        }
+      });
+    } else {
+      proxy.post("/customer/privateSeaPage", { pageNum: 1, pageSize: 999 }).then((res) => {
+        if (res.data.rows && res.data.rows.length > 0) {
+          formConfig[9].data = res.data.rows.map((item) => {
+            return {
+              ...item,
+              label: item.name,
+              value: item.id,
+            };
+          });
+        }
+      });
+    }
+  };
+  getDict();
+  const calculatedAmount = () => {
+    if (formData.data.contractProductList && formData.data.contractProductList.length > 0) {
+      for (let i = 0; i < formData.data.contractProductList.length; i++) {
+        let money = 0;
+        if (formData.data.contractProductList[i].quantity && formData.data.contractProductList[i].price) {
+          money = Number(Math.round(Number(formData.data.contractProductList[i].quantity) * Number(formData.data.contractProductList[i].price) * 10000) / 10000);
+        }
+        formData.data.contractProductList[i].amount = money;
+      }
+    }
+    handleChangeAmount();
+  };
+  const handleChangeAmount = () => {
+    let money = 0;
+    let amountProduct = 0;
+    let amountProject = 0;
+    if (formData.data.contractProductList && formData.data.contractProductList.length > 0) {
+      for (let i = 0; i < formData.data.contractProductList.length; i++) {
+        if (formData.data.contractProductList[i].amount) {
+          money = Number(Math.round((Number(money) + Number(formData.data.contractProductList[i].amount)) * 10000) / 10000);
+          amountProduct = Number(Math.round((Number(amountProduct) + Number(formData.data.contractProductList[i].amount)) * 10000) / 10000);
+        }
+      }
+    }
+    if (formData.data.contractProjectList && formData.data.contractProjectList.length > 0) {
+      for (let i = 0; i < formData.data.contractProjectList.length; i++) {
+        if (formData.data.contractProjectList[i].amount) {
+          money = Number(Math.round((Number(money) + Number(formData.data.contractProjectList[i].amount)) * 10000) / 10000);
+          amountProject = Number(Math.round((Number(amountProject) + Number(formData.data.contractProjectList[i].amount)) * 10000) / 10000);
+        }
+      }
+    }
+    formData.data.amount = money;
+    formData.data.amountProduct = amountProduct;
+    formData.data.amountProject = amountProject;
+  };
+  const handleSubmit = async () => {
+    const flag = await formDom1.value.validateForm().then((status) => {
+      if (status) {
+        active.value = 0;
+        return false;
+      } else {
+        if (!(formData.data.contractProductList && formData.data.contractProductList.length > 0)) {
+          active.value = 1;
+          showFailToast(proxy.t("contract.pleaseAddProduct"));
+          return false;
+        }
+        return formDom2.value.validateForm().then((status1) => {
+          if (status1) {
+            active.value = 1;
+            return false;
+          } else {
+            return formDom4.value.validateForm().then((status2) => {
+              if (status2) {
+                active.value = 2;
+                return false;
+              } else {
+                return formDom6.value.validateForm().then((status3) => {
+                  if (status3) {
+                    active.value = 3;
+                    return false;
+                  } else {
+                    return true;
+                  }
+                });
+              }
+            });
+          }
+        });
+      }
+    });
+    if (flag) {
+      return formData.data;
+    }
+  };
+  let status = ref(true);
+  watch(
+    refProps.queryData,
+    () => {
+      if (refProps.queryData.value && ["10", "20", "30"].includes(route.query.processType)) {
+        for (const key in refProps.queryData.value) {
+          formData.data[key] = refProps.queryData.value[key];
+        }
+        formDom1.value.formDataShowLabelOne();
+        formDom2.value.formDataListShowLabelOne();
+        formDom6.value.formDataShowLabelOne();
+        if (!formData.data.sellCity) {
+          let sellCity = "";
+          if (formData.data.sellCountryName) {
+            sellCity = formData.data.sellCountryName;
+          }
+          if (formData.data.sellProvinceName) {
+            sellCity = sellCity + " " + formData.data.sellProvinceName;
+          }
+          if (formData.data.sellCityName) {
+            sellCity = sellCity + " " + formData.data.sellCityName;
+          }
+          formData.data.sellCity = sellCity;
+        }
+        if (["10", "20"].includes(route.query.processType)) {
+          formOption.readonly = true;
+          formGoodsOption.readonly = true;
+          formGoodsOption.btnConfig.isNeed = false;
+          formProjectOption.readonly = true;
+          formProjectOption.btnConfig.isNeed = false;
+          formShipmentOption.readonly = true;
+        }
+        handleChangeAmount();
+        if (status.value) {
+          if (!formData.data.countryCityName) {
+            if (formData.data.countryId) {
+              let countryCityName = "";
+              formData.data.countryCity = formData.data.countryId;
+              proxy.post("/customizeArea/list", { parentId: "0" }).then((res) => {
+                let list = res.data.filter((item) => item.id == formData.data.countryId);
+                if (list && list.length > 0) {
+                  countryCityName = list[0].name;
+                  formData.data.countryCityName = countryCityName;
+                }
+                if (formData.data.provinceId) {
+                  formData.data.countryCity = formData.data.provinceId;
+                  proxy.post("/customizeArea/list", { parentId: formData.data.countryId }).then((res) => {
+                    let list = res.data.filter((item) => item.id == formData.data.provinceId);
+                    if (list && list.length > 0) {
+                      countryCityName = countryCityName + " " + list[0].name;
+                      formData.data.countryCityName = countryCityName;
+                    }
+                    if (formData.data.cityId) {
+                      formData.data.countryCity = formData.data.cityId;
+                      proxy.post("/customizeArea/list", { parentId: formData.data.provinceId }).then((res) => {
+                        let list = res.data.filter((item) => item.id == formData.data.cityId);
+                        if (list && list.length > 0) {
+                          countryCityName = countryCityName + " " + list[0].name;
+                          formData.data.countryCityName = countryCityName;
+                        }
+                      });
+                    }
+                  });
+                }
+              });
+            }
+          }
+          status.value = false;
+        }
+      }
+    },
+    {
+      deep: true,
+    }
+  );
+  defineExpose({
+    handleSubmit,
+    tabsChange,
+  });
+  onMounted(() => {
+    proxy.post("/contract/detail", { id: route.query.contractId }).then((res) => {
+      
+      for (const key in res.data) {
+        formData.data[key] = res.data[key];
+      }
+      formDom2.value.formDataListShowLabelOne();
+      handleChangeAmount();
+      if (!formData.data.countryCityName) {
+        if (formData.data.buyCountryId) {
+          let countryCityName = "";
+          formData.data.countryCity = formData.data.buyCountryId;
+          proxy.post("/customizeArea/list", { parentId: "0" }).then((res) => {
+            let list = res.data.filter((item) => item.id == formData.data.buyCountryId);
+            if (list && list.length > 0) {
+              countryCityName = list[0].name;
+              formData.data.countryCityName = countryCityName;
+            }
+            if (formData.data.buyProvinceId) {
+              formData.data.countryCity = formData.data.buyProvinceId;
+              proxy.post("/customizeArea/list", { parentId: formData.data.buyCountryId }).then((res) => {
+                let list = res.data.filter((item) => item.id == formData.data.buyProvinceId);
+                if (list && list.length > 0) {
+                  countryCityName = countryCityName + " " + list[0].name;
+                  formData.data.countryCityName = countryCityName;
+                }
+                if (formData.data.buyCityId) {
+                  formData.data.countryCity = formData.data.buyCityId;
+                  proxy.post("/customizeArea/list", { parentId: formData.data.buyProvinceId }).then((res) => {
+                    let list = res.data.filter((item) => item.id == formData.data.buyCityId);
+                    if (list && list.length > 0) {
+                      countryCityName = countryCityName + " " + list[0].name;
+                      formData.data.countryCityName = countryCityName;
+                    }
+                  });
+                }
+              });
+            }
+          });
+        }
+      }
+      
+    })
+  });
+  </script>
+  <style lang="scss" scoped></style>
+  

+ 386 - 189
src/views/processApproval/components/PriceSheet.vue

@@ -6,29 +6,86 @@
       <van-tab :title="proxy.t('priceSheet.otherCharges')" />
       <van-tab :title="proxy.t('priceSheet.otherInformation')" />
       <div class="common-process-card" v-show="active == 0">
-        <div class="common-title">{{ proxy.t("priceSheet.transactionInformation") }}</div>
-        <testForm v-model="formData.data" :formOption="formOption" :formConfig="formConfig" :rules="rules" ref="formDom1"> </testForm>
+        <div class="common-title">
+          {{ proxy.t("priceSheet.transactionInformation") }}
+        </div>
+        <testForm
+          v-model="formData.data"
+          :formOption="formOption"
+          :formConfig="formConfig"
+          :rules="rules"
+          ref="formDom1"
+        >
+        </testForm>
       </div>
       <div class="common-process-card" v-show="active == 1">
-        <div class="common-title">{{ proxy.t("priceSheet.quotationDetails") }}</div>
-        <testForm v-model="formData.data" :formOption="formGoodsOption" :formConfig="formEmptyConfig" :rules="rules" ref="formDom2"> </testForm>
-        <testForm v-model="formData.data" :formOption="formOption" :formConfig="formAmountProductConfig" :rules="rules" ref="formDom3"> </testForm>
+        <div class="common-title">
+          {{ proxy.t("priceSheet.quotationDetails") }}
+        </div>
+        <testForm
+          v-model="formData.data"
+          :formOption="formGoodsOption"
+          :formConfig="formEmptyConfig"
+          :rules="rules"
+          ref="formDom2"
+        >
+        </testForm>
+        <testForm
+          v-model="formData.data"
+          :formOption="formOption"
+          :formConfig="formAmountProductConfig"
+          :rules="rules"
+          ref="formDom3"
+        >
+        </testForm>
       </div>
       <div class="common-process-card" v-show="active == 2">
         <div class="common-title">{{ proxy.t("priceSheet.otherCharges") }}</div>
-        <testForm v-model="formData.data" :formOption="formProjectOption" :formConfig="formEmptyConfig" :rules="rules" ref="formDom4"> </testForm>
-        <testForm v-model="formData.data" :formOption="formOption" :formConfig="formAmountProjectConfig" :rules="rules" ref="formDom5"> </testForm>
+        <testForm
+          v-model="formData.data"
+          :formOption="formProjectOption"
+          :formConfig="formEmptyConfig"
+          :rules="rules"
+          ref="formDom4"
+        >
+        </testForm>
+        <testForm
+          v-model="formData.data"
+          :formOption="formOption"
+          :formConfig="formAmountProjectConfig"
+          :rules="rules"
+          ref="formDom5"
+        >
+        </testForm>
       </div>
       <div class="common-process-card" v-show="active == 3">
-        <div class="common-title">{{ proxy.t("priceSheet.otherInformation") }}</div>
-        <testForm v-model="formData.data" :formOption="formOption" :formConfig="formDeliveryConfig" :rules="rulesTwo" ref="formDom6"> </testForm>
+        <div class="common-title">
+          {{ proxy.t("priceSheet.otherInformation") }}
+        </div>
+        <testForm
+          v-model="formData.data"
+          :formOption="formOption"
+          :formConfig="formDeliveryConfig"
+          :rules="rulesTwo"
+          ref="formDom6"
+        >
+        </testForm>
       </div>
     </van-tabs>
   </div>
 </template>
 
 <script setup>
-import { ref, getCurrentInstance, onMounted, defineProps, defineExpose, watch, reactive, toRefs } from "vue";
+import {
+  ref,
+  getCurrentInstance,
+  onMounted,
+  defineProps,
+  defineExpose,
+  watch,
+  reactive,
+  toRefs,
+} from "vue";
 import { useRoute } from "vue-router";
 import testForm from "@/components/testForm/index.vue";
 import { getUserInfo } from "@/utils/auth";
@@ -87,34 +144,44 @@ const formConfig = reactive([
       formData.data.sellContactName = "";
       formData.data.sellContactNumber = "";
       if (val.selectedValues[0]) {
-        proxy.post("/contractTemplate/detail", { id: val.selectedValues[0] }).then((res) => {
-          formData.data.sellCorporationId = res.data.corporationId;
-          if (res.data.corporationId) {
-            proxy.post("/corporation/detail", { id: res.data.corporationId }).then((detailCorporation) => {
-              let sellCity = "";
-              if (detailCorporation.data.countryEnStr) {
-                formData.data.sellCountryName = detailCorporation.data.countryEnStr;
-                sellCity = detailCorporation.data.countryEnStr;
-              }
-              if (detailCorporation.data.provinceEnStr) {
-                formData.data.sellProvinceName = detailCorporation.data.provinceEnStr;
-                sellCity = sellCity + " " + detailCorporation.data.provinceEnStr;
-              }
-              if (detailCorporation.data.cityEnStr) {
-                formData.data.sellCityName = detailCorporation.data.cityEnStr;
-                sellCity = sellCity + " " + detailCorporation.data.cityEnStr;
-              }
-              if (detailCorporation.data.addressEn) {
-                formData.data.sellAddress = detailCorporation.data.addressEn;
-              }
-              formData.data.sellCity = sellCity;
-              formDom1.value.formDataShowLabelOne();
-            });
-          }
-          formData.data.sellContactName = res.data.contactName;
-          formData.data.sellContactNumber = res.data.contactNumber;
-          formDom1.value.formDataShowLabelOne();
-        });
+        proxy
+          .post("/contractTemplate/detail", { id: val.selectedValues[0] })
+          .then((res) => {
+            formData.data.sellCorporationId = res.data.corporationId;
+            if (res.data.corporationId) {
+              proxy
+                .post("/corporation/detail", { id: res.data.corporationId })
+                .then((detailCorporation) => {
+                  let sellCity = "";
+                  if (detailCorporation.data.countryEnStr) {
+                    formData.data.sellCountryName =
+                      detailCorporation.data.countryEnStr;
+                    sellCity = detailCorporation.data.countryEnStr;
+                  }
+                  if (detailCorporation.data.provinceEnStr) {
+                    formData.data.sellProvinceName =
+                      detailCorporation.data.provinceEnStr;
+                    sellCity =
+                      sellCity + " " + detailCorporation.data.provinceEnStr;
+                  }
+                  if (detailCorporation.data.cityEnStr) {
+                    formData.data.sellCityName =
+                      detailCorporation.data.cityEnStr;
+                    sellCity =
+                      sellCity + " " + detailCorporation.data.cityEnStr;
+                  }
+                  if (detailCorporation.data.addressEn) {
+                    formData.data.sellAddress =
+                      detailCorporation.data.addressEn;
+                  }
+                  formData.data.sellCity = sellCity;
+                  formDom1.value.formDataShowLabelOne();
+                });
+            }
+            formData.data.sellContactName = res.data.contactName;
+            formData.data.sellContactNumber = res.data.contactNumber;
+            formDom1.value.formDataShowLabelOne();
+          });
       }
       data.showPicker = false;
     },
@@ -181,42 +248,49 @@ const formConfig = reactive([
       formData.data.buyContactName = "";
       formData.data.buyContactNumber = "";
       if (val.selectedValues[0]) {
-        proxy.post("/customer/detail", { id: val.selectedValues[0] }).then((res) => {
-          if (res.data.customerUserList && res.data.customerUserList.length > 0) {
-            formData.data.buyContactName = res.data.customerUserList[0].name;
-            if (res.data.customerUserList[0].contactJson) {
-              let contactJson = JSON.parse(res.data.customerUserList[0].contactJson);
-              if (contactJson && contactJson.length > 0) {
-                formData.data.buyContactNumber = contactJson[0].contactNo;
+        proxy
+          .post("/customer/detail", { id: val.selectedValues[0] })
+          .then((res) => {
+            if (
+              res.data.customerUserList &&
+              res.data.customerUserList.length > 0
+            ) {
+              formData.data.buyContactName = res.data.customerUserList[0].name;
+              if (res.data.customerUserList[0].contactJson) {
+                let contactJson = JSON.parse(
+                  res.data.customerUserList[0].contactJson
+                );
+                if (contactJson && contactJson.length > 0) {
+                  formData.data.buyContactNumber = contactJson[0].contactNo;
+                }
               }
             }
-          }
-          let countryCityName = "";
-          if (res.data.countryName) {
-            countryCityName = res.data.countryName;
-            if (res.data.provinceName) {
-              countryCityName = countryCityName + " " + res.data.provinceName;
-              if (res.data.cityName) {
-                countryCityName = countryCityName + " " + res.data.cityName;
+            let countryCityName = "";
+            if (res.data.countryName) {
+              countryCityName = res.data.countryName;
+              if (res.data.provinceName) {
+                countryCityName = countryCityName + " " + res.data.provinceName;
+                if (res.data.cityName) {
+                  countryCityName = countryCityName + " " + res.data.cityName;
+                }
               }
             }
-          }
-          formData.data.countryCityName = countryCityName;
-          if (res.data.cityId) {
-            formData.data.countryCity = res.data.cityId;
-          } else if (res.data.provinceId) {
-            formData.data.countryCity = res.data.provinceId;
-          } else if (res.data.countryId) {
-            formData.data.countryCity = res.data.countryId;
-          } else {
-            formData.data.countryCity = "";
-          }
-          formData.data.countryId = res.data.countryId;
-          formData.data.provinceId = res.data.provinceId;
-          formData.data.cityId = res.data.cityId;
-          formData.data.buyPostalCode = res.data.zipCode;
-          formData.data.buyAddress = res.data.address;
-        });
+            formData.data.countryCityName = countryCityName;
+            if (res.data.cityId) {
+              formData.data.countryCity = res.data.cityId;
+            } else if (res.data.provinceId) {
+              formData.data.countryCity = res.data.provinceId;
+            } else if (res.data.countryId) {
+              formData.data.countryCity = res.data.countryId;
+            } else {
+              formData.data.countryCity = "";
+            }
+            formData.data.countryId = res.data.countryId;
+            formData.data.provinceId = res.data.provinceId;
+            formData.data.cityId = res.data.cityId;
+            formData.data.buyPostalCode = res.data.zipCode;
+            formData.data.buyAddress = res.data.address;
+          });
       } else {
         formData.data.countryId = "";
         formData.data.provinceId = "";
@@ -285,14 +359,20 @@ const formGoodsOption = reactive({
         },
         data: [],
         changeFn: (val, data, index, indexTwo, propName) => {
-          let selectList = formData.data[propName].filter((item, itemIndex) => item[data.prop] === val.selectedValues[0] && itemIndex !== index);
+          let selectList = formData.data[propName].filter(
+            (item, itemIndex) =>
+              item[data.prop] === val.selectedValues[0] && itemIndex !== index
+          );
           if (selectList && selectList.length > 0) {
             return showFailToast(proxy.t("priceSheet.productRepeat"));
           }
           formData.data[propName][index][data.prop] = val.selectedValues[0];
-          let list = data.data.filter((item) => item[data.fieldNames.value] == val.selectedValues[0]);
+          let list = data.data.filter(
+            (item) => item[data.fieldNames.value] == val.selectedValues[0]
+          );
           if (list && list.length > 0) {
-            formData.data[propName][index][data.prop + "Name"] = list[0][data.fieldNames.text];
+            formData.data[propName][index][data.prop + "Name"] =
+              list[0][data.fieldNames.text];
             let name = list[0].name;
             if (list[0].standardJson) {
               let standardJson = JSON.parse(list[0].standardJson);
@@ -344,7 +424,10 @@ const formGoodsOption = reactive({
       },
     ],
     clickFn: () => {
-      if (formData.data.quotationProductList && formData.data.quotationProductList.length > 0) {
+      if (
+        formData.data.quotationProductList &&
+        formData.data.quotationProductList.length > 0
+      ) {
         formData.data.quotationProductList.push({
           productId: null,
           productName: null,
@@ -431,7 +514,10 @@ const formProjectOption = reactive({
       },
     ],
     clickFn: () => {
-      if (formData.data.quotationPayList && formData.data.quotationPayList.length > 0) {
+      if (
+        formData.data.quotationPayList &&
+        formData.data.quotationPayList.length > 0
+      ) {
         formData.data.quotationPayList.push({
           payName: null,
           amount: null,
@@ -559,21 +645,39 @@ const formDeliveryConfig = reactive([
   },
 ]);
 const rules = {
-  contractTemplateId: [{ required: true, message: proxy.t("priceSheet.contractTemplateIdMsg") }],
-  sellCorporationId: [{ required: true, message: proxy.t("priceSheet.sellCorporationIdMsg") }],
-  buyCorporationId: [{ required: true, message: proxy.t("priceSheet.buyCorporationIdMsg") }],
+  contractTemplateId: [
+    { required: true, message: proxy.t("priceSheet.contractTemplateIdMsg") },
+  ],
+  sellCorporationId: [
+    { required: true, message: proxy.t("priceSheet.sellCorporationIdMsg") },
+  ],
+  buyCorporationId: [
+    { required: true, message: proxy.t("priceSheet.buyCorporationIdMsg") },
+  ],
   sellCity: [{ required: true, message: proxy.t("priceSheet.cityMsg") }],
   countryCity: [{ required: true, message: proxy.t("priceSheet.cityMsg") }],
   sellAddress: [{ required: true, message: proxy.t("priceSheet.addressMsg") }],
   buyAddress: [{ required: true, message: proxy.t("priceSheet.addressMsg") }],
-  sellContactName: [{ required: true, message: proxy.t("priceSheet.contactNameMsg") }],
-  sellContactNumber: [{ required: true, message: proxy.t("priceSheet.contactNumberMsg") }],
+  sellContactName: [
+    { required: true, message: proxy.t("priceSheet.contactNameMsg") },
+  ],
+  sellContactNumber: [
+    { required: true, message: proxy.t("priceSheet.contactNumberMsg") },
+  ],
   // buyPostalCode: [{ required: true, message: proxy.t("priceSheet.postalCodeMsg") }],
-  buyContactName: [{ required: true, message: proxy.t("priceSheet.contactNameMsg") }],
-  buyContactNumber: [{ required: true, message: proxy.t("priceSheet.contactNumberMsg") }],
+  buyContactName: [
+    { required: true, message: proxy.t("priceSheet.contactNameMsg") },
+  ],
+  buyContactNumber: [
+    { required: true, message: proxy.t("priceSheet.contactNumberMsg") },
+  ],
   productId: [{ required: true, message: proxy.t("priceSheet.productIdMsg") }],
-  productName: [{ required: true, message: proxy.t("priceSheet.productNameMsg") }],
-  productModel: [{ required: true, message: proxy.t("priceSheet.productModelMsg") }],
+  productName: [
+    { required: true, message: proxy.t("priceSheet.productNameMsg") },
+  ],
+  productModel: [
+    { required: true, message: proxy.t("priceSheet.productModelMsg") },
+  ],
   quantity: [{ required: true, message: proxy.t("priceSheet.quantityMsg") }],
   price: [{ required: true, message: proxy.t("priceSheet.priceMsg") }],
   payName: [{ required: true, message: proxy.t("priceSheet.chargeItemMsg") }],
@@ -582,11 +686,21 @@ const rules = {
 const rulesTwo = {
   currency: [{ required: true, message: proxy.t("priceSheet.currencyMsg") }],
   effective: [{ required: true, message: proxy.t("priceSheet.effectiveMsg") }],
-  paymentMethod: [{ required: true, message: proxy.t("priceSheet.paymentMethodMsg") }],
-  advanceRatio: [{ required: true, message: proxy.t("priceSheet.advanceRatioMsg") }],
-  tradeMethods: [{ required: true, message: proxy.t("priceSheet.tradeMethodsMsg") }],
-  transportMethod: [{ required: true, message: proxy.t("priceSheet.transportMethodMsg") }],
-  transportRemark: [{ required: true, message: proxy.t("priceSheet.transportRemarkMsg") }],
+  paymentMethod: [
+    { required: true, message: proxy.t("priceSheet.paymentMethodMsg") },
+  ],
+  advanceRatio: [
+    { required: true, message: proxy.t("priceSheet.advanceRatioMsg") },
+  ],
+  tradeMethods: [
+    { required: true, message: proxy.t("priceSheet.tradeMethodsMsg") },
+  ],
+  transportMethod: [
+    { required: true, message: proxy.t("priceSheet.transportMethodMsg") },
+  ],
+  transportRemark: [
+    { required: true, message: proxy.t("priceSheet.transportRemarkMsg") },
+  ],
   remark: [{ required: true, message: proxy.t("priceSheet.remarksMsg") }],
 };
 const getDict = () => {
@@ -595,17 +709,19 @@ const getDict = () => {
     pageSize: 999,
     tenantId: getUserInfo().tenantId,
   };
-  proxy.post("/contractTemplate/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    if (res.data.rows && res.data.rows.length > 0) {
-      formConfig[0].data = res.data.rows.map((item) => {
-        return {
-          ...item,
-          label: item.templateName,
-          value: item.id,
-        };
-      });
-    }
-  });
+  proxy
+    .post("/contractTemplate/page", { pageNum: 1, pageSize: 999 })
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formConfig[0].data = res.data.rows.map((item) => {
+          return {
+            ...item,
+            label: item.templateName,
+            value: item.id,
+          };
+        });
+      }
+    });
   proxy.post("/corporation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
     if (res.data.rows && res.data.rows.length > 0) {
       formConfig[2].data = res.data.rows.map((item) => {
@@ -617,71 +733,75 @@ const getDict = () => {
       });
     }
   });
-  proxy.post("/productInfo/page", { pageNum: 1, pageSize: 9999, definition: "1" }).then((res) => {
-    if (res.data.rows && res.data.rows.length > 0) {
-      formGoodsOption.btnConfig.listConfig[0].data = res.data.rows.map((item) => {
-        return {
-          ...item,
-          label: item.name,
-          value: item.id,
-        };
-      });
-    }
-  });
-  proxy.post("/dictTenantData/page", { ...query, dictCode: "account_currency" }).then((res) => {
-    if (res.data.rows && res.data.rows.length > 0) {
-      formDeliveryConfig[1].data = res.data.rows.map((item) => {
-        return {
-          label: item.dictValue,
-          value: item.dictKey,
-        };
-      });
-    }
-  });
-  proxy.post("/dictTenantData/page", { ...query, dictCode: "funds_payment_method" }).then((res) => {
-    if (res.data.rows && res.data.rows.length > 0) {
-      formDeliveryConfig[4].data = res.data.rows.map((item) => {
-        return {
-          label: item.dictValue,
-          value: item.dictKey,
-        };
-      });
-    }
-  });
-  proxy.post("/dictTenantData/page", { ...query, dictCode: "trade_mode" }).then((res) => {
-    if (res.data.rows && res.data.rows.length > 0) {
-      formDeliveryConfig[7].data = res.data.rows.map((item) => {
-        return {
-          label: item.dictValue,
-          value: item.dictKey,
-        };
-      });
-    }
-  });
-  proxy.post("/dictTenantData/page", { ...query, dictCode: "shipping_method" }).then((res) => {
-    if (res.data.rows && res.data.rows.length > 0) {
-      formDeliveryConfig[8].data = res.data.rows.map((item) => {
-        return {
-          label: item.dictValue,
-          value: item.dictKey,
-        };
-      });
-    }
-  });
-  if (["10", "20"].includes(route.query.processType)) {
-    proxy.post("/customer/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+  proxy
+    .post("/productInfo/page", { pageNum: 1, pageSize: 19999, definition: "1" })
+    .then((res) => {
       if (res.data.rows && res.data.rows.length > 0) {
-        formConfig[8].data = res.data.rows.map((item) => {
+        formGoodsOption.btnConfig.listConfig[0].data = res.data.rows.map(
+          (item) => {
+            return {
+              ...item,
+              label: item.name,
+              value: item.id,
+            };
+          }
+        );
+        console.log(formGoodsOption.btnConfig.listConfig[0].data, "wadfzx");
+      }
+    });
+  proxy
+    .post("/dictTenantData/page", { ...query, dictCode: "account_currency" })
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formDeliveryConfig[1].data = res.data.rows.map((item) => {
           return {
-            ...item,
-            label: item.name,
-            value: item.id,
+            label: item.dictValue,
+            value: item.dictKey,
           };
         });
       }
     });
-  } else {
-    proxy.post("/customer/privateSeaPage", { pageNum: 1, pageSize: 999 }).then((res) => {
+  proxy
+    .post("/dictTenantData/page", {
+      ...query,
+      dictCode: "funds_payment_method",
+    })
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formDeliveryConfig[4].data = res.data.rows.map((item) => {
+          return {
+            label: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
+  proxy
+    .post("/dictTenantData/page", { ...query, dictCode: "trade_mode" })
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formDeliveryConfig[7].data = res.data.rows.map((item) => {
+          return {
+            label: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
+  proxy
+    .post("/dictTenantData/page", { ...query, dictCode: "shipping_method" })
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formDeliveryConfig[8].data = res.data.rows.map((item) => {
+          return {
+            label: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
+  if (["10", "20"].includes(route.query.processType)) {
+    proxy.post("/customer/page", { pageNum: 1, pageSize: 999 }).then((res) => {
       if (res.data.rows && res.data.rows.length > 0) {
         formConfig[8].data = res.data.rows.map((item) => {
           return {
@@ -692,16 +812,40 @@ const getDict = () => {
         });
       }
     });
+  } else {
+    proxy
+      .post("/customer/privateSeaPage", { pageNum: 1, pageSize: 999 })
+      .then((res) => {
+        if (res.data.rows && res.data.rows.length > 0) {
+          formConfig[8].data = res.data.rows.map((item) => {
+            return {
+              ...item,
+              label: item.name,
+              value: item.id,
+            };
+          });
+        }
+      });
   }
 };
 getDict();
 const calculatedAmount = () => {
-  if (formData.data.quotationProductList && formData.data.quotationProductList.length > 0) {
+  if (
+    formData.data.quotationProductList &&
+    formData.data.quotationProductList.length > 0
+  ) {
     for (let i = 0; i < formData.data.quotationProductList.length; i++) {
       let money = 0;
-      if (formData.data.quotationProductList[i].quantity && formData.data.quotationProductList[i].price) {
+      if (
+        formData.data.quotationProductList[i].quantity &&
+        formData.data.quotationProductList[i].price
+      ) {
         money = Number(
-          Math.round(Number(formData.data.quotationProductList[i].quantity) * Number(formData.data.quotationProductList[i].price) * 10000) / 10000
+          Math.round(
+            Number(formData.data.quotationProductList[i].quantity) *
+              Number(formData.data.quotationProductList[i].price) *
+              10000
+          ) / 10000
         );
       }
       formData.data.quotationProductList[i].amount = money;
@@ -713,19 +857,48 @@ const handleChangeAmount = () => {
   let money = 0;
   let amountProduct = 0;
   let amountProject = 0;
-  if (formData.data.quotationProductList && formData.data.quotationProductList.length > 0) {
+  if (
+    formData.data.quotationProductList &&
+    formData.data.quotationProductList.length > 0
+  ) {
     for (let i = 0; i < formData.data.quotationProductList.length; i++) {
       if (formData.data.quotationProductList[i].amount) {
-        money = Number(Math.round((Number(money) + Number(formData.data.quotationProductList[i].amount)) * 10000) / 10000);
-        amountProduct = Number(Math.round((Number(amountProduct) + Number(formData.data.quotationProductList[i].amount)) * 10000) / 10000);
+        money = Number(
+          Math.round(
+            (Number(money) +
+              Number(formData.data.quotationProductList[i].amount)) *
+              10000
+          ) / 10000
+        );
+        amountProduct = Number(
+          Math.round(
+            (Number(amountProduct) +
+              Number(formData.data.quotationProductList[i].amount)) *
+              10000
+          ) / 10000
+        );
       }
     }
   }
-  if (formData.data.quotationPayList && formData.data.quotationPayList.length > 0) {
+  if (
+    formData.data.quotationPayList &&
+    formData.data.quotationPayList.length > 0
+  ) {
     for (let i = 0; i < formData.data.quotationPayList.length; i++) {
       if (formData.data.quotationPayList[i].amount) {
-        money = Number(Math.round((Number(money) + Number(formData.data.quotationPayList[i].amount)) * 10000) / 10000);
-        amountProject = Number(Math.round((Number(amountProject) + Number(formData.data.quotationPayList[i].amount)) * 10000) / 10000);
+        money = Number(
+          Math.round(
+            (Number(money) + Number(formData.data.quotationPayList[i].amount)) *
+              10000
+          ) / 10000
+        );
+        amountProject = Number(
+          Math.round(
+            (Number(amountProject) +
+              Number(formData.data.quotationPayList[i].amount)) *
+              10000
+          ) / 10000
+        );
       }
     }
   }
@@ -739,7 +912,12 @@ const handleSubmit = async () => {
       active.value = 0;
       return false;
     } else {
-      if (!(formData.data.quotationProductList && formData.data.quotationProductList.length > 0)) {
+      if (
+        !(
+          formData.data.quotationProductList &&
+          formData.data.quotationProductList.length > 0
+        )
+      ) {
         active.value = 1;
         showFailToast(proxy.t("priceSheet.pleaseAddProduct"));
         return false;
@@ -772,17 +950,21 @@ const handleSubmit = async () => {
     return formData.data;
   }
 };
-const status = ref(false);
+const status = ref(true);
 watch(
   refProps.queryData,
   () => {
-    if (refProps.queryData.value && ["10", "20", "30"].includes(route.query.processType)) {
+    if (
+      refProps.queryData.value &&
+      ["10", "20", "30"].includes(route.query.processType)
+    ) {
       for (const key in refProps.queryData.value) {
         formData.data[key] = refProps.queryData.value[key];
       }
       formDom1.value.formDataShowLabelOne();
       formDom2.value.formDataListShowLabelOne();
       formDom6.value.formDataShowLabelOne();
+      console.log(formData.data, "dwada");
       if (!formData.data.sellCity) {
         let sellCity = "";
         if (formData.data.sellCountryName) {
@@ -810,30 +992,45 @@ watch(
             let countryCityName = "";
             formData.data.countryCity = formData.data.countryId;
             proxy.post("/customizeArea/list", { parentId: "0" }).then((res) => {
-              let list = res.data.filter((item) => item.id == formData.data.countryId);
+              let list = res.data.filter(
+                (item) => item.id == formData.data.countryId
+              );
               if (list && list.length > 0) {
                 countryCityName = list[0].name;
                 formData.data.countryCityName = countryCityName;
               }
               if (formData.data.provinceId) {
                 formData.data.countryCity = formData.data.provinceId;
-                proxy.post("/customizeArea/list", { parentId: formData.data.countryId }).then((res) => {
-                  let list = res.data.filter((item) => item.id == formData.data.provinceId);
-                  if (list && list.length > 0) {
-                    countryCityName = countryCityName + " " + list[0].name;
-                    formData.data.countryCityName = countryCityName;
-                  }
-                  if (formData.data.cityId) {
-                    formData.data.countryCity = formData.data.cityId;
-                    proxy.post("/customizeArea/list", { parentId: formData.data.provinceId }).then((res) => {
-                      let list = res.data.filter((item) => item.id == formData.data.cityId);
-                      if (list && list.length > 0) {
-                        countryCityName = countryCityName + " " + list[0].name;
-                        formData.data.countryCityName = countryCityName;
-                      }
-                    });
-                  }
-                });
+                proxy
+                  .post("/customizeArea/list", {
+                    parentId: formData.data.countryId,
+                  })
+                  .then((res) => {
+                    let list = res.data.filter(
+                      (item) => item.id == formData.data.provinceId
+                    );
+                    if (list && list.length > 0) {
+                      countryCityName = countryCityName + " " + list[0].name;
+                      formData.data.countryCityName = countryCityName;
+                    }
+                    if (formData.data.cityId) {
+                      formData.data.countryCity = formData.data.cityId;
+                      proxy
+                        .post("/customizeArea/list", {
+                          parentId: formData.data.provinceId,
+                        })
+                        .then((res) => {
+                          let list = res.data.filter(
+                            (item) => item.id == formData.data.cityId
+                          );
+                          if (list && list.length > 0) {
+                            countryCityName =
+                              countryCityName + " " + list[0].name;
+                            formData.data.countryCityName = countryCityName;
+                          }
+                        });
+                    }
+                  });
               }
             });
           }

+ 0 - 2
src/views/processApproval/components/SendSubscribe.vue

@@ -59,8 +59,6 @@
 								:name="$t('purchased.procurementDescription')"
 								:label="$t('purchased.procurementDescription')"
 								:placeholder="$t('purchased.pleaseFillInTheProcurementDescription')"
-								
-								
 								rows="3"
 							/>
 						</van-cell-group>

+ 77 - 11
src/views/processApproval/processDtl.vue

@@ -10,14 +10,42 @@
 				"></component>
 		</div>
 		<div class="btn-warp" :class="footerMoreType ? 'open-more' : ''">
-			<div class="more-btn" @click="footerMoreType = true">
-				更多 <van-icon name="arrow-up" />
-			</div>
+			<!-- <div class="more-btn" @click="footerMoreType = !footerMoreType">
+				更多 <van-icon name="arrow-up" v-if="!footerMoreType" /> <van-icon name="arrow-down" v-else />
+			</div> -->
 			<div class="foot-btn-warp" v-if="route.query.processType != 20">
-				<div class="agree-btn" @click="handleSubmit(1)">同意</div>
-				<div class="next-btn" @click="nextFn" v-if="componentObj[route.query.flowKey].tabsNum">下一步</div>
+				<div class="for-btn" v-for="(i,index) in approvalRecordData.buttonInfoList" :key="i.type" v-show="index == 0"  @click="handleSubmit(i.type)">
+					<div>
+						<i class="iconfont" :class="iconObj[i.type]"></i>
+					</div>
+					{{ i.name }}
+				</div>
+				<div class="for-btn"  @click="footerMoreType = !footerMoreType">
+					<div>
+						<i class="iconfont icon-icomx_message"></i>
+					</div>
+					审批意见
+				</div>
+				<div class="for-btn" @click="footerMoreBtnType = !footerMoreBtnType" v-if="approvalRecordData.buttonInfoList.length < 1">
+					<div>
+						<i class="iconfont icon-iconx__caidan1"></i>
+					</div>
+					更多
+				</div>
+				<div class="agree-btn" @click="nextFn" v-if="componentObj[route.query.flowKey].tabsNum">下一步</div>
+				<div class="next-btn" @click="handleSubmit(1)">同意</div>
+				
 			</div>
 		</div>
+		<van-action-sheet v-model:show="footerMoreBtnType" title="更多操作" class="more-modal">
+			<div class="for-btn-more" v-for="(i,index) in approvalRecordData.buttonInfoList" :key="i.type" v-show="index != 0"  @click="handleSubmit(i.type)">
+				<span style="margin-right:20px">
+					<i class="iconfont " :class="iconObj[i.type]"></i>
+				</span>
+				{{ i.name }}
+			</div>
+			<div style="height:50px">1</div>
+		</van-action-sheet>
 		<van-action-sheet v-model:show="footerMoreType" title="审批记录" class="more-modal">
 			<div class="card">
 				<van-steps direction="vertical" :active="stepsNum" class="common-steps">
@@ -51,6 +79,7 @@
 				</div>
 				<div class="content">
 					<div class="foot-btn-warp">
+						
 						<div class="agree-btn" @click="handleSubmit(1)">同意</div>
 						<div class="next-btn" @click="nextFn">下一步</div>
 					</div>
@@ -68,7 +97,7 @@ import PriceSheet from './components/PriceSheet'
 import Contract from './components/Contract'
 import SendPurchase from './components/SendPurchase'
 import SendPurchasePayment from './components/SendPurchasePayment'
-
+import ContractAlteration from './components/ContractAlteration'
 import { showSuccessToast, showFailToast } from 'vant'
 const route = useRoute()
 const proxy = getCurrentInstance().proxy
@@ -78,11 +107,18 @@ const message = ref('')
 const onClickRight = () => {
 	proxy.$router.push('/main/working')
 }
+const iconObj = ref({
+	'2':'icon-icomx_shanchu',
+	'3':'icon-icomx_sent',
+	'4':'icon-iconx_tuihfqr',
+	'5':'icon-iconm_shanchu'
+})
 const makeDom = ref(null)
 let stepsNum = ref(0)
 let queryData = reactive({
 	data: {},
 })
+let footerMoreBtnType = ref(false)
 let footerMoreType = ref(false)
 const flowForm = reactive({
 	flowKey: '',
@@ -125,17 +161,22 @@ let componentObj = ref({
 		backUrl: '/main/contract',
 		tabsNum: 5,
 	},
-	
-		purchase_flow: {
+	purchase_flow: {
 		title: '采购',
 		component: SendPurchase,
 		backUrl: '/main/procureList',
 	},
-		pay_flow: {
+	pay_flow: {
 		title: '采购付款',
 		component: SendPurchasePayment,
 		backUrl: '/main/purchasePayment',
 	},
+	contract_update_flow: {
+		title: '销售合同变更',
+		component: ContractAlteration,
+		backUrl: '/main/contract',
+		tabsNum: 5,
+	},
 })
 
 let dialogVisible = ref(false)
@@ -228,6 +269,8 @@ const getRecords = (_id) => {
 				recordList.value = res.data.recordList
 				queryData.data.recordList = res.data.recordList
 				approvalRecordData.value = res.data
+				//删除type为1的按钮
+				approvalRecordData.value.buttonInfoList = approvalRecordData.value.buttonInfoList.filter((item) => item.type != 1)
 
 			})
 	} else {
@@ -283,12 +326,22 @@ onMounted(async () => {
 			padding: 5px 10px;
 		}
 	}
-
+	.for-btn-more {
+		height: 50px;
+		line-height: 50px;
+		text-align: center;
+		display: flex;
+		width: 100vw;
+		font-size: 16px;
+		padding: 0 12px;
+		font-size: 12px;
+	}
 	.load-btn-box {
 		height: 50px;
 		text-align: center;
 		padding: 9px;
 		box-sizing: border-box;
+		margin-bottom: 50px;
 	}
 
 	.foot-btn-warp {
@@ -298,7 +351,20 @@ onMounted(async () => {
 		display: flex;
 		width: 100vw;
 		font-size: 16px;
-
+		.for-btn{
+			flex: 1;
+			background: #fff;
+			color: #999999;
+			font-size: 12px;
+			text-align: center;
+			height: 50px;
+			line-height: 15px;
+			padding: 10px 0;
+			box-sizing: border-box;
+			i{
+				font-size: 24px;
+			}
+		}
 		.agree-btn {
 			flex: 1;
 			background: #eaf0ff;

+ 41 - 8
src/views/salesContract/contract/index.vue

@@ -10,6 +10,7 @@
       </van-list>
     </div>
   </van-pull-refresh>
+  <van-action-sheet v-model:show="actionType" :actions="actions" @select="onSelect" />
 </template>
 <script setup>
 import { ref, getCurrentInstance } from "vue";
@@ -25,6 +26,20 @@ const onClickRight = () => {
     },
   });
 };
+const actionType = ref(false);
+const actions = ref([
+  {
+    name: proxy.t("common.view"),
+    type: "1",
+  },
+  {
+    name: proxy.t("common.contractChange"),
+    type: "2",
+  },
+  {
+    name: proxy.t("common.cancel"),
+  },
+]);
 const req = ref({
   pageNum: 1,
   keyword: null,
@@ -61,15 +76,33 @@ const getList = (type) => {
       loading.value = false;
     });
 };
+let rowData = ref({});
+const onSelect = (item) => {
+  if (item.type === "1") {
+    proxy.$router.push({
+      path: "/main/processDtl",
+      query: {
+        flowKey: "contract_flow",
+        id: rowData.value.flowId,
+        processType: 20,
+      },
+    });
+  } else if (item.type === "2") {
+    proxy.$router.push({
+      path: "/main/processDtl",
+      query: {
+        flowKey: "contract_update_flow",
+        flowName:'销售合同变更',
+        contractId: rowData.value.id,
+      },
+    });
+  } else{
+    actionType.value = false;
+  }
+};
 const toDtl = (row) => {
-  proxy.$router.push({
-    path: "/main/processDtl",
-    query: {
-      flowKey: "contract_flow",
-      id: row.flowId,
-      processType: 20,
-    },
-  });
+  actionType.value = true;
+  rowData.value = row;
 };
 const listConfig = ref([
   {

+ 2 - 0
src/views/working/index.vue

@@ -139,6 +139,8 @@ onActivated(() => {
   background-color: #f1f1f1;
   padding: 12px;
   color: #333;
+  position: relative;
+  top:-46px;
   
   .my-swipe{
     height: 150px;

Some files were not shown because too many files changed in this diff