Просмотр исходного кода

Merge branch 'master' of http://36.137.93.232:3000/hf/byte-sailing-new

lxf 1 год назад
Родитель
Сommit
fac05ea7ee

+ 25 - 3
src/components/WDLY/process/SendPurchaseWDLY.vue

@@ -5,6 +5,7 @@
       :rules="rules"
       ref="formDom"
       label-position="top"
+      :disabled='props.queryData.purchaseDetailList ? true : false'
     >
       <div class="_t">基础信息</div>
       <el-row :gutter="10">
@@ -255,9 +256,9 @@
 import SelectGoods from "@/components/product/SelectGoods";
 import { ElMessage, ElMessageBox } from "element-plus";
 import useUserStore from "@/store/modules/user";
-
+import { useRouter, useRoute } from "vue-router";
 const { proxy } = getCurrentInstance();
-
+const route = useRoute();
 let formData = reactive({
   data: {
     purchaseTime: "",
@@ -385,10 +386,30 @@ onMounted(() => {
   formData.data.deptName = userInfo.dept.deptName;
   formData.data.purchaseName = userInfo.nickName;
   getSupplierList();
-  if (props.queryData.ids) {
+  if (!route.query.processType) {
     ids.value = props.queryData.ids.split(",") || [];
     getDetails();
+    
   }
+  setTimeout(() => {
+    if(!props.queryData.purchaseDetailList) return
+    alert(1231231231231231)
+    console.log(props.queryData,'123123123kljasdjkashdkjasdh')
+    formData.data = props.queryData
+    proxy.post("/subscribeDetail/detail", { ids: props.queryData.purchaseDetailList.map(item => {
+      return item.subscribeDetailId
+    }) }).then((res) => {
+      formData.data.purchaseDetailList = props.queryData.purchaseDetailList.map((x) => ({
+        ...x,
+        subscribeCount: x.count,
+        count: x.count,
+        price: x.price,
+        amount: x.amount,
+      }));
+    });
+  }, 2000);
+  
+  
 });
 
 // 接收父组件的传值
@@ -399,6 +420,7 @@ const props = defineProps({
 const ids = ref([]);
 const getDetails = () => {
   proxy.post("/subscribeDetail/detail", { ids: ids.value }).then((res) => {
+    console.log(res,'123123123123123123123123')
     formData.data.purchaseDetailList = res.map((x) => ({
       ...x,
       subscribeCount: x.count,

+ 32 - 5
src/components/byTable/index.vue

@@ -79,13 +79,31 @@
           >搜索</el-button
         >
 
-        <div class="more-icon"><i class="el-icon-wind-power"></i></div>
-        <div class="more-icon">
-          <i class="el-icon-notebook-2"></i>
-        </div>
+        <div class="more-icon" @click="retrievalModal = true"><i class="iconfont icon-icomx_woddd"></i></div>
+        
       </div>
     </div>
-
+    <el-drawer v-model="retrievalModal" direction="rtl">
+      <template #header>
+        <h4>高级检索</h4>
+      </template>
+      <template #default>
+        <div>
+          <el-radio v-model="radio1" label="Option 1" size="large"
+            >Option 1</el-radio
+          >
+          <el-radio v-model="radio1" label="Option 2" size="large"
+            >Option 2</el-radio
+          >
+        </div>
+      </template>
+      <template #footer>
+        <div style="flex: auto">
+          <el-button @click="cancelClick">cancel</el-button>
+          <el-button type="primary" @click="confirmClick">confirm</el-button>
+        </div>
+      </template>
+    </el-drawer>
     <component :is="containerTag">
       <div class="filter-form-container">
         <slot />
@@ -287,6 +305,7 @@ export default defineComponent({
         return item;
       });
     });
+    const retrievalModal = ref(false);
     console.log(selectConfigCopy);
     const getAttrsValue = (item) => {
       const { attrs } = item;
@@ -447,6 +466,7 @@ export default defineComponent({
       searchItemSelct,
       selectConfigCopy,
       isSelectable,
+      retrievalModal
     };
   },
 });
@@ -476,6 +496,12 @@ export default defineComponent({
   display: flex;
   justify-content: space-between;
   margin-bottom: 10px;
+  .more-icon{
+    cursor: pointer;
+    line-height: 30px;
+    width: 30px;
+    text-align: center;
+  }
 }
 .by-dropdown {
   position: relative;
@@ -486,6 +512,7 @@ export default defineComponent({
   transition: all 0.5s ease;
   cursor: pointer;
   line-height: 32px;
+
   .by-dropdown-title {
     font-size: 14px;
     background-color: #fff;

+ 5 - 4
src/views/login.vue

@@ -100,14 +100,15 @@ function handleLogin() {
 	proxy.$refs.loginRef.validate((valid) => {
 		if (valid) {
 			loading.value = true
+			Cookies.set('tenantId', loginForm.value.tenantId, {
+				expires: 30,
+			})
 			// 勾选了需要记住密码设置在 cookie 中设置记住用户名和密码
 			if (loginForm.value.rememberMe) {
 				Cookies.set('username', loginForm.value.username, {
 					expires: 30,
 				})
-				Cookies.set('tenantId', loginForm.value.tenantId, {
-					expires: 30,
-				})
+				
 				Cookies.set('password', encrypt(loginForm.value.password), {
 					expires: 30,
 				})
@@ -116,7 +117,7 @@ function handleLogin() {
 				})
 			} else {
 				// 否则移除
-				Cookies.remove('tenantId')
+				
 				Cookies.remove('username')
 				Cookies.remove('password')
 				Cookies.remove('rememberMe')

+ 3 - 1
src/views/process/dealWith/index.vue

@@ -167,7 +167,9 @@ const config = computed(() => {
                                 path: "/platform_manage/process/processApproval",
                                 query: {
                                     flowKey: row.flowKey,
-                                    ids: row.id,
+                                    id: row.id,
+									processType:10,
+									version:row.version
                                 },
                             });
                             

+ 92 - 14
src/views/process/processApproval/index.vue

@@ -41,13 +41,16 @@
       <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
         <el-tab-pane label="审批记录" name="first">
           <ul class="flow-chart">
-            <li v-for="item in recordList" :key="item.id">
+            <li 
+              v-for="item in recordList" 
+              :key="item.id" 
+              :class="item.status == 2? 'flow-orange' : item.status == 3 && !route.query.id? 'flow-orange' : item.status == 3 && route.query.id ? 'flow-grey' : ''">
               <div class="left-icon">
                 <i class="iconfont icon-iconm_daick"></i>
                 <i class="iconfont icon-icomx_quertj1 right-btm-status"></i>
               </div>
               <div class="right-conetnt">
-                <div class="name">发起人:{{ item.processedUser }}</div>
+                <div class="name">办理人:{{ item.processedUser }}</div>
                 <div class="remark">
                   <div class="label">{{ item.nodeName }}</div>
                   {{ item.remark }}
@@ -157,6 +160,7 @@ const handleResult = (res) => {
 };
 // 提交逻辑
 const handleSubmit = async () => {
+  
   try {
     // 调用发起组件的提交事件
     const flag = await makeDom.value.handleSubmit();
@@ -208,14 +212,30 @@ const handleSubmit = async () => {
             };
             data.victoriatouristJson = JSON.stringify(victoriatouristJson);
           }
-          proxy
-            .post("/flowProcess/initiate", {
-              ...flowForm,
-              data,
-            })
-            .then((res) => {
-              handleResult(res);
-            });
+          if(route.query.processType == 10) {
+            proxy
+              .post("/flowProcess/jump", {
+                ...flowForm,
+                data,
+                handleType:1,
+                version:route.query.version,
+                flowId:route.query.id
+              })
+              .then((res) => {
+                handleResult(res);
+              });
+            return
+          }else{
+            proxy
+              .post("/flowProcess/initiate", {
+                ...flowForm,
+                data,
+              })
+              .then((res) => {
+                handleResult(res);
+              });
+          }
+          
         }
       });
     }
@@ -231,6 +251,7 @@ const skipPage = () => {
     message: "操作成功!",
     type: "success",
   });
+
   if (flowForm.flowKey == "subscribe_flow") {
     router.replace({
       path: "/purchaseManage/purchaseManage/subscribe",
@@ -286,8 +307,19 @@ let queryData = reactive({
 });
 // 记录
 const recordList = ref([]);
-const getRecords = () => {
-  proxy
+const getRecords = (_id) => {
+  console.log(route,12312312312)
+  if(_id) {
+    proxy
+    .post("/flowExample/getApprovalRecord", {
+      id: _id,
+    })
+    .then((res) => {
+      console.log(res, "ass");
+      recordList.value = res.recordList;
+    });
+  }else{
+    proxy
     .post("/flowExample/getFlowNode", {
       flowKey: flowForm.flowKey,
     })
@@ -295,12 +327,25 @@ const getRecords = () => {
       console.log(res, "ass");
       recordList.value = res;
     });
+  }
+  
+  
 };
 onMounted(() => {
-  queryData.data = { ...route.query };
+  console.log(route.query.id,1231231231231)
+  if(route.query.processType == 10) {
+    proxy.post('/flowProcess/getStartData',{flowId:route.query.id}).then(res=>{
+      console.log(res)
+      queryData.data = { ...res };
+    })
+  }else{
+    queryData.data = { ...route.query };
+  }
+  
+  
   flowForm.flowKey = route.query.flowKey;
   flowForm.tenantType = route.query.tenantType;
-  getRecords();
+  getRecords(route.query.id);
 });
 </script>
 
@@ -412,6 +457,39 @@ onMounted(() => {
       li:last-child::before {
         display: none;
       }
+      .flow-orange{
+        .right-btm-status{
+          background: #ff9a00!important;
+        }
+        .label{
+          color: #ff9a00!important;
+        }
+        .left-icon{
+          background: #ff9a00!important;
+        }
+      }
+      .flow-grey{
+        .right-btm-status{
+          background: #999!important;
+        }
+        .label{
+          color: #999!important;
+        }
+        .left-icon{
+          background: #999!important;
+        }
+      }
+      .flow-red{
+        .right-btm-status{
+          background: #ff4d4f!important;
+        }
+        .label{
+          color: #ff4d4f!important;
+        }
+        .left-icon{
+          background: #ff4d4f!important;
+        }
+      }
     }
   }
 }

+ 3 - 0
src/views/system/dict/dictCommonType.vue

@@ -326,6 +326,9 @@ const submitForm = () => {
 				dialogVisible.value = false
 				submitLoading.value = false
 				getList()
+			}) // 失败回调
+			.catch((err) => {
+				submitLoading.value = false
 			})
 	})
 }