Browse Source

流程页调整

lxf 1 year ago
parent
commit
c421cb35ec

+ 0 - 104
src/views/process/processApproval/auxiliary.vue

@@ -1,104 +0,0 @@
-<template>
-	<div class="auxiliary">
-		<el-collapse>
-			<el-collapse-item :title="i.label" v-for="(i,index) in data" :key='i.label' :name="index">
-				<ul>
-					<li v-for="(j,jindex) in i.data" :key="jindex">
-						<div class="list-box" v-for="n in j" :key='n.label' :style="n.num ? `width:${100/n.num}%` : ''">
-							<div class="label">{{n.label}}:</div>
-							<div 
-								class="value" 
-								:class="n.fn ? 'color-bl' : ''" 
-								@click="n.fn ? n.fn(n) : ''"
-								:style="n.style || ''">
-								{{n.value}}
-							</div>
-						</div>
-					</li>
-				</ul>
-			</el-collapse-item>
-		</el-collapse>
-	</div>
-</template>
-<script setup>
-import { defineProps } from 'vue'
-const { proxy } = getCurrentInstance()
-defineProps({
-	data: {
-		type: Array,
-		default: [],
-	},
-})
-console.log(proxy.data)
-</script>
-<style>
-.auxiliary .el-collapse-item{
-	border:1px solid #dddddd;
-	margin-bottom:20px;
-}
-.auxiliary .el-collapse-item__header{
-	border:none !important;
-	padding-left: 20px;
-	font-size: 14px;
-	font-weight: bold;
-}
-.el-collapse-item__wrap{
-	border:none !important;
-}
-.el-collapse-item__wrap{
-	padding: 0 20px;
-}
-.el-collapse-item__content{
-	padding-bottom:10px;
-}
-
-.el-collapse{
-	border:none;
-}
-</style>
-<style lang="scss">
-.auxiliary {
-	ul {
-		padding: 0;
-		margin: 0;
-		li {
-			list-style: none;
-			padding: 15px 15px;
-			background: #f1f1f1;
-			overflow: hidden;
-			margin-bottom: 10px;
-			border-radius: 2px 2px 2px 2px;
-			.list-box {
-				float: left;
-				width: 50%;
-				padding: 0 5px;
-				box-sizing: border-box;
-				.label {
-					width: 70px;
-					text-align: right;
-					color: #666;
-					font-size: 14px;
-					float: left;
-					line-height: 30px;
-				}
-				.value {
-					flex: 1;
-					float: left;
-					font-size: 14px;
-					line-height: 30px;
-					color: #333;
-					width: calc(100% - 70px);
-				}
-				.color-bl{
-					color: #0084FF;
-					cursor: pointer;
-				}
-			}
-		}
-		li:hover{
-			background: #EFF6FF;
-		}
-	
-	}
-}
-</style>

+ 18 - 75
src/views/process/processApproval/index.vue

@@ -3,14 +3,10 @@
     <div class="left-card">
       <div class="top">
         <div class="commons-title title">
-          {{
-            processConfig[route.query.flowKey]
-              ? processConfig[route.query.flowKey].name + `(${processStaus[route.query.processType] || "发起"})`
-              : "流程标题(发起)"
-          }}
+          {{ route.query.flowName ? route.query.flowName : "流程标题(发起)" }}
         </div>
         <div class="line"></div>
-        <!-- <SendSubscribe ref="makeDom" @auxiliaryChange='(e) => getAuxiliaryData(e)' v-if="flowForm.flowKey == 'subscribe_flow'" :queryData="queryData.data"></SendSubscribe> -->
+        
       </div>
       <div class="bottom" v-if="route.query.processType != 20">
         <div class="commons-title title">处理意见</div>
@@ -18,18 +14,6 @@
           <el-form-item prop="remark" label-width="0px" label="">
             <el-input type="textarea" placeholder="请输入" v-model="flowForm.remark"> </el-input>
           </el-form-item>
-          <!-- <el-form-item prop="remark" label-width="80px" label="附件上传">
-            <el-upload
-              v-model:fileList="flowForm.fileList"
-              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-              :data="uploadData"
-              multiple
-              :before-upload="uploadFile"
-              :on-success="handleSuccess"
-              :on-preview="onPreviewFile">
-              <el-button>选择</el-button>
-            </el-upload>
-          </el-form-item> -->
           <el-form-item>
             <el-button type="primary" v-if="approvalRecordData.buttonInfoList.length == 0" @click="handleSubmit" :loading="btnLoading">提交</el-button>
             <el-button type="primary" v-else v-for="i in approvalRecordData.buttonInfoList" :key="i.type" :loading="btnLoading" @click="handleSubmit(i.type)">
@@ -77,11 +61,6 @@
             </li>
           </ul>
         </el-tab-pane>
-        <el-tab-pane label="决策辅助" name="second" v-if="auxiliaryData.length > 0">
-          <div style="overflow: auto; height: calc(100vh - 200px)">
-            <auxiliary :data="auxiliaryData"></auxiliary>
-          </div>
-        </el-tab-pane>
       </el-tabs>
     </div>
 
@@ -105,28 +84,12 @@
 <script setup name="ProcessApproval">
 import useTagsViewStore from "@/store/modules/tagsView.js";
 import { useRouter, useRoute } from "vue-router";
-//决策辅助
-import auxiliary from "./auxiliary";
-// 消息提示
 import { ElMessage } from "element-plus";
 
-const processConfig = ref({
-  subscribe_flow: { name: "申购" },
-});
-const processStaus = ref({
-  10: "审批",
-  20: "查看",
-  30: "退回发起",
-});
-
 const router = useRouter();
 const route = useRoute();
 // tab切换逻辑
 const activeName = ref("first");
-let auxiliaryData = ref([]);
-const getAuxiliaryData = (data) => {
-  auxiliaryData.value = data;
-};
 const btnLoading = ref(false);
 // 意见表单
 const flowForm = reactive({
@@ -137,8 +100,6 @@ const flowForm = reactive({
   data: {},
   fileList: [],
 });
-
-const uploadData = ref({});
 const flowRules = reactive({
   // remark: [{ required: true, message: "请输入处理意见", trigger: "blur" }],
 });
@@ -165,23 +126,6 @@ const handleResult = (res) => {
     nextHandleUser.value = res.userList;
   }
 };
-
-const uploadFile = async (file) => {
-  const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
-  uploadData.value = res.uploadBody;
-  file.id = res.id;
-  file.fileName = res.fileName;
-  file.fileUrl = res.fileUrl;
-  file.uploadState = true;
-  return true;
-};
-const handleSuccess = (any, UploadFile) => {
-  UploadFile.raw.uploadState = false;
-};
-const onPreviewFile = (file) => {
-  window.open(file.raw.fileUrl, "_blank");
-};
-
 // 提交逻辑
 const handleSubmit = async (_type) => {
   try {
@@ -255,14 +199,11 @@ const skipPage = () => {
       path: "/oa/1/dealWith",
     });
   } else {
-    ElMessage({
-      message: "操作成功!",
-      type: "success",
-    });
-    if (flowForm.flowKey == "subscribe_flow") {
-      // router.replace({
-      //   path: "/ERP/purchaseManage/subscribe",
-      // });
+    ElMessage({ message: "操作成功!", type: "success" });
+    if (flowForm.flowKey == "apply_buy") {
+      router.replace({
+        path: "/group/oa/subscribe",
+      });
     }
   }
 };
@@ -334,20 +275,19 @@ onMounted(async () => {
 .processApproval {
   display: flex;
   justify-content: space-between;
-  margin-top: 20px;
-  padding: 0 20px;
-  height: calc(100vh - 130px);
+  height: calc(100vh - 120px);
   .left-card {
     border-radius: 4px;
-    width: calc(100% - 400px - 20px);
-    margin-right: 20px;
+    width: calc(100% - 400px - 10px);
+    margin-right: 10px;
     display: flex;
     flex-direction: column;
     .top {
       flex: 1;
       overflow-y: auto;
+      overflow-x: hidden;
       background: #fff;
-      padding: 20px 20px 0px 20px;
+      padding: 20px;
       .line {
         border-bottom: 1px solid #ddd;
         margin-bottom: 20px;
@@ -355,9 +295,11 @@ onMounted(async () => {
     }
     .bottom {
       margin-top: 10px;
-      height: 220px;
+      height: 200px;
       background: #fff;
-      padding: 20px 20px 0px 20px;
+      padding: 20px;
+      overflow-y: auto;
+      overflow-x: hidden;
     }
   }
   .right-card {
@@ -367,7 +309,8 @@ onMounted(async () => {
     width: 400px;
     box-sizing: border-box;
     .flow-chart {
-      overflow: auto;
+      overflow-y: auto;
+      overflow-x: hidden;
       height: calc(100vh - 200px);
       padding: 0;
       margin: 0;

+ 0 - 65
src/views/process/processApproval/purchaseAuxiliary.vue

@@ -1,65 +0,0 @@
-<template>
-  <div>
-    <el-collapse v-model="activeNames" @change="handleChange">
-      <el-collapse-item title="关联销售合同" name="1">
-        <div class="item">
-          <div>合同编号:</div>
-          <div>下单日期:</div>
-        </div>
-      </el-collapse-item>
-    </el-collapse>
-    <el-collapse
-      v-model="activeNamesOne"
-      @change="handleChange"
-      style="margin-top: 10px"
-    >
-      <el-collapse-item title="供应商最近采购" name="1">
-        <div class="item">
-          <div>合同编号:</div>
-          <div>下单日期:</div>
-          <div>合同金额:</div>
-        </div>
-      </el-collapse-item>
-    </el-collapse>
-    <el-collapse
-      v-model="activeNamesTwo"
-      @change="handleChange"
-      style="margin-top: 10px"
-    >
-      <el-collapse-item title="产品价格" name="1">
-        <div class="item">
-          <div>产品名称:</div>
-          <div>最近价格:</div>
-          <div>历史最高:</div>
-          <div>历史最低:</div>
-        </div>
-      </el-collapse-item>
-    </el-collapse>
-  </div>
-</template>
-
-<script setup>
-const activeNames = ref("1");
-const activeNamesOne = ref("1");
-const activeNamesTwo = ref("1");
-
-const handleChange = () => {};
-</script>
-
-<style lang="scss" scoped>
-.item {
-  margin-bottom: 10px;
-  background-color: #f1f1f1;
-  padding: 5px 10px;
-  div {
-    color: #999999;
-  }
-}
-.el-collapse-item {
-  border: 1px solid #d7d7d7;
-  padding: 0px 10px;
-}
-:deep(.el-collapse-item__content) {
-  padding-bottom: 5px;
-}
-</style>