Browse Source

部分0.3需求静态

cz 1 year ago
parent
commit
8180d9540c

+ 33 - 8
src/components/process/SendPurchase.vue

@@ -257,6 +257,7 @@
 import SelectGoods from "@/components/product/SelectGoods";
 import { ElMessage, ElMessageBox } from "element-plus";
 import useUserStore from "@/store/modules/user";
+import { onActivated } from "vue";
 
 const route = useRoute();
 const { proxy } = getCurrentInstance();
@@ -343,15 +344,22 @@ const handleSubmit = async () => {
       for (let i = 0; i < list.length; i++) {
         const e = list[i];
         if (ids.value.length > 0) {
-          if (Number(e.subscribeCount) - Number(e.purchaseCount) > 0) {
-            if (e.count == 0) {
-              ElMessage({
-                message: "本次采购数量不能为0!",
-                type: "info",
-              });
-              return false;
-            }
+          if (e.count == 0) {
+            ElMessage({
+              message: "本次采购数量不能为0!",
+              type: "info",
+            });
+            return false;
           }
+          // if (Number(e.subscribeCount) - Number(e.purchaseCount) > 0) {
+          //   if (e.count == 0) {
+          //     ElMessage({
+          //       message: "本次采购数量不能为0!",
+          //       type: "info",
+          //     });
+          //     return false;
+          //   }
+          // }
           // if (e.count + Number(e.purchaseCount) > Number(e.subscribeCount)) {
           //   ElMessage({
           //     message: "本次采购数量和已采购数量和不可大于申购数量!",
@@ -393,6 +401,22 @@ onMounted(() => {
   }
 });
 
+// onActivated(() => {
+//   formData.data = {
+//     purchaseTime: "",
+//     purchaseDetailList: [],
+//     otherFeeList: [],
+//   };
+//   formData.data.purchaseTime = proxy.parseTime(new Date());
+//   formData.data.deptName = userInfo.dept.deptName;
+//   formData.data.purchaseName = userInfo.nickName;
+//   getSupplierList();
+//   if (props.queryData.ids) {
+//     ids.value = props.queryData.ids.split(",") || [];
+//     getDetails();
+//   }
+// });
+
 const ids = ref([]);
 const getDetails = () => {
   if (props.queryData.type && props.queryData.type === "handoverSlip") {
@@ -401,6 +425,7 @@ const getDetails = () => {
         delete x.id;
         return {
           ...x,
+          bussinessId: x.productId,
           subscribeCount: x.sumPackQuantity,
           purchaseCount: x.sumPurchaseCount || 0,
           count: x.expendQuantity || 0,

+ 6 - 6
src/router/index.js

@@ -68,12 +68,12 @@ export const constantRoutes = [
         name: "Index",
         meta: { title: "首页", icon: "dashboard", affix: true },
       },
-      // {
-      //   path: "/platform_manage/process/processApproval",
-      //   component: () => import("@/views/process/processApproval/index.vue"),
-      //   name: "ProcessApproval",
-      //   meta: { title: "流程审批", icon: "dashboard", affix: true },
-      // },
+      {
+        path: "/platform_manage/process/processApproval",
+        component: () => import("@/views/process/processApproval/index.vue"),
+        name: "ProcessApproval",
+        meta: { title: "流程审批", icon: "dashboard", affix: true },
+      },
     ],
   },
   {

+ 12 - 9
src/views/connect/E-mail/mail/com/left.vue

@@ -107,7 +107,10 @@
           </li>
         </ul>
         <!-- 员工邮箱 -->
-        <div class="tree" v-if="staffMailData && staffMailData.length > 0">
+        <div
+          class="tree"
+          v-if="staffMailData[0] && staffMailData[0].children.length > 0"
+        >
           <el-tree
             :data="staffMailData"
             node-key="id"
@@ -518,7 +521,13 @@ const mailMapData = {
 };
 let selectFloderId = ref("");
 const mailList = ref([]);
-const staffMailData = ref([]);
+const staffMailData = ref([
+  {
+    name: "员工邮箱",
+    id: "0",
+    children: [],
+  },
+]);
 const staffLoading = ref(false);
 const userList = ref([]);
 const formOption = reactive({
@@ -912,13 +921,7 @@ const getMialList = () => {
         children: [],
       }));
     }
-    staffMailData.value = [
-      {
-        name: "员工邮箱",
-        id: "0",
-        children: res,
-      },
-    ];
+    staffMailData.value[0].children = res;
   });
 };
 

+ 25 - 4
src/views/connect/E-mail/mail/com/mailList.vue

@@ -1,17 +1,20 @@
 <template>
   <div>
-    <div style="padding-left: 20px">
+    <div style="padding-left: 20px; display: flex; align-items: center">
       <el-icon @click="handleRefresh" style="cursor: pointer">
         <Refresh />
       </el-icon>
+      <div class="vertical-line"></div>
     </div>
     <div style="padding: 10px 15px; width: 100%">
       <el-table
         :data="tableData.data"
         style="width: 100%"
         :height="tableHeight"
+        @selection-change="handleSelectionChange"
         v-loading="loading"
       >
+        <!-- <el-table-column type="selection" width="40" /> -->
         <el-table-column label="状态" width="70">
           <template #default="{ row, $index }">
             <div style="cursor: pointer" @click="handleRowClick(row, $index)">
@@ -71,9 +74,16 @@
         </el-table-column>
         <el-table-column prop="fromEmail" label="发件人地址" width="210">
           <template #default="{ row, $index }">
-            <div class="contentClass" @click="handleRowClick(row, $index)">
-              {{ row.fromEmail }}
-            </div>
+            <el-tooltip
+              class="box-item"
+              effect="dark"
+              :content="row.fromEmail"
+              placement="top"
+            >
+              <div class="contentClass" @click="handleRowClick(row, $index)">
+                {{ row.fromEmail }}
+              </div>
+            </el-tooltip>
           </template>
         </el-table-column>
         <el-table-column prop="subject" label="主题">
@@ -244,6 +254,11 @@ const handleSizeChange = (val) => {
   tableData.pagination.pageSize = val;
   getList();
 };
+const selectData = ref([]);
+const handleSelectionChange = (val) => {
+  console.log(val, "ss");
+  selectData.value = val;
+};
 
 defineExpose({
   initFn: init,
@@ -265,4 +280,10 @@ defineExpose({
   white-space: nowrap;
   text-overflow: ellipsis;
 }
+.vertical-line {
+  width: 2px;
+  height: 14px;
+  background: #dddddd;
+  margin: 0 10px;
+}
 </style>

+ 146 - 45
src/views/process/processApproval/index.vue

@@ -5,41 +5,109 @@
         <div class="commons-title title">
           {{ route.query.flowName || "流程标题(发起)" }}
         </div>
-        <SendSubscribe ref="makeDom" v-if="flowForm.flowKey == 'subscribe_flow'" :queryData="queryData.data"></SendSubscribe>
-        <SendPurchase ref="makeDom" v-else-if="flowForm.flowKey == 'purchase_flow'" :queryData="queryData.data"></SendPurchase>
-        <SendFunds ref="makeDom" v-else-if="flowForm.flowKey == 'account_request_funds_flow'" :queryData="queryData.data"></SendFunds>
-        <ReturnGood ref="makeDom" v-else-if="flowForm.flowKey == 'sales_return_flow'" :queryData="queryData.data"></ReturnGood>
-        <PurchaseRefund ref="makeDom" v-else-if="flowForm.flowKey == 'refund_flow'" :queryData="queryData.data"></PurchaseRefund>
-        <PurchasePayment ref="makeDom" v-else-if="flowForm.flowKey == 'pay_flow'" :queryData="queryData.data"></PurchasePayment>
+        <SendSubscribe
+          ref="makeDom"
+          v-if="flowForm.flowKey == 'subscribe_flow'"
+          :queryData="queryData.data"
+        ></SendSubscribe>
+        <SendPurchase
+          ref="makeDom"
+          v-else-if="flowForm.flowKey == 'purchase_flow'"
+          :queryData="queryData.data"
+        ></SendPurchase>
+        <SendFunds
+          ref="makeDom"
+          v-else-if="flowForm.flowKey == 'account_request_funds_flow'"
+          :queryData="queryData.data"
+        ></SendFunds>
+        <ReturnGood
+          ref="makeDom"
+          v-else-if="flowForm.flowKey == 'sales_return_flow'"
+          :queryData="queryData.data"
+        ></ReturnGood>
+        <PurchaseRefund
+          ref="makeDom"
+          v-else-if="flowForm.flowKey == 'refund_flow'"
+          :queryData="queryData.data"
+        ></PurchaseRefund>
+        <PurchasePayment
+          ref="makeDom"
+          v-else-if="flowForm.flowKey == 'pay_flow'"
+          :queryData="queryData.data"
+        ></PurchasePayment>
         <template v-else-if="flowForm.flowKey == 'sale_quotation_flow'">
-          <PriceSheetEHSD ref="makeDom" v-if="flowForm.tenantType === 'EHSD'" :queryData="queryData.data"></PriceSheetEHSD>
-          <PriceSheet ref="makeDom" v-else :queryData="queryData.data"></PriceSheet>
+          <PriceSheetEHSD
+            ref="makeDom"
+            v-if="flowForm.tenantType === 'EHSD'"
+            :queryData="queryData.data"
+          ></PriceSheetEHSD>
+          <PriceSheet
+            ref="makeDom"
+            v-else
+            :queryData="queryData.data"
+          ></PriceSheet>
         </template>
         <template v-else-if="flowForm.flowKey == 'contract_flow'">
-          <ContractEHSD ref="makeDom" v-if="flowForm.tenantType === 'EHSD'" :queryData="queryData.data"></ContractEHSD>
+          <ContractEHSD
+            ref="makeDom"
+            v-if="flowForm.tenantType === 'EHSD'"
+            :queryData="queryData.data"
+          ></ContractEHSD>
           <Contract ref="makeDom" v-else :queryData="queryData.data"></Contract>
         </template>
         <template v-else-if="flowForm.flowKey == 'sample_flow'">
           <SampleEHSD ref="makeDom" :queryData="queryData.data"></SampleEHSD>
         </template>
         <template v-else-if="flowForm.flowKey == 'ehsd_purchase_flow'">
-          <PurchaseEHSD ref="makeDom" :queryData="queryData.data"></PurchaseEHSD>
+          <PurchaseEHSD
+            ref="makeDom"
+            :queryData="queryData.data"
+          ></PurchaseEHSD>
         </template>
 
-        <ServiceContract ref="makeDom" v-else-if="flowForm.flowKey == 'service_contract_flow'" :queryData="queryData.data"></ServiceContract>
+        <ServiceContract
+          ref="makeDom"
+          v-else-if="flowForm.flowKey == 'service_contract_flow'"
+          :queryData="queryData.data"
+        ></ServiceContract>
         <!-- 维多利亚 -->
-        <SendSubscribeWDLY ref="makeDom" v-else-if="flowForm.flowKey == 'wdly_apply_purchase'" :queryData="queryData.data"></SendSubscribeWDLY>
-        <SendPurchaseWDLY ref="makeDom" v-else-if="flowForm.flowKey == 'wdly_purchase'" :queryData="queryData.data"></SendPurchaseWDLY>
+        <SendSubscribeWDLY
+          ref="makeDom"
+          v-else-if="flowForm.flowKey == 'wdly_apply_purchase'"
+          :queryData="queryData.data"
+        ></SendSubscribeWDLY>
+        <SendPurchaseWDLY
+          ref="makeDom"
+          v-else-if="flowForm.flowKey == 'wdly_purchase'"
+          :queryData="queryData.data"
+        ></SendPurchaseWDLY>
       </div>
       <div class="bottom" v-if="route.query.processType != 20">
         <div class="commons-title title">处理意见</div>
         <el-form :model="flowForm" :rules="flowRules" ref="flowFormDom">
           <el-form-item prop="remark" label-width="0px" label="">
-            <el-input type="textarea" placeholder="请输入" v-model="flowForm.remark"> </el-input>
+            <el-input
+              type="textarea"
+              placeholder="请输入"
+              v-model="flowForm.remark"
+            >
+            </el-input>
           </el-form-item>
           <el-form-item>
-            <el-button type="primary" v-if="approvalRecordData.buttonInfoList.length == 0" @click="handleSubmit">提交</el-button>
-            <el-button type="primary" v-else v-for="i in approvalRecordData.buttonInfoList" :key="i.type" @click="handleSubmit(i.type)">{{ i.name }}</el-button>
+            <el-button
+              type="primary"
+              v-if="approvalRecordData.buttonInfoList.length == 0"
+              @click="handleSubmit"
+              >提交</el-button
+            >
+            <el-button
+              type="primary"
+              v-else
+              v-for="i in approvalRecordData.buttonInfoList"
+              :key="i.type"
+              @click="handleSubmit(i.type)"
+              >{{ i.name }}</el-button
+            >
           </el-form-item>
         </el-form>
       </div>
@@ -61,7 +129,8 @@
                   : 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>
@@ -70,7 +139,9 @@
                 <div class="name">{{ item.nodeName }}</div>
                 <div class="remark">
                   <div class="label">
-                    <span v-if="item.status != 3">办理人:</span>{{ item.processedUser }}<span class="time">{{ item.processedDate }}</span>
+                    <span v-if="item.status != 3">办理人:</span
+                    >{{ item.processedUser
+                    }}<span class="time">{{ item.processedDate }}</span>
                   </div>
                   {{ item.remark }}
                 </div>
@@ -80,8 +151,15 @@
           </ul>
         </el-tab-pane>
 
-        <!-- <el-tab-pane label="决策辅助" name="second">
+        <!-- <el-tab-pane
+          label="决策辅助"
+          name="second"
+          v-if="flowForm.flowKey == 'purchase_flow'"
+        >
           <auxiliary></auxiliary>
+          <div style="overflow: auto; height: calc(100vh - 200px)">
+            <purchaseAuxiliary></purchaseAuxiliary>
+          </div>
         </el-tab-pane> -->
       </el-tabs>
     </div>
@@ -89,8 +167,18 @@
     <el-dialog title="下一处理人" width="400" v-model="dialogVisible">
       <el-form :model="flowForm">
         <el-form-item prop="remark" label="处理人">
-          <el-select v-model="flowForm.handleUserId" placeholder="请选择" filterable style="width: 100%">
-            <el-option v-for="item in nextHandleUser" :label="item.name" :value="item.id"> </el-option>
+          <el-select
+            v-model="flowForm.handleUserId"
+            placeholder="请选择"
+            filterable
+            style="width: 100%"
+          >
+            <el-option
+              v-for="item in nextHandleUser"
+              :label="item.name"
+              :value="item.id"
+            >
+            </el-option>
           </el-select>
         </el-form-item>
         <el-form-item>
@@ -108,6 +196,8 @@ import useTagsViewStore from "@/store/modules/tagsView.js";
 import { useRouter, useRoute } from "vue-router";
 //决策辅助
 import auxiliary from "./auxiliary";
+import purchaseAuxiliary from "./purchaseAuxiliary";
+
 //申购发起
 import SendSubscribe from "@/components/process/SendSubscribe";
 //采购发起
@@ -242,16 +332,18 @@ const handleSubmit = async (_type) => {
               data.ehsdJson = JSON.stringify({
                 deliveryTime: data.deliveryTime,
               });
-              data.quotationProductList = data.quotationProductList.map((item) => {
-                let ehsdJson = JSON.stringify({
-                  packMethod: item.packMethod,
-                  tradeMethods: item.tradeMethods,
-                });
-                return {
-                  ...item,
-                  ehsdJson: ehsdJson,
-                };
-              });
+              data.quotationProductList = data.quotationProductList.map(
+                (item) => {
+                  let ehsdJson = JSON.stringify({
+                    packMethod: item.packMethod,
+                    tradeMethods: item.tradeMethods,
+                  });
+                  return {
+                    ...item,
+                    ehsdJson: ehsdJson,
+                  };
+                }
+              );
             }
           } else if (flowForm.flowKey == "contract_flow") {
             if (flowForm.tenantType === "EHSD") {
@@ -280,16 +372,18 @@ const handleSubmit = async (_type) => {
               data.ehsdJson = JSON.stringify({
                 deliveryTime: data.deliveryTime,
               });
-              data.contractProductList = data.contractProductList.map((item) => {
-                let ehsdJson = JSON.stringify({
-                  packMethod: item.packMethod,
-                  tradeMethods: item.tradeMethods,
-                });
-                return {
-                  ...item,
-                  ehsdJson: ehsdJson,
-                };
-              });
+              data.contractProductList = data.contractProductList.map(
+                (item) => {
+                  let ehsdJson = JSON.stringify({
+                    packMethod: item.packMethod,
+                    tradeMethods: item.tradeMethods,
+                  });
+                  return {
+                    ...item,
+                    ehsdJson: ehsdJson,
+                  };
+                }
+              );
             }
           } else if (flowForm.flowKey == "sample_flow") {
             if (data.fileList && data.fileList.length > 0) {
@@ -341,7 +435,12 @@ const handleSubmit = async (_type) => {
                 handleResult(res);
               });
             if (_type && _type == 1) {
-              proxy.post("/flowExample/setStartData", { exampleId: route.query.id, startDate: data }).then();
+              proxy
+                .post("/flowExample/setStartData", {
+                  exampleId: route.query.id,
+                  startDate: data,
+                })
+                .then();
             }
             return;
           } else {
@@ -477,9 +576,11 @@ const getRecords = (_id) => {
 onMounted(async () => {
   //processType 10 为修改 20为查看
   if (route.query.processType == 10 || route.query.processType == 20) {
-    await proxy.post("/flowProcess/getStartData", { flowId: route.query.id }).then((res) => {
-      queryData.data = { ...res };
-    });
+    await proxy
+      .post("/flowProcess/getStartData", { flowId: route.query.id })
+      .then((res) => {
+        queryData.data = { ...res };
+      });
   } else {
     queryData.data = { ...route.query };
   }

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

@@ -0,0 +1,65 @@
+<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>