cz 1 year ago
parent
commit
68bc35617b

+ 2 - 1
src/components/process/EHSD/Contract.vue

@@ -108,7 +108,7 @@
                 style="width: 100%"
                 @change="changeCustomer"
                 v-if="
-                  [10, 30].includes(route.query.processType) ||
+                  [30].includes(route.query.processType) ||
                   !route.query.processType
                 "
               >
@@ -1277,6 +1277,7 @@ const changeCustomer = (val) => {
   if (val) {
     proxy.post("/customer/detail", { id: val }).then(
       (res) => {
+        formData.data.buyCorporationName = res.name;
         if (res.customerUserList && res.customerUserList.length > 0) {
           formData.data.buyContactName = res.customerUserList[0].name;
           if (res.customerUserList[0].contactJson) {

+ 2 - 1
src/components/process/EHSD/PriceSheet.vue

@@ -108,7 +108,7 @@
                 style="width: 100%"
                 @change="changeCustomer"
                 v-if="
-                  [10, 30].includes(route.query.processType) ||
+                  [ 30].includes(route.query.processType) ||
                   !route.query.processType
                 "
               >
@@ -941,6 +941,7 @@ const changeCustomer = (val) => {
   if (val) {
     proxy.post("/customer/detail", { id: val }).then(
       (res) => {
+        formData.data.buyCorporationName = res.name;
         if (res.customerUserList && res.customerUserList.length > 0) {
           formData.data.buyContactName = res.customerUserList[0].name;
           if (res.customerUserList[0].contactJson) {

+ 2 - 1
src/components/process/EHSD/Sample.vue

@@ -108,7 +108,7 @@
                 style="width: 100%"
                 @change="changeCustomer"
                 v-if="
-                  [10, 30].includes(route.query.processType) ||
+                  [30].includes(route.query.processType) ||
                   !route.query.processType
                 "
               >
@@ -1201,6 +1201,7 @@ const changeCustomer = (val) => {
   if (val) {
     proxy.post("/customer/detail", { id: val }).then(
       (res) => {
+        formData.data.buyCorporationName = res.name;
         if (res.customerUserList && res.customerUserList.length > 0) {
           formData.data.buyContactName = res.customerUserList[0].name;
           if (res.customerUserList[0].contactJson) {

+ 214 - 61
src/views/EHSD/saleContract/priceSheetEHSD/index.vue

@@ -14,7 +14,8 @@
             action: () => newPriceSheet(),
           },
         ]"
-        @get-list="getList">
+        @get-list="getList"
+      >
         <template #amount="{ item }">
           <div>
             <span style="padding-right: 4px">{{ item.currency }}</span>
@@ -30,18 +31,36 @@
     </div>
 
     <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="860">
-      <div id="pdfDom" style="width: 800px; padding: 16px; font-size: 12px !important">
+      <div
+        id="pdfDom"
+        style="width: 800px; padding: 16px; font-size: 12px !important"
+      >
         <div style="font-size: 18px; text-align: center">
-          {{ getLabel(printDetails.sellCorporationId, corporationList, "nameEn") }}
+          {{
+            getLabel(printDetails.sellCorporationId, corporationList, "nameEn")
+          }}
         </div>
         <div style="text-align: center">
-          {{ printDetails.sellCountryName }},{{ printDetails.sellProvinceName }},{{ printDetails.sellCityName }},{{ printDetails.sellAddress }}
+          {{ printDetails.sellCountryName }},{{
+            printDetails.sellProvinceName
+          }},{{ printDetails.sellCityName }},{{ printDetails.sellAddress }}
+        </div>
+        <div
+          style="
+            font-size: 14px;
+            color: #409eff;
+            text-align: center;
+            padding-top: 16px;
+          "
+        >
+          QUOTATION
         </div>
-        <div style="font-size: 14px; color: #409eff; text-align: center; padding-top: 16px">QUOTATION</div>
         <div style="padding-top: 8px">
           <div>Reference NO. : {{ printDetails.code }}</div>
           <div style="display: flex">
-            <div style="width: 50%">DATE: {{ moment(printDetails.createTime).format("DD/MMM/yyyy") }}</div>
+            <div style="width: 50%">
+              DATE: {{ moment(printDetails.createTime).format("DD/MMM/yyyy") }}
+            </div>
             <div style="width: 50%">Valid Date:</div>
           </div>
         </div>
@@ -49,32 +68,64 @@
           <div style="width: 50%; border-right: 1px solid black">
             <div style="color: #409eff">VENDOR:</div>
             <div>
-              {{ getLabel(printDetails.sellCorporationId, corporationList, "nameEn") }}
+              {{
+                getLabel(
+                  printDetails.sellCorporationId,
+                  corporationList,
+                  "nameEn"
+                )
+              }}
             </div>
             <div style="padding: 16px 0">
-              {{ printDetails.sellCountryName }},{{ printDetails.sellProvinceName }},{{ printDetails.sellCityName }},{{ printDetails.sellAddress }}
+              {{ printDetails.sellCountryName }},{{
+                printDetails.sellProvinceName
+              }},{{ printDetails.sellCityName }},{{ printDetails.sellAddress }}
+            </div>
+            <div>
+              {{ printDetails.sellContactName }},{{
+                printDetails.sellContactNumber
+              }}
             </div>
-            <div>{{ printDetails.sellContactName }},{{ printDetails.sellContactNumber }}</div>
           </div>
           <div style="width: 50%">
             <div style="color: #409eff">BUYER:</div>
             <div>
-              {{ getLabel(printDetails.buyCorporationId, customerList, "name") }}
+              {{
+                getLabel(printDetails.buyCorporationId, customerList, "name")
+              }}
             </div>
             <div style="padding: 16px 0">
-              {{ printDetails.buyCountryName }},{{ printDetails.buyProvinceName }},{{ printDetails.buyCityName }},{{ printDetails.buyAddress }}
+              {{ printDetails.buyCountryName }},{{
+                printDetails.buyProvinceName
+              }},{{ printDetails.buyCityName }},{{ printDetails.buyAddress }}
+            </div>
+            <div>
+              {{ printDetails.buyContactName }},{{
+                printDetails.buyContactNumber
+              }}
             </div>
-            <div>{{ printDetails.buyContactName }},{{ printDetails.buyContactNumber }}</div>
           </div>
         </div>
         <div style="height: 16px"></div>
         <div style="border: 1px solid black">
           <div style="display: flex; width: 100%">
-            <div style="width: 33%; border-bottom: 1px solid black; border-right: 1px solid black">
+            <div
+              style="
+                width: 33%;
+                border-bottom: 1px solid black;
+                border-right: 1px solid black;
+              "
+            >
               <div style="color: #409eff">COUNTRY OF ORIGIN:</div>
               <div>{{ printDetails.sellCountryName }}</div>
             </div>
-            <div style="width: 34%; border-bottom: 1px solid black; border-right: 1px solid black">
+            <div
+              style="
+                width: 34%;
+                border-bottom: 1px solid black;
+                border-right: 1px solid black;
+              "
+            >
               <div style="color: #409eff">COUNTRY OF DESTINATION:</div>
               <div>{{ printDetails.buyCountryName }}</div>
             </div>
@@ -84,13 +135,25 @@
             </div>
           </div>
           <div style="display: flex; width: 100%">
-            <div style="width: 33%; border-bottom: 1px solid black; border-right: 1px solid black">
+            <div
+              style="
+                width: 33%;
+                border-bottom: 1px solid black;
+                border-right: 1px solid black;
+              "
+            >
               <div style="color: #409eff">TERMS OF DELIVERY:</div>
               <div>
                 {{ dictValueLabel(printDetails.tradeMethods, tradeMethods) }}
               </div>
             </div>
-            <div style="width: 34%; border-bottom: 1px solid black; border-right: 1px solid black">
+            <div
+              style="
+                width: 34%;
+                border-bottom: 1px solid black;
+                border-right: 1px solid black;
+              "
+            >
               <div style="color: #409eff">CURRENCY:</div>
               <div>
                 {{ dictValueLabel(printDetails.currency, accountCurrency) }}
@@ -99,7 +162,9 @@
             <div style="width: 33%; border-bottom: 1px solid black">
               <div style="color: #409eff">EXPORT BY/VIA:</div>
               <div>
-                {{ dictValueLabel(printDetails.transportMethod, shippingMethod) }}
+                {{
+                  dictValueLabel(printDetails.transportMethod, shippingMethod)
+                }}
               </div>
             </div>
           </div>
@@ -115,19 +180,47 @@
         </div>
         <div style="height: 16px"></div>
         <div class="baseRow" style="display: flex; color: #409eff">
-          <div class="contentRow" style="width: 50px; text-align: center">NO.</div>
-          <div class="contentRow" style="width: calc(100% - 450px); text-align: center">COMMODITY, SPECIFICATION</div>
-          <div class="contentRow" style="width: 100px; text-align: center">UNIT</div>
-          <div class="contentRow" style="width: 100px; text-align: center">QUANTITY</div>
-          <div class="contentRow" style="width: 100px; text-align: center">UNIT PRICE</div>
-          <div class="contentRow" style="width: 100px; text-align: center">TOTAL PRICE</div>
+          <div class="contentRow" style="width: 50px; text-align: center">
+            NO.
+          </div>
+          <div
+            class="contentRow"
+            style="width: calc(100% - 450px); text-align: center"
+          >
+            COMMODITY, SPECIFICATION
+          </div>
+          <div class="contentRow" style="width: 100px; text-align: center">
+            UNIT
+          </div>
+          <div class="contentRow" style="width: 100px; text-align: center">
+            QUANTITY
+          </div>
+          <div class="contentRow" style="width: 100px; text-align: center">
+            UNIT PRICE
+          </div>
+          <div class="contentRow" style="width: 100px; text-align: center">
+            TOTAL PRICE
+          </div>
         </div>
-        <div v-if="printDetails.quotationProductList && printDetails.quotationProductList.length > 0">
-          <div class="baseRow" style="display: flex" v-for="(item, index) in printDetails.quotationProductList" :key="item.productId">
+        <div
+          v-if="
+            printDetails.quotationProductList &&
+            printDetails.quotationProductList.length > 0
+          "
+        >
+          <div
+            class="baseRow"
+            style="display: flex"
+            v-for="(item, index) in printDetails.quotationProductList"
+            :key="item.productId"
+          >
             <div class="contentRow" style="width: 50px; text-align: center">
               {{ index + 1 }}
             </div>
-            <div class="contentRow" style="width: calc(100% - 450px); text-align: center">
+            <div
+              class="contentRow"
+              style="width: calc(100% - 450px); text-align: center"
+            >
               {{ item.productName }}
             </div>
             <div class="contentRow" style="width: 100px; text-align: center">
@@ -145,33 +238,73 @@
           </div>
         </div>
         <div class="baseRow" style="display: flex; color: #409eff">
-          <div class="contentRow" style="width: calc(100% - 400px); text-align: center">SUBTOTAL:</div>
-          <div class="contentRow" style="width: 100px; text-align: center"></div>
+          <div
+            class="contentRow"
+            style="width: calc(100% - 400px); text-align: center"
+          >
+            SUBTOTAL:
+          </div>
+          <div
+            class="contentRow"
+            style="width: 100px; text-align: center"
+          ></div>
           <div class="contentRow" style="width: 100px; text-align: center">
             {{ statistics("quantity", 0) }}
           </div>
-          <div class="contentRow" style="width: 100px; text-align: center"></div>
+          <div
+            class="contentRow"
+            style="width: 100px; text-align: center"
+          ></div>
           <div class="contentRow" style="width: 100px; text-align: center">
             {{ statistics("amount", 2) }}
           </div>
         </div>
-        <div v-if="printDetails.quotationPayList && printDetails.quotationPayList.length > 0">
-          <div class="baseRow" style="display: flex" v-for="(item, index) in printDetails.quotationPayList" :key="index">
-            <div class="contentRow" style="width: calc(100% - 100px); text-align: right; color: #409eff">{{ item.payName }}:</div>
+        <div
+          v-if="
+            printDetails.quotationPayList &&
+            printDetails.quotationPayList.length > 0
+          "
+        >
+          <div
+            class="baseRow"
+            style="display: flex"
+            v-for="(item, index) in printDetails.quotationPayList"
+            :key="index"
+          >
+            <div
+              class="contentRow"
+              style="
+                width: calc(100% - 100px);
+                text-align: right;
+                color: #409eff;
+              "
+            >
+              {{ item.payName }}:
+            </div>
             <div class="contentRow" style="width: 100px; text-align: center">
               {{ item.amount }}
             </div>
           </div>
         </div>
         <div class="baseRow" style="display: flex">
-          <div class="contentRow" style="width: calc(100% - 100px); text-align: right; color: #409eff">TOTAL PRICE:</div>
+          <div
+            class="contentRow"
+            style="width: calc(100% - 100px); text-align: right; color: #409eff"
+          >
+            TOTAL PRICE:
+          </div>
           <div class="contentRow" style="width: 100px; text-align: center">
             {{ getAllMoney(statistics("amount", 2)) }}
           </div>
         </div>
-        <div class="baseRow" style="display: flex; border-bottom: 1px solid black">
+        <div
+          class="baseRow"
+          style="display: flex; border-bottom: 1px solid black"
+        >
           <div class="contentRow" style="width: 100%">
-            {{ translateIntoEnglish(printDetails.amount, printDetails.currency) }}
+            {{
+              translateIntoEnglish(printDetails.amount, printDetails.currency)
+            }}
           </div>
         </div>
         <!-- <div style="height: 16px"></div>
@@ -203,20 +336,30 @@
           <div style="width: 50%">
             <div style="color: #409eff">CONFIRMED BY VENDOR:</div>
             <div>
-              {{ getLabel(printDetails.sellCorporationId, corporationList, "nameEn") }}
+              {{
+                getLabel(
+                  printDetails.sellCorporationId,
+                  corporationList,
+                  "nameEn"
+                )
+              }}
             </div>
           </div>
           <div style="width: 50%">
             <div style="color: #409eff">CONFIRMED BY BUYER:</div>
             <div>
-              {{ getLabel(printDetails.buyCorporationId, customerList, "name") }}
+              {{
+                getLabel(printDetails.buyCorporationId, customerList, "name")
+              }}
             </div>
           </div>
         </div>
       </div>
       <template #footer>
         <el-button @click="openPrint = false" size="large">取消</el-button>
-        <el-button type="primary" @click="clickDownload()" size="large">下载PDF</el-button>
+        <el-button type="primary" @click="clickDownload()" size="large"
+          >下载PDF</el-button
+        >
       </template>
     </el-dialog>
   </div>
@@ -386,14 +529,16 @@ const config = computed(() => {
   ];
 });
 const getDict = () => {
-  proxy.post("/saleQuotation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    accountList.value = res.rows.map((item) => {
-      return {
-        label: item.alias,
-        value: item.id,
-      };
+  proxy
+    .post("/saleQuotation/page", { pageNum: 1, pageSize: 999 })
+    .then((res) => {
+      accountList.value = res.rows.map((item) => {
+        return {
+          label: item.alias,
+          value: item.id,
+        };
+      });
     });
-  });
   proxy.post("/corporation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
     corporationList.value = res.rows.map((item) => {
       return {
@@ -412,20 +557,22 @@ const getDict = () => {
       };
     });
   });
-  proxy.getDictOne(["trade_mode", "account_currency", "shipping_method"]).then((res) => {
-    tradeMethods.value = res["trade_mode"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    accountCurrency.value = res["account_currency"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    shippingMethod.value = res["shipping_method"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-  });
+  proxy
+    .getDictOne(["trade_mode", "account_currency", "shipping_method"])
+    .then((res) => {
+      tradeMethods.value = res["trade_mode"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      accountCurrency.value = res["account_currency"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+      shippingMethod.value = res["shipping_method"].map((x) => ({
+        label: x.dictValue,
+        value: x.dictKey,
+      }));
+    });
 };
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
@@ -477,7 +624,10 @@ const clickDownload = () => {
 };
 const statistics = (label, index) => {
   let num = 0;
-  if (printDetails.value.quotationProductList && printDetails.value.quotationProductList.length > 0) {
+  if (
+    printDetails.value.quotationProductList &&
+    printDetails.value.quotationProductList.length > 0
+  ) {
     printDetails.value.quotationProductList.map((item) => {
       if (item[label]) {
         num = parseFloat(Number(num) + Number(item[label])).toFixed(index);
@@ -498,7 +648,10 @@ const getLabel = (key, list, label) => {
 };
 const getAllMoney = (num) => {
   let money = num;
-  if (printDetails.value.quotationPayList && printDetails.value.quotationPayList.length > 0) {
+  if (
+    printDetails.value.quotationPayList &&
+    printDetails.value.quotationPayList.length > 0
+  ) {
     printDetails.value.quotationPayList.map((item) => {
       if (item.amount) {
         money = parseFloat(Number(money) + Number(item.amount)).toFixed(2);

+ 332 - 321
src/views/process/dealWith/index.vue

@@ -1,361 +1,372 @@
 <template>
-	<div class="tenant">
-		<!-- <Banner /> -->
-		<div class="content">
-			<byTable
-				:source="sourceList.data"
-				:pagination="sourceList.pagination"
-				:config="config"
-				:loading="loading"
-				highlight-current-row
-				:selectConfig="selectConfig"
-				:table-events="{
-					//element talbe事件都能传
-					select: select,
-				}"
-				@get-list="getList"
-			>
-				<template #slotName="{ item }">
-					{{ item.createTime }}
-				</template>
-			</byTable>
-		</div>
-		<el-dialog
-			:title="modalType == 'add' ? '新增' : '编辑'"
-			v-model="dialogVisible"
-			width="400"
-			v-loading="loading"
-		>
-			<byForm
-				:formConfig="formConfig"
-				:formOption="formOption"
-				v-model="formData.data"
-				:rules="rules"
-				ref="byform"
-			>
-			</byForm>
-			<template #footer>
-				<el-button @click="dialogVisible = false" size="large"
-					>取 消</el-button
-				>
-				<el-button
-					type="primary"
-					@click="submitForm('byform')"
-					size="large"
-					:loading="submitLoading"
-				>
-					确 定
-				</el-button>
-			</template>
-		</el-dialog>
-	</div>
+  <div class="tenant">
+    <!-- <Banner /> -->
+    <div class="content">
+      <byTable
+        :source="sourceList.data"
+        :pagination="sourceList.pagination"
+        :config="config"
+        :loading="loading"
+        highlight-current-row
+        :selectConfig="selectConfig"
+        :table-events="{
+          //element talbe事件都能传
+          select: select,
+        }"
+        @get-list="getList"
+      >
+        <template #slotName="{ item }">
+          {{ item.createTime }}
+        </template>
+      </byTable>
+    </div>
+    <el-dialog
+      :title="modalType == 'add' ? '新增' : '编辑'"
+      v-model="dialogVisible"
+      width="400"
+      v-loading="loading"
+    >
+      <byForm
+        :formConfig="formConfig"
+        :formOption="formOption"
+        v-model="formData.data"
+        :rules="rules"
+        ref="byform"
+      >
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="large">取 消</el-button>
+        <el-button
+          type="primary"
+          @click="submitForm('byform')"
+          size="large"
+          :loading="submitLoading"
+        >
+          确 定
+        </el-button>
+      </template>
+    </el-dialog>
+  </div>
 </template>
     
   <script setup name="DealWith">
 /* eslint-disable vue/no-unused-components */
-import { ElMessage, ElMessageBox } from 'element-plus'
-import byTable from '@/components/byTable/index'
-import byForm from '@/components/byForm/index'
-import { computed, defineComponent, ref } from 'vue'
-const loading = ref(false)
-const submitLoading = ref(false)
-const dictCommonModal = ref(false)
+import { ElMessage, ElMessageBox } from "element-plus";
+import byTable from "@/components/byTable/index";
+import byForm from "@/components/byForm/index";
+import { computed, defineComponent, ref } from "vue";
+const loading = ref(false);
+const submitLoading = ref(false);
+const dictCommonModal = ref(false);
 const sourceList = ref({
-	data: [],
-	pagination: {
-		total: 3,
-		pageNum: 1,
-		pageSize: 10,
-        status:1,
-	},
-})
-let dialogVisible = ref(false)
-let roomDialogVisible = ref(false)
-let modalType = ref('add')
+  data: [],
+  pagination: {
+    total: 3,
+    pageNum: 1,
+    pageSize: 10,
+    status: 1,
+  },
+});
+let dialogVisible = ref(false);
+let roomDialogVisible = ref(false);
+let modalType = ref("add");
 let rules = ref({
-	classifyName: [
-		{ required: true, message: '请输入功能模块', trigger: 'blur' },
-	],
-	flowKey: [{ required: true, message: '请输入流程标识', trigger: 'blur' }],
-	flowName: [{ required: true, message: '请输入流程名称', trigger: 'blur' }],
-})
-const { proxy } = getCurrentInstance()
+  classifyName: [
+    { required: true, message: "请输入功能模块", trigger: "blur" },
+  ],
+  flowKey: [{ required: true, message: "请输入流程标识", trigger: "blur" }],
+  flowName: [{ required: true, message: "请输入流程名称", trigger: "blur" }],
+});
+const { proxy } = getCurrentInstance();
 const selectConfig = computed(() => {
-	return [
+  return [
+    {
+      label: "流程类型",
+      prop: "flowInfoId",
+      data: [],
+    },
+    {
+      label: "流程状态",
+      prop: "status",
+      data: [
         {
-			label: '流程类型',
-			prop: 'flowInfoId',
-			data: [],
-		},
-		{
-			label: '流程状态',
-			prop: 'status',
-			data: [
-				{
-					label: '待处理',
-					value: '1',
-				},
-				{
-					label: '已发起',
-					value: '2',
-				},
-                {
-                    label: '已处理',
-                    value: '3',
-                },
-			],
-		},
-	]
-})
+          label: "待处理",
+          value: "1",
+        },
+        {
+          label: "已发起",
+          value: "2",
+        },
+        {
+          label: "已处理",
+          value: "3",
+        },
+      ],
+    },
+  ];
+});
 const config = computed(() => {
-	return [
-		{
-			attrs: {
-				label: '流程类型',
-				prop: 'flowName',
-			},
-		},
-		{
-			attrs: {
-				label: '流程标题',
-				prop: 'title',
-			},
-		},
+  return [
+    {
+      attrs: {
+        label: "流程类型",
+        prop: "flowName",
+      },
+    },
+    {
+      attrs: {
+        label: "流程标题",
+        prop: "title",
+      },
+    },
 
-		{
-			attrs: {
-				label: '流程状态',
-				width: 100,
-				prop: 'status',
-			},
-			render(status) {
-				return status == 0 || status == 1 ? '待处理' : status == 2 ? '已通过' : '已驳回'
-			},
-		},
-		{
-			attrs: {
-				label: '发起人',
-				prop: 'createUserName',
-			},
-		},
-		{
-			attrs: {
-				label: '发起时间',
-				prop: 'createTime',
-			},
-		},
-		{
-			attrs: {
-				label: '操作',
-				width: '200',
-				align: 'right',
-			},
-			// 渲染 el-button,一般用在最后一列。
-			renderHTML(row) {
-				return [
-					{
-                        attrs: {
-                            label: row.status == 0 || row.status == 1 ? '办理' : '查看',
-                            type: 'primary',
-                            text: true,
-                            bg: true,
-                            disabled: false,
-                        },
-                        el: 'button',
-                        click() {
-							if(row.status != 1 && row.status != 0) {
-								proxy.$router.push({
-									path: "/platform_manage/process/processApproval",
-									query: {
-										flowKey: row.flowKey,
-										id: row.id,
-										processType:20,
-										version:row.version
-									},
-								});
-								return
-							}
-							proxy.post('flowExample/getApprovalRecord',{id:row.id}).then(res=>{
-								if(res.recordList.length > 0) {
-									let data = res.recordList.filter(item => item.status === 2)
-									let nodeType= 0
-									if (data && data.length > 0) {
-										nodeType = data[0].nodeType
-									}
-									proxy.$router.push({
-										path: "/platform_manage/process/processApproval",
-										query: {
-											flowKey: row.flowKey,
-											id: row.id,
-											processType:nodeType == 1 ? 30 : 10,
-											version:row.version
-										},
-									});
-								}
-							})
-                        },
-                    } 
-						
-				]
-			},
-		},
-	]
-})
+    {
+      attrs: {
+        label: "流程状态",
+        width: 100,
+        prop: "status",
+      },
+      render(status) {
+        return status == 0 || status == 1
+          ? "待处理"
+          : status == 2
+          ? "已通过"
+          : "已驳回";
+      },
+    },
+    {
+      attrs: {
+        label: "发起人",
+        prop: "createUserName",
+      },
+    },
+    {
+      attrs: {
+        label: "发起时间",
+        prop: "createTime",
+      },
+    },
+    {
+      attrs: {
+        label: "操作",
+        width: "200",
+        align: "right",
+      },
+      // 渲染 el-button,一般用在最后一列。
+      renderHTML(row) {
+        return [
+          {
+            attrs: {
+              label: row.status == 0 || row.status == 1 ? "办理" : "查看",
+              type: "primary",
+              text: true,
+              bg: true,
+              disabled: false,
+            },
+            el: "button",
+            click() {
+              if (row.status != 1 && row.status != 0) {
+                proxy.$router.push({
+                  path: "/platform_manage/process/processApproval",
+                  query: {
+                    flowKey: row.flowKey,
+                    id: row.id,
+                    processType: 20,
+                    tenantType: "EHSD",
+                    version: row.version,
+                  },
+                });
+                return;
+              }
+              proxy
+                .post("flowExample/getApprovalRecord", { id: row.id })
+                .then((res) => {
+                  if (res.recordList.length > 0) {
+                    let data = res.recordList.filter(
+                      (item) => item.status === 2
+                    );
+                    let nodeType = 0;
+                    if (data && data.length > 0) {
+                      nodeType = data[0].nodeType;
+                    }
+                    proxy.$router.push({
+                      path: "/platform_manage/process/processApproval",
+                      query: {
+                        flowKey: row.flowKey,
+                        id: row.id,
+                        processType: nodeType == 1 ? 30 : 10,
+                        tenantType: "EHSD",
+                        version: row.version,
+                      },
+                    });
+                  }
+                });
+            },
+          },
+        ];
+      },
+    },
+  ];
+});
 let dtlData = reactive({
-	data: {},
-})
+  data: {},
+});
 let formData = reactive({
-	data: {},
-	treeData: [],
-})
+  data: {},
+  treeData: [],
+});
 const formOption = reactive({
-	inline: true,
-	labelWidth: 100,
-	itemWidth: 100,
-	rules: [],
-})
-const byform = ref(null)
-const treeData = ref([])
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+});
+const byform = ref(null);
+const treeData = ref([]);
 const formConfig = computed(() => {
-	return [
-		{
-			type: 'input',
-			prop: 'classifyName',
-			label: '功能模块',
-		},
-		{
-			type: 'input',
-			prop: 'flowKey',
-			label: '流程标识',
-			isHide: modalType.value == 'edit',
-		},
-		{
-			type: 'input',
-			prop: 'flowName',
-			label: '流程名称',
-		},
-	]
-})
+  return [
+    {
+      type: "input",
+      prop: "classifyName",
+      label: "功能模块",
+    },
+    {
+      type: "input",
+      prop: "flowKey",
+      label: "流程标识",
+      isHide: modalType.value == "edit",
+    },
+    {
+      type: "input",
+      prop: "flowName",
+      label: "流程名称",
+    },
+  ];
+});
 
-const flowJump = (row,type) => {
-    proxy.post('/flowProcess/jump', {flowId:row.id,handleType:type,version:row.version,data:{}}).then((message) => {
-        console.log(message)
-        if(message){
-            ElMessage.success('操作成功')
-            getList()
-        }
+const flowJump = (row, type) => {
+  proxy
+    .post("/flowProcess/jump", {
+      flowId: row.id,
+      handleType: type,
+      version: row.version,
+      data: {},
     })
-}
+    .then((message) => {
+      console.log(message);
+      if (message) {
+        ElMessage.success("操作成功");
+        getList();
+      }
+    });
+};
 
 const getFlowType = () => {
-    proxy
-        .post('/flowExample/getFlowType')
-            .then((message) => {
-                console.log(message)
-                selectConfig.value[0].data = message.map((item) => {
-                    return {
-                        label: item.flowName,
-                        value: item.id,
-                    }
-                })
-            })
-        
-}
-getFlowType()
+  proxy.post("/flowExample/getFlowType").then((message) => {
+    console.log(message);
+    selectConfig.value[0].data = message.map((item) => {
+      return {
+        label: item.flowName,
+        value: item.id,
+      };
+    });
+  });
+};
+getFlowType();
 const getUrlObj = {
-    1:'/flowExample/getToBeProcessedPage',
-    2:'/flowExample/getHaveInitiatedPage',
-    3:'/flowExample/getProcessedPage',
-}
+  1: "/flowExample/getToBeProcessedPage",
+  2: "/flowExample/getHaveInitiatedPage",
+  3: "/flowExample/getProcessedPage",
+};
 const getList = async (req) => {
-	sourceList.value.pagination = { ...sourceList.value.pagination, ...req }
-	loading.value = true
-	proxy
-		.post( getUrlObj[sourceList.value.pagination.status], sourceList.value.pagination)
-		.then((message) => {
-			console.log(message)
-			sourceList.value.data = message.rows
-			sourceList.value.pagination.total = message.total
-			setTimeout(() => {
-				loading.value = false
-			}, 200)
-		})
-}
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy
+    .post(
+      getUrlObj[sourceList.value.pagination.status],
+      sourceList.value.pagination
+    )
+    .then((message) => {
+      console.log(message);
+      sourceList.value.data = message.rows;
+      sourceList.value.pagination.total = message.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
+};
 
 const openModal = () => {
-	dialogVisible.value = true
-	modalType.value = 'add'
-	formData.data = {}
-}
+  dialogVisible.value = true;
+  modalType.value = "add";
+  formData.data = {};
+};
 const selection = ref({
-	data: [],
-})
+  data: [],
+});
 const select = (_selection, row) => {
-	selection.value.data = _selection
-	console.log(_selection.length)
-}
+  selection.value.data = _selection;
+  console.log(_selection.length);
+};
 
-const tree = ref(null)
+const tree = ref(null);
 const submitTree = () => {
-	proxy
-		.post('/tenantInfo/bindingMenu', {
-			tenantId: selection.value.data[0].tenantId,
-			menuIdList: tree.value.getCheckedKeys(),
-		})
-		.then((res) => {
-			ElMessage({
-				message: '保存成功',
-				type: 'success',
-			})
-			roomDialogVisible.value = false
-		})
-}
+  proxy
+    .post("/tenantInfo/bindingMenu", {
+      tenantId: selection.value.data[0].tenantId,
+      menuIdList: tree.value.getCheckedKeys(),
+    })
+    .then((res) => {
+      ElMessage({
+        message: "保存成功",
+        type: "success",
+      });
+      roomDialogVisible.value = false;
+    });
+};
 
 const submitForm = () => {
-	byform.value.handleSubmit((valid) => {
-		submitLoading.value = true
-		proxy
-			.post('/flowInfo/' + modalType.value, formData.data)
-			.then((res) => {
-				ElMessage({
-					message: modalType.value == 'add' ? '添加成功' : '编辑成功',
-					type: 'success',
-				})
-				dialogVisible.value = false
-				submitLoading.value = false
-				getList()
-			})
-	})
-}
+  byform.value.handleSubmit((valid) => {
+    submitLoading.value = true;
+    proxy.post("/flowInfo/" + modalType.value, formData.data).then((res) => {
+      ElMessage({
+        message: modalType.value == "add" ? "添加成功" : "编辑成功",
+        type: "success",
+      });
+      dialogVisible.value = false;
+      submitLoading.value = false;
+      getList();
+    });
+  });
+};
 
 const getDtl = (row) => {
-	formData.data = { ...row }
-	modalType.value = 'edit'
-	dialogVisible.value = true
-}
+  formData.data = { ...row };
+  modalType.value = "edit";
+  dialogVisible.value = true;
+};
 
 const changeStatus = (row) => {
-	modalType.value = 'edit'
-	proxy
-		.post('/flowInfo/edit', { ...row, status: row.status === 0 ? 1 : 0 })
-		.then((res) => {
-			ElMessage({
-				message: '操作成功',
-				type: 'success',
-			})
-			getList()
-		})
-}
+  modalType.value = "edit";
+  proxy
+    .post("/flowInfo/edit", { ...row, status: row.status === 0 ? 1 : 0 })
+    .then((res) => {
+      ElMessage({
+        message: "操作成功",
+        type: "success",
+      });
+      getList();
+    });
+};
 onMounted(() => {
-	const route = useRoute();
-	sourceList.value.pagination.status = route.query.type ? route.query.type : 1
-	getList()
-})
-
+  const route = useRoute();
+  sourceList.value.pagination.status = route.query.type ? route.query.type : 1;
+  getList();
+});
 </script>
     
   <style lang="scss" scoped>
 .tenant {
-	padding: 20px;
+  padding: 20px;
 }
 </style>